prepstrip: run the log parsing in parallel to file stripping
authorMike Frysinger <vapier@gentoo.org>
Mon, 14 May 2012 17:35:46 +0000 (13:35 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 14 May 2012 18:51:05 +0000 (14:51 -0400)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
bin/ebuild-helpers/prepstrip

index 063a17c89b36a4d47ad55ad5cf6b6c6c1d90ff7c..c5b1785a335e9299fb8c6672ee8b2f48e7573e76 100755 (executable)
@@ -187,12 +187,15 @@ process_elf() {
 # We want to log already stripped binaries, as this may be a QA violation.
 # They prevent us from getting the splitdebug data.
 if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
+       # We need to do the non-stripped scan serially first before we turn around
+       # and start stripping the files ourselves.  The log parsing can be done in
+       # parallel though.
+       log=$T/scanelf-already-stripped.log
+       scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "$log"
        (
        multijob_child_init
-       log=$T/scanelf-already-stripped.log
        qa_var="QA_PRESTRIPPED_${ARCH/-/_}"
        [[ -n ${!qa_var} ]] && QA_PRESTRIPPED="${!qa_var}"
-       scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "$log"
        if [[ -n $QA_PRESTRIPPED && -s $log && \
                ${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then
                shopts=$-
@@ -215,9 +218,6 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
        multijob_post_fork
 fi
 
-# Let the Pre-stripped check finish before we start stripping
-multijob_finish
-
 # Now we look for unstripped binaries.
 for x in \
        $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \