SOURCES: rpm.macros - keep ORIGIN, we need it because some absolute paths a...

arekm arekm at pld-linux.org
Wed Jun 25 21:12:40 CEST 2008


Author: arekm                        Date: Wed Jun 25 19:12:40 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- keep ORIGIN, we need it because some absolute paths are too long to be in rpath, untested

---- Files affected:
SOURCES:
   rpm.macros (1.462 -> 1.463) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.462 SOURCES/rpm.macros:1.463
--- SOURCES/rpm.macros:1.462	Wed Jun 25 14:44:18 2008
+++ SOURCES/rpm.macros	Wed Jun 25 21:12:34 2008
@@ -455,12 +455,13 @@
 			rpath= ; \
 			chmod u+w "$file"; \
 			for dir in $(chrpath -l "$file" | awk '/RPATH=/ { gsub(/.*RPATH=/,""); gsub(/:/," "); print $0 }'); do \
-					# 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"); \
+					case $dir in \
+					'$ORIGIN' ) \
+						if [ "$rpath" = "" ] ; then rpath="$dir" ; \
+						else rpath="$rpath:$dir" ; fi ; \
+						continue ; \
+						;; \
+					esac ; \
 					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 ) \
================================================================

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



More information about the pld-cvs-commit mailing list