1 |
On Monday 14 May 2012 04:44:12 Zac Medico wrote: |
2 |
> On 05/14/2012 12:33 AM, Michael Haubenwallner wrote: |
3 |
> >> +multijob_post_fork() { |
4 |
> >> + : $(( ++mj_num_jobs )) |
5 |
> >> + if [[ ${mj_num_jobs} -ge ${mj_max_jobs} ]] ; then |
6 |
> >> + multijob_finish_one |
7 |
> > |
8 |
> > Feels like ignoring this child's exitstatus isn't intentional here. |
9 |
> |
10 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2adc44 |
11 |
> 295a5b5c77640c32cd24ebbd8d52e5237b |
12 |
|
13 |
simpler: |
14 |
|
15 |
--- a/bin/helper-functions.sh |
16 |
+++ b/bin/helper-functions.sh |
17 |
@@ -54,11 +54,9 @@ multijob_finish() { |
18 |
} |
19 |
|
20 |
multijob_post_fork() { |
21 |
- local ret=0 |
22 |
: $(( ++mj_num_jobs )) |
23 |
if [[ ${mj_num_jobs} -ge ${mj_max_jobs} ]] ; then |
24 |
multijob_finish_one |
25 |
- : $(( ret |= $? )) |
26 |
fi |
27 |
- return ${ret} |
28 |
+ return $? |
29 |
} |
30 |
|
31 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b4fba3 |
32 |
> e9fa2e285244de491f57700978158c1838 |
33 |
|
34 |
should really fix it to make the code parallel safe rather than disabling it |
35 |
completely. i'll work on that. |
36 |
|
37 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c534e |
38 |
> 32f78cf7c543e9203e7fe1c7b1630144ffb |
39 |
|
40 |
forking & waiting for a single child doesn't make much sense. might as well |
41 |
not fork at all. but this can still be parallelizied a little: |
42 |
|
43 |
--- a/bin/ebuild-helpers/prepstrip |
44 |
+++ b/bin/ebuild-helpers/prepstrip |
45 |
@@ -187,12 +187,15 @@ process_elf() { |
46 |
# We want to log already stripped binaries, as this may be a QA violation. |
47 |
# They prevent us from getting the splitdebug data. |
48 |
if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then |
49 |
+ # We need to do the non-stripped scan serially first before we turn around |
50 |
+ # and start stripping the files ourselves. The log parsing can be done in |
51 |
+ # parallel though. |
52 |
+ log=$T/scanelf-already-stripped.log |
53 |
+ scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "$log" |
54 |
( |
55 |
multijob_child_init |
56 |
- log=$T/scanelf-already-stripped.log |
57 |
qa_var="QA_PRESTRIPPED_${ARCH/-/_}" |
58 |
[[ -n ${!qa_var} ]] && QA_PRESTRIPPED="${!qa_var}" |
59 |
- scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "$log" |
60 |
if [[ -n $QA_PRESTRIPPED && -s $log && \ |
61 |
${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then |
62 |
shopts=$- |
63 |
@@ -215,9 +218,6 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then |
64 |
multijob_post_fork |
65 |
fi |
66 |
|
67 |
-# Let the Pre-stripped check finish before we start stripping |
68 |
-multijob_finish |
69 |
- |
70 |
# Now we look for unstripped binaries. |
71 |
for x in \ |
72 |
$(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \ |
73 |
-mike |