2017-12-18 17:02 GMT-02:00 David Haller <gen...@dhaller.de>:

> Hello,
>
> On Mon, 18 Dec 2017, Mick wrote:
> >On Monday, 18 December 2017 16:14:42 GMT Dale wrote:
> >> Grant Edwards wrote:
> >> > I tried following the profile 17 upgrade instructions but now I'm
> >> > stuck.  After running for a day or so, the 'emerge -e @world' command
> >> > stopped when grub-0.97 failed to build.
> >> >
> >> > How do I skip grub and continue?
> >> >
> >> > Or do I have to tell emerge to start over from the beginning (skipping
> >> > grub)?  Assuming there are other packages that are going to fail also,
> >> > that could take weeks...
> >>
> >> emerge --resume --skipfirst
> >>
> >> That should work.  If forced, using --exclude grub might could be
> >> added.  I've never tried that with the --resume command tho.
> >>
> >> Dale
> >>
> >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.
>
> Luckily, it was no big deal, as I did a switch to gcc-7.2 / -pie at
> the same time, so I ran my "check-pie" script (pie-only check
> extracted from checksec) to find the packages that (might) need a
> recompile. I've just a few biggies leftover to compile and a couple I
> want to mess with. But those have updates pending anyway. So, I'm
> about done.
>
> BTW: in the process, I've collected binaries/packages that won't get
> compiled as pie... e.g. gcc itself, grub and most (all?) haskell
> stuff. ATM, it's a pretty badly ad-hoc script, but I could amend that.
> Or at least share the list of "known non-pie-able" binaries, I guess.
> Hm. One could also add an output that can be fed to emerge via xargs.
>
> -dnh
>
> --
> "As a sysadmin, I suppose you're familiar with something called a
>   'worst-case scenario'?"
> "Isn't that what we call, "having a good day for a change"?"
>    (Rik Steenwinkel and Graham Reed)
>
>

I have a script for "-e" :


#! /bin/bash
LOG=/tmp/update.log
date > $LOG
echo ---- ---- Starting... >> $LOG

#looking for active gcc
N=1
A=`gcc-config -c`
B=$A
while [ $B != `echo $B | sed s/-//` ]
do
       N=$(( $N + 1 ))
       B=`echo $B | sed s/-//`
done
A=`echo $A | cut -d- -f$N-`
GCC_VER=`equery l sys-devel/gcc | grep $A`

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 && \
nice -n 10 emerge -1vb --keep-going --quiet-build =$GCC_VER
sys-devel/libtool 1>> $LOG 2>> $LOG && \
nice -n 10 emerge -vbe --keep-going --quiet-build world 1>> $LOG 2>> $LOG
echo ---- ---- Resuming... >> $LOG
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
nice -n 10 emerge -vb --resume --skip-first --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
nice -n 10 emerge -vb --resume --skip-first --keep-going --quiet-build 1>>
$LOG 2>> $LOG
echo ---- ---- Finishing. >> $LOG
date >> $LOG
echo -n  >> $LOG
cat $LOG | mail -b -c -s "emerge -e results" your-email@your-domain



This usually ends up with too many resumes, but at least it gets to the end
of the builds as deep as possible.

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

Hope this helps,
Francisco

Reply via email to