Extend QA check for absolute symlinks in lib dirs to more file types
authorSebastian Luther <SebastianLuther@gmx.de>
Sat, 15 May 2010 20:40:55 +0000 (22:40 +0200)
committerZac Medico <zmedico@gentoo.org>
Sat, 15 May 2010 20:50:24 +0000 (13:50 -0700)
bin/misc-functions.sh

index 2fd0491981d0505f1385e47c92da276284666a31..7fb61f69e466179f9fcc2d84fa145d19eef9c620 100755 (executable)
@@ -349,17 +349,7 @@ install_qa_check() {
 
                for j in "${i}"/*.so.* "${i}"/*.so ; do
                        [[ ! -e ${j} ]] && continue
-                       if [[ -L ${j} ]] ; then
-                               linkdest=$(readlink "${j}")
-                               if [[ ${linkdest} == /* ]] ; then
-                                       vecho -ne '\a\n'
-                                       eqawarn "QA Notice: Found an absolute symlink in a library directory:"
-                                       eqawarn "           ${j#${D}} -> ${linkdest}"
-                                       eqawarn "           It should be a relative symlink if in the same directory"
-                                       eqawarn "           or a linker script if it crosses the /usr boundary."
-                               fi
-                               continue
-                       fi
+                       [[ -L ${j} ]] && continue
                        [[ -x ${j} ]] && continue
                        vecho "making executable: ${j#${D}}"
                        chmod +x "${j}"
@@ -372,6 +362,19 @@ install_qa_check() {
                        vecho "removing executable bit: ${j#${D}}"
                        chmod -x "${j}"
                done
+
+               for j in "${i}"/*.{a,dll,dylib,sl,so}.* "${i}"/*.{a,dll,dylib,sl,so} ; do
+                       [[ ! -e ${j} ]] && continue
+                       [[ ! -L ${j} ]] && continue
+                       linkdest=$(readlink "${j}")
+                       if [[ ${linkdest} == /* ]] ; then
+                               vecho -ne '\a\n'
+                               eqawarn "QA Notice: Found an absolute symlink in a library directory:"
+                               eqawarn "           ${j#${D}} -> ${linkdest}"
+                               eqawarn "           It should be a relative symlink if in the same directory"
+                               eqawarn "           or a linker script if it crosses the /usr boundary."
+                       fi
+               done
        done
 
        # When installing static libraries into /usr/lib and shared libraries into