commit: 9330eb9f29b5b5e844dbaa641d5543fa273e53a6
Author: Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 24 02:27:12 2024 +0000
Commit: Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 24 02:27:12 2024 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=9330eb9f
Documentation: update dynlink-scanner
Signed-off-by: Maciej Mrozowski <reavertm <AT> gentoo.org>
Documentation/maintainers/dynlink-scanner | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/maintainers/dynlink-scanner
b/Documentation/maintainers/dynlink-scanner
index 153edd0e4d..90162c8f83 100755
--- a/Documentation/maintainers/dynlink-scanner
+++ b/Documentation/maintainers/dynlink-scanner
@@ -16,11 +16,6 @@ get_link_deps()
# Print linking deps for given executable or shared object in alphabetical
order.
# Also try to dlopen shared objects in order to detect missing/broken
dependencies.
if [[ "$1" = --linking-deps ]]; then
- # Sanity check, file-5.12 is broken, bail out early
- if [[ `file --version | grep --color=never file- | cut -d'-' -f2` ==
'5.12' ]]; then
- echo "file-5.12 is broken, bailing out"
- exit 1
- fi
mime=`file -b --mime-type "$2"`
if [[ "$mime" == 'application/x-pie-executable' ]] || [[ "$mime" ==
'application/x-executable' ]] || [[ "${mime}" == 'application/x-sharedlib' ]];
then
LINK=`get_link_deps "$2"`
@@ -39,6 +34,12 @@ if ! portageq has_version $ROOT/ $1; then
exit 1
fi
+# Sanity check, file-5.12 is broken, bail out early
+if [[ `file --version | grep --color=never file- | cut -d'-' -f2` == '5.12'
]]; then
+ echo "file-5.12 is broken, bailing out"
+ exit 1
+fi
+
# Compile dlopen test application, we will use it to check for broken linking
dependencies
gcc "`dirname $0`/try_dlopen.c" -o /tmp/try_dlopen -ldl
@@ -48,7 +49,7 @@ for cpv in `portageq match $ROOT/ $1`; do
# For each file that belongs to package
# run dynlink-scanner --linking-deps <file> to obtain its linking
dependencies
# Assign all linking deps to packages and print package names
- qfile -R $ROOT `portageq contents $ROOT/ $cpv | xargs -r -L 1 "$0"
--linking-deps` | cut -f1 -d' ' | sort -u
+ qfile -R $ROOT `portageq contents $ROOT/ $cpv | xargs -r -L 1 "$0"
--linking-deps` | cut -f1 -d':' | sort -u
done
# Cleanup