Author: glen                         Date: Wed Jun 11 15:27:37 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- (after hawk got his autotag) switch back to readlink but additionally 
translate $ORIGIN to real path, so that normalize path would work with readlink

---- Files affected:
SOURCES:
   rpm.macros (1.458 -> 1.459) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.458 SOURCES/rpm.macros:1.459
--- SOURCES/rpm.macros:1.458    Wed Jun 11 17:09:15 2008
+++ SOURCES/rpm.macros  Wed Jun 11 17:27:32 2008
@@ -455,7 +455,13 @@
                        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"; \
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm.macros?r1=1.458&r2=1.459&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to