install_qa_check: use #k rather than %k with scanelf
authorMike Frysinger <vapier@gentoo.org>
Sun, 3 Feb 2013 05:52:11 +0000 (00:52 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 3 Feb 2013 05:52:11 +0000 (00:52 -0500)
No need to use `sed` to remove the string when scanelf itself supports it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
bin/misc-functions.sh

index 5fd0eab2c3b731211d87c93b77e239cb2d38d77f..ddd9179341b02ab02c902eccc0afb7b8131c4a02 100755 (executable)
@@ -191,8 +191,7 @@ install_qa_check() {
                [[ "${FFLAGS}" == *-frecord-gcc-switches* ]] && \
                [[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] ; then
                rm -f "${T}"/scanelf-ignored-CFLAGS.log
-               for x in $(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | \
-                       sed -e "s:\!.GCC.command.line ::") ; do
+               for x in $(scanelf -qyRF '#k%p' -k '!.GCC.command.line' "${ED}") ; do
                        # Separate out file types that are known to support
                        # .GCC.command.line sections, using the `file` command
                        # similar to how prepstrip uses it.
@@ -398,7 +397,7 @@ install_qa_check() {
                # Check for files built without respecting LDFLAGS
                if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && \
                        ! has binchecks ${RESTRICT} ; then
-                       f=$(scanelf -qyRF '%k %p' -k .hash "${ED}" | sed -e "s:\.hash ::")
+                       f=$(scanelf -qyRF '#k%p' -k .hash "${ED}")
                        if [[ -n ${f} ]] ; then
                                echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log
                                if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then