On Monday 14 May 2012 04:44:12 Zac Medico wrote: > On 05/14/2012 12:33 AM, Michael Haubenwallner wrote: > >> +multijob_post_fork() { > >> + : $(( ++mj_num_jobs )) > >> + if [[ ${mj_num_jobs} -ge ${mj_max_jobs} ]] ; then > >> + multijob_finish_one > > > > Feels like ignoring this child's exitstatus isn't intentional here. > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2adc44 > 295a5b5c77640c32cd24ebbd8d52e5237b
simpler: --- a/bin/helper-functions.sh +++ b/bin/helper-functions.sh @@ -54,11 +54,9 @@ multijob_finish() { } multijob_post_fork() { - local ret=0 : $(( ++mj_num_jobs )) if [[ ${mj_num_jobs} -ge ${mj_max_jobs} ]] ; then multijob_finish_one - : $(( ret |= $? )) fi - return ${ret} + return $? } > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b4fba3 > e9fa2e285244de491f57700978158c1838 should really fix it to make the code parallel safe rather than disabling it completely. i'll work on that. > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c534e > 32f78cf7c543e9203e7fe1c7b1630144ffb forking & waiting for a single child doesn't make much sense. might as well not fork at all. but this can still be parallelizied a little: --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@ -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' "$@") \ -mike
signature.asc
Description: This is a digitally signed message part.