1 |
On Sunday 14 January 2007 13:22, Iván Pérez Domínguez |
2 |
<ivanperezdominguez@×××××.com> wrote about '[gentoo-user] Telling emerge |
3 |
to continue when something goes wrong': |
4 |
> After installing Gentoo in different machines several times, I wonder if |
5 |
> is there any way to tell emerge to keep installing as much as possible |
6 |
> even when something goes wrong. |
7 |
|
8 |
No, there's not. But, there is a way to emerge to restart either from the |
9 |
package where it errored out (emerge --resume), or on the next package |
10 |
(emerge --resume --skipfirst). |
11 |
|
12 |
Since emerge is a somewhat well-behaved program, it if fails it will exit |
13 |
with a non-zero exit code. With that knowledge in hand it's easy to have |
14 |
your shell restart things. The following (all one line) should work in |
15 |
any POSIX-compliant shell: |
16 |
|
17 |
emerge --some-options a-bunch/of-packages || while ! |
18 |
emerge --resume --skipfirst; do :; done |
19 |
|
20 |
I've also attached a longer system update script that I use, for reference. |
21 |
|
22 |
In general, it's best for a program to bail out if it discovers it can't do |
23 |
everything you asked, and not do it "half-way". The only program that |
24 |
even provides a "keep going" option is make, and all the uses I've seen of |
25 |
that option are abuses. |
26 |
|
27 |
-- |
28 |
"If there's one thing we've established over the years, |
29 |
it's that the vast majority of our users don't have the slightest |
30 |
clue what's best for them in terms of package stability." |
31 |
-- Gentoo Developer Ciaran McCreesh |