install_qa_check(): Simplify code and make 'l' a local variable.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Sat, 30 Apr 2011 16:30:29 +0000 (18:30 +0200)
committerZac Medico <zmedico@gentoo.org>
Wed, 4 May 2011 19:47:54 +0000 (12:47 -0700)
bin/misc-functions.sh

index c3109981d006ff6901b4524632f88016aa6c5fde..b28b73fff2fc3802c908f0bbc7334b62dfa22c99 100755 (executable)
@@ -193,10 +193,10 @@ install_qa_check() {
                #   3) Null paths are banned because the loader will search $PWD when
                #      it finds null paths.
                local forbidden_dirs="${PORTAGE_BUILDDIR}"
-               if [[ -n "$ROOT" ]] && [[ "$ROOT" != "/" ]]; then
-                       forbidden_dirs="${forbidden_dirs} ${ROOT}"
+               if [[ -n "${ROOT}" && "${ROOT}" != "/" ]]; then
+                       forbidden_dirs+=" ${ROOT}"
                fi
-               local dir="" rpath_files=$(scanelf -F '%F:%r' -qBR "${D}")
+               local dir l rpath_files=$(scanelf -F '%F:%r' -qBR "${D}")
                f=""
                for dir in ${forbidden_dirs}; do
                        for l in $(echo "${rpath_files}" | grep -E ":${dir}|::|: "); do