Hello,

On Mon, 18 Dec 2017, Francisco Ares wrote:
>2017-12-18 17:02 GMT-02:00 David Haller <gen...@dhaller.de>:
>> On Mon, 18 Dec 2017, Mick wrote:
[..]
>> >Let's not forget the '--keep-going y' option too.  At the end it will
>> print a
>> >list of all the packages that failed to emerge.
>>
>> Well, there's a catch though. I did:
>>
>> $ emerge -e --keep-going @world
>> [some failed pkg(s)]
>> [Ctrl-C due to going to sleep etc.]
>> $ emerge -e --keep-going --resume @world
>> [Ctrl-C due to going to sleep etc.]
>> [some failed pkg(s)]
>> $ emerge -e --keep-going --resume @world
>> [Ctrl-C due to going to sleep etc.]
>> [2 more failed pkg(s)]
>> [emerge prints just those two failed pkgs that failed since the last
>> resume]
>>
>> And no "failed pgks" were printed at those Ctrl-C...
>>
>> Only trace was probably deep in the emerge logs and the leftovers in
>> /var/tmp/portage (-> you should not these down before you shut down if
>> that's a tmpfs ...)
>>
>> I think something about this should be done / documented.
[..]
>I have a script for "-e" :
>
>#! /bin/bash
[..]
>nice -n 10 emerge -1v --keep-going --quiet-build =$GCC_VER
>sys-devel/libtool 1>> $LOG 2>> $LOG && \
>nice -n 10 emerge -1v --keep-going --quiet-build dev-libs/glib
>sys-libs/glibc 1>> $LOG 2>> $LOG && \

I think you've got those reversed. glib depends on glibc. And, besides
being a lib that more and more (basic) packages depend on for utility,
has nothing to do with (g)libc. It's started as a basic utility lib
for the Gimp Toolkit (gtk) ... ;)

>nice -n 10 emerge -1vb --keep-going --quiet-build =$GCC_VER
>sys-devel/libtool 1>> $LOG 2>> $LOG && \

Is this rebuild of gcc / libtool intentional? And what about binutils?
Those are quite critical, IMO.

>nice -n 10 emerge -vbe --keep-going --quiet-build world 1>> $LOG 2>> $LOG
>echo ---- ---- Resuming... >> $LOG

Ah, yeah. Logging. I should've done that. But, as I said, I noticed
too late about that "problem" with resume and failed packages.

BTW: your script will be much easier to maintain if you rewrite is as
such:

====
exec 1>>$LOG
exec 2>>$LOG
# more redirs, e.g. for console output possible
====

and instead of all those

====
foo && \
bar && ...
====

write

====
foo || exit 1
bar || exit 2
...
====

or some such. And this stuff:

>nice -n 10 emerge -vb --resume --keep-going --quiet-build 1>> $LOG 2>> $LOG
>echo ---- ---- Resuming... >> $LOG
>nice -n 10 emerge -vb --resume --keep-going --quiet-build 1>> $LOG 2>> $LOG
>echo ---- ---- Resuming... >> $LOG
[..]
>echo ---- ---- Finishing. >> $LOG

could be wrapped in a loop... I don't know, but I'd hope emerge exits
with a status != 0 if packages failed. And if so, you could use

====
while ! nice -n 10 emerge ... ; do
    echo ---- ---- Resuming...
done
echo ---- ---- Finishing.
====

(assuming you've redirected fd1 to $LOG as mentioned above ;)

[..]
>Please note the "-b" flag, as I keep binary packages for an emergency.

So do I. And I keep a /stage3 dir around. If python/portage breaks,
I just need to point PATH & LD_LIBRARY_PATH and stuff to /stage3/bla
and can restart. BTDT when pulling 4-years abandoned gentoo up to date
last year...

>Hope this helps,

Yeah. Logging ;) And,

HTH, too,
-dnh

-- 
Sheridan: "I'll tell you one thing. If the primates that we came from had
known that some day politicians would come out of the gene pool, they'd have
stayed up in the trees and written evolution off as a bad idea!"
                                         -- Babylon 5, 2x04 - A Distant Star

Reply via email to