1 |
2017-12-18 17:02 GMT-02:00 David Haller <gentoo@×××××××.de>: |
2 |
|
3 |
> Hello, |
4 |
> |
5 |
> On Mon, 18 Dec 2017, Mick wrote: |
6 |
> >On Monday, 18 December 2017 16:14:42 GMT Dale wrote: |
7 |
> >> Grant Edwards wrote: |
8 |
> >> > I tried following the profile 17 upgrade instructions but now I'm |
9 |
> >> > stuck. After running for a day or so, the 'emerge -e @world' command |
10 |
> >> > stopped when grub-0.97 failed to build. |
11 |
> >> > |
12 |
> >> > How do I skip grub and continue? |
13 |
> >> > |
14 |
> >> > Or do I have to tell emerge to start over from the beginning (skipping |
15 |
> >> > grub)? Assuming there are other packages that are going to fail also, |
16 |
> >> > that could take weeks... |
17 |
> >> |
18 |
> >> emerge --resume --skipfirst |
19 |
> >> |
20 |
> >> That should work. If forced, using --exclude grub might could be |
21 |
> >> added. I've never tried that with the --resume command tho. |
22 |
> >> |
23 |
> >> Dale |
24 |
> >> |
25 |
> >Let's not forget the '--keep-going y' option too. At the end it will |
26 |
> print a |
27 |
> >list of all the packages that failed to emerge. |
28 |
> |
29 |
> Well, there's a catch though. I did: |
30 |
> |
31 |
> $ emerge -e --keep-going @world |
32 |
> [some failed pkg(s)] |
33 |
> [Ctrl-C due to going to sleep etc.] |
34 |
> $ emerge -e --keep-going --resume @world |
35 |
> [Ctrl-C due to going to sleep etc.] |
36 |
> [some failed pkg(s)] |
37 |
> $ emerge -e --keep-going --resume @world |
38 |
> [Ctrl-C due to going to sleep etc.] |
39 |
> [2 more failed pkg(s)] |
40 |
> [emerge prints just those two failed pkgs that failed since the last |
41 |
> resume] |
42 |
> |
43 |
> And no "failed pgks" were printed at those Ctrl-C... |
44 |
> |
45 |
> Only trace was probably deep in the emerge logs and the leftovers in |
46 |
> /var/tmp/portage (-> you should not these down before you shut down if |
47 |
> that's a tmpfs ...) |
48 |
> |
49 |
> I think something about this should be done / documented. |
50 |
> |
51 |
> Luckily, it was no big deal, as I did a switch to gcc-7.2 / -pie at |
52 |
> the same time, so I ran my "check-pie" script (pie-only check |
53 |
> extracted from checksec) to find the packages that (might) need a |
54 |
> recompile. I've just a few biggies leftover to compile and a couple I |
55 |
> want to mess with. But those have updates pending anyway. So, I'm |
56 |
> about done. |
57 |
> |
58 |
> BTW: in the process, I've collected binaries/packages that won't get |
59 |
> compiled as pie... e.g. gcc itself, grub and most (all?) haskell |
60 |
> stuff. ATM, it's a pretty badly ad-hoc script, but I could amend that. |
61 |
> Or at least share the list of "known non-pie-able" binaries, I guess. |
62 |
> Hm. One could also add an output that can be fed to emerge via xargs. |
63 |
> |
64 |
> -dnh |
65 |
> |
66 |
> -- |
67 |
> "As a sysadmin, I suppose you're familiar with something called a |
68 |
> 'worst-case scenario'?" |
69 |
> "Isn't that what we call, "having a good day for a change"?" |
70 |
> (Rik Steenwinkel and Graham Reed) |
71 |
> |
72 |
> |
73 |
|
74 |
I have a script for "-e" : |
75 |
|
76 |
|
77 |
#! /bin/bash |
78 |
LOG=/tmp/update.log |
79 |
date > $LOG |
80 |
echo ---- ---- Starting... >> $LOG |
81 |
|
82 |
#looking for active gcc |
83 |
N=1 |
84 |
A=`gcc-config -c` |
85 |
B=$A |
86 |
while [ $B != `echo $B | sed s/-//` ] |
87 |
do |
88 |
N=$(( $N + 1 )) |
89 |
B=`echo $B | sed s/-//` |
90 |
done |
91 |
A=`echo $A | cut -d- -f$N-` |
92 |
GCC_VER=`equery l sys-devel/gcc | grep $A` |
93 |
|
94 |
nice -n 10 emerge -1v --keep-going --quiet-build =$GCC_VER |
95 |
sys-devel/libtool 1>> $LOG 2>> $LOG && \ |
96 |
nice -n 10 emerge -1v --keep-going --quiet-build dev-libs/glib |
97 |
sys-libs/glibc 1>> $LOG 2>> $LOG && \ |
98 |
nice -n 10 emerge -1vb --keep-going --quiet-build =$GCC_VER |
99 |
sys-devel/libtool 1>> $LOG 2>> $LOG && \ |
100 |
nice -n 10 emerge -vbe --keep-going --quiet-build world 1>> $LOG 2>> $LOG |
101 |
echo ---- ---- Resuming... >> $LOG |
102 |
nice -n 10 emerge -vb --resume --keep-going --quiet-build 1>> $LOG 2>> $LOG |
103 |
echo ---- ---- Resuming... >> $LOG |
104 |
nice -n 10 emerge -vb --resume --keep-going --quiet-build 1>> $LOG 2>> $LOG |
105 |
echo ---- ---- Resuming... >> $LOG |
106 |
nice -n 10 emerge -vb --resume --skip-first --keep-going --quiet-build 1>> |
107 |
$LOG 2>> $LOG |
108 |
echo ---- ---- Resuming... >> $LOG |
109 |
nice -n 10 emerge -vb --resume --keep-going --quiet-build 1>> $LOG 2>> $LOG |
110 |
echo ---- ---- Resuming... >> $LOG |
111 |
nice -n 10 emerge -vb --resume --skip-first --keep-going --quiet-build 1>> |
112 |
$LOG 2>> $LOG |
113 |
echo ---- ---- Finishing. >> $LOG |
114 |
date >> $LOG |
115 |
echo -n >> $LOG |
116 |
cat $LOG | mail -b -c -s "emerge -e results" your-email@your-domain |
117 |
|
118 |
|
119 |
|
120 |
This usually ends up with too many resumes, but at least it gets to the end |
121 |
of the builds as deep as possible. |
122 |
|
123 |
Please note the "-b" flag, as I keep binary packages for an emergency. |
124 |
|
125 |
Hope this helps, |
126 |
Francisco |