diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-12-30 01:35:58 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-12-30 01:35:58 +0000 |
commit | 1851964c56606ce1ee03b764c17930e33efc718d (patch) | |
tree | 4bc91a628cbc89a16f7de93f641e661ca294f95f | |
parent | 3fbd4f658d90f04d4bcc24337d37ddb21e842900 (diff) | |
download | portage-1851964c56606ce1ee03b764c17930e33efc718d.tar.gz portage-1851964c56606ce1ee03b764c17930e33efc718d.tar.bz2 portage-1851964c56606ce1ee03b764c17930e33efc718d.zip |
detect incorrect absolute symlinks in libdirs
svn path=/main/trunk/; revision=5418
-rwxr-xr-x | bin/prepall | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bin/prepall b/bin/prepall index 68af880dc..8471892dd 100755 --- a/bin/prepall +++ b/bin/prepall @@ -27,9 +27,19 @@ for i in "${D}"opt/*/lib{,32,64} \ for j in "${i}"/*.so.* "${i}"/*.so ; do [[ ! -e ${j} ]] && continue - [[ -L ${j} ]] && continue + if [[ -L ${j} ]] ; then + linkdest=$(readlink "${j}") + if [[ ${linkdest} == /* ]] ; then + vecho -e "\a" + vecho "QA Notice: Found an absolute symlink in a library directory:" + vecho " ${j#${D}} -> ${linkdest}" + vecho " It should be a relative symlink if in the same directory" + vecho " or a linker script if it crosses the /usr boundary." + fi + continue + fi [[ -x ${j} ]] && continue - vecho "making executable: /${j/${D}/}" + vecho "making executable: ${j#${D}}" chmod +x "${j}" done @@ -37,7 +47,7 @@ for i in "${D}"opt/*/lib{,32,64} \ [[ ! -e ${j} ]] && continue [[ -L ${j} ]] && continue [[ ! -x ${j} ]] && continue - vecho "removing executable bit: /${j/${D}/}" + vecho "removing executable bit: ${j#${D}}" chmod -x "${j}" done done |