case "${file}" in
*/usr/lib/debug/*|*/usr/src/debug/*)
# Skip all debuginfo files.
+ continue
+ ;;
+ */usr/lib*/gconv/*)
+ # Skip all gconv files.
+ continue
+ ;;
+ *.ko)
+ # Skip all kernel modules because they do not
+ # require anything at all.
+ continue
;;
*.pc)
# Find all pkg-config files.
# Python
*/usr/lib*/python*/*)
# Sort out all python files.
+ # Directories are processed bewlow.
;;
*/usr/lib/python*|*/usr/lib64/python*)
# This will only get the python directory.
;;
esac
- # Search for all binary files.
- if file_is_elf ${file}; then
- binary_files="${binary_files} ${file}"
- continue
- fi
-
- # Search for script files.
- if file_is_script ${file}; then
- script_files="${script_files} ${file}"
- continue
- fi
-
# Unresolved symlinks.
if [ -L "${file}" ]; then
# Get destination.
if ! [ -e "${link}" ]; then
echo "${link#${BUILDROOT}}"
fi
+
+ # Don't search for anything else, because
+ # symlinks do not require anything but the target file.
+ continue
+ fi
+
+ # Search for all binary files.
+ if file_is_elf ${file}; then
+ binary_files="${binary_files} ${file}"
+ continue
+ fi
+
+ # Search for script files.
+ if file_is_script ${file}; then
+ script_files="${script_files} ${file}"
+ continue
fi
done < ${FILELIST}
# Search for binary interpreters.
for file in ${binary_files}; do
- # Just print the interpreter.
- file_get_elf_interpreter ${file}
+ # Get the interpreter.
+ interp=$(file_get_elf_interpreter ${file})
+
+ # Skip the interpreter if it is provided by this
+ # package.
+ [ -e "${BUILDROOT}${interp}" ] && continue
+
+ # Print the interpreter.
+ echo "${interp}"
done | sort -u
# Weak symbol versions (from glibc).
pkgconfig=$(which pkg-config)
if [ -n "${pkgconfig}" -a -x "${pkgconfig}" ]; then
for file in ${pkgconfig_files}; do
+ # The dependency for the pkgconfig package itself.
+ echo "pkgconfig"
+
${pkgconfig} --print-requires --print-requires-private "${file}" 2> /dev/null | while read n r v ; do
echo "pkgconfig(${n})" "${r}" "${v}"
done