]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- (after hawk got his autotag) switch back to readlink but additionally translate...
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 11 Jun 2008 15:27:32 +0000 (15:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.459

rpm.macros

index 002bff25fbe548d5154ac0abb55e229fc824ffea..9e2a4f30657cf765cdff3177f068376446876e62 100644 (file)
@@ -455,7 +455,13 @@ if [ -d "$RPM_BUILD_ROOT" ]; then \
                        rpath= ; \
                        chmod u+w "$file"; \
                        for dir in $(chrpath -l "$file" | awk '/RPATH=/ { gsub(/.*RPATH=/,""); gsub(/:/," "); print $0 }'); do \
-                                       dir=$(%{__python} -c 'import sys, os; print os.path.normpath(sys.argv[1]);' "$dir"); \
+                                       # translate $ORIGIN to real path, so that normalize path \
+                                       # would work with readlink and secondly we don't need to \
+                                       # relocate the binaries in rpm based distro \
+                                       local f=${file#$RPM_BUILD_ROOT}; \
+                                       local origin=${f%/*}; \
+                                       dir=$(echo $dir | sed -e "s,\$ORIGIN,$origin,g"); \
+                                       dir=$(readlink -m "$dir"); \
                                        case $dir in \
                                        /home/* | /tmp/* | /usr/lib | /usr/lib64 | /lib | /lib64 | /usr/local/lib | /usr/local/lib64 | /usr/X11R6/lib | /usr/X11R6/lib64 ) \
                                                echo "remove-rpath: $dir in $file"; \
This page took 0.045609 seconds and 4 git commands to generate.