* [gentoo-user] Telling emerge to continue when something goes wrong
@ 2007-01-14 19:22 Iván Pérez Domínguez
2007-01-14 20:34 ` Alex Schuster
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Iván Pérez Domínguez @ 2007-01-14 19:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
Hi,
After installing Gentoo in different machines several times, I wonder if
is there any way to tell emerge to keep installing as much as possible
even when something goes wrong.
Here's an example:
emerge stuff1 stuff2 stuff3
emerge says "the following packages will be emerged" and so on.
Alright. Then stuff1 fails to compile. I'd like emerge to continue
trying to install stuff2 and stuff3 when possible.
I know I could write several emerges in different lines (something like
emerge stuff1; emerge stuff2; emerge stuff3), I just feel like this
feature should have an option of its own in emerge (i.e.
--keep-going-as-far-as-possible).
This could be very handy when updating world or, in general, when the
emerge is going to take a lot of time and you decide to leave, expecting
everything to be merged when you come back.
I'm posting this here before going to gentoo-portage-dev or other list
to know what you think and to try to write a better suggestion.
Cheers,
Ivan.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3894 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-14 19:22 [gentoo-user] Telling emerge to continue when something goes wrong Iván Pérez Domínguez
@ 2007-01-14 20:34 ` Alex Schuster
2007-01-14 22:22 ` Iván Pérez Domínguez
2007-01-15 0:45 ` Iain Buchanan
2007-01-15 0:15 ` Boyd Stephen Smith Jr.
2007-01-16 1:53 ` Bo Ørsted Andresen
2 siblings, 2 replies; 13+ messages in thread
From: Alex Schuster @ 2007-01-14 20:34 UTC (permalink / raw
To: gentoo-user
Iván Pérez Domínguez writes:
> After installing Gentoo in different machines several times, I wonder if
> is there any way to tell emerge to keep installing as much as possible
> even when something goes wrong.
Sure there is. Have a look at the emerge man page, there 's lots uf useful
information. portage also has a nice man page.
> emerge stuff1 stuff2 stuff3
>
> emerge says "the following packages will be emerged" and so on.
>
> Alright. Then stuff1 fails to compile. I'd like emerge to continue
> trying to install stuff2 and stuff3 when possible.
emerge --resume --skipfirst
This resumes the last emerge, skipping the first package. Leave
the --skipfirst to try again. I like to use "FEATURES=keepwork
emerge --resume" to resume an interrupted emerge without restarting from
scratch, but this feature seems to be broken at the moment.
> I know I could write several emerges in different lines (something like
> emerge stuff1; emerge stuff2; emerge stuff3), I just feel like this
> feature should have an option of its own in emerge (i.e.
> --keep-going-as-far-as-possible).
Maybe, but on the other hand it's a little bash one-liner.
> This could be very handy when updating world or, in general, when the
> emerge is going to take a lot of time and you decide to leave, expecting
> everything to be merged when you come back.
This will emerge world and continue after every error, skipping that
package:
emerge world -u || while ! emerge --resume --skipfirst; do :; done
Alex
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-14 20:34 ` Alex Schuster
@ 2007-01-14 22:22 ` Iván Pérez Domínguez
2007-01-15 0:45 ` Iain Buchanan
1 sibling, 0 replies; 13+ messages in thread
From: Iván Pérez Domínguez @ 2007-01-14 22:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2295 bytes --]
Alex Schuster wrote:
> Iván Pérez Domínguez writes:
>
>> After installing Gentoo in different machines several times, I wonder if
>> is there any way to tell emerge to keep installing as much as possible
>> even when something goes wrong.
>
> Sure there is. Have a look at the emerge man page, there 's lots uf useful
> information. portage also has a nice man page.
I just read both (and make.conf as well). Maybe I missed something, but
I think that suggestion has not been implemented so far.
>
>
>> emerge stuff1 stuff2 stuff3
>>
>> emerge says "the following packages will be emerged" and so on.
>>
>> Alright. Then stuff1 fails to compile. I'd like emerge to continue
>> trying to install stuff2 and stuff3 when possible.
>
> emerge --resume --skipfirst
> This resumes the last emerge, skipping the first package. Leave
> the --skipfirst to try again.
This one I already knew.
> I like to use "FEATURES=keepwork
> emerge --resume" to resume an interrupted emerge without restarting from
> scratch, but this feature seems to be broken at the moment.
>
>> I know I could write several emerges in different lines (something like
>> emerge stuff1; emerge stuff2; emerge stuff3), I just feel like this
>> feature should have an option of its own in emerge (i.e.
>> --keep-going-as-far-as-possible).
>
> Maybe, but on the other hand it's a little bash one-liner.
I don't get your point here, sorry.
>
>> This could be very handy when updating world or, in general, when the
>> emerge is going to take a lot of time and you decide to leave, expecting
>> everything to be merged when you come back.
>
> This will emerge world and continue after every error, skipping that
> package:
> emerge world -u || while ! emerge --resume --skipfirst; do :; done
>
> Alex
>
As I said before, the line above (emerge a; emerge b; emerge c;) could
work as well. The main point is that, in my opinion, that feature should
be included in emerge itself.
Your line has a problem: it won't skip the first package in your line,
it will skip only the first package to be emerged, which may be a
required dependency to build another package, propagating an error in
one compilation to later compilations. Even worse, some package could
get installed without one of its dependencies.
Ivan.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3894 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-14 20:34 ` Alex Schuster
2007-01-14 22:22 ` Iván Pérez Domínguez
@ 2007-01-15 0:45 ` Iain Buchanan
1 sibling, 0 replies; 13+ messages in thread
From: Iain Buchanan @ 2007-01-15 0:45 UTC (permalink / raw
To: gentoo-user
On Sun, 2007-01-14 at 21:34 +0100, Alex Schuster wrote:
> Iván Pérez Domínguez writes:
>
> > After installing Gentoo in different machines several times, I wonder if
> > is there any way to tell emerge to keep installing as much as possible
> > even when something goes wrong.
>
> Sure there is. Have a look at the emerge man page, there 's lots uf useful
> information. portage also has a nice man page.
> emerge --resume --skipfirst
--skipfirst requires manual intervention after emerge has failed. I
think the OP is asking for something that just continues without
intervention.
You would, of course want this command to be nice to dependencies,
otherwise you'll break something. I've often wondered about such a
feature during emerge world. Especially when it breaks in the first few
packages. In a case like this (indent showing dependencies):
pkg-a
pkg-b
pkg-c
pkg-d
emerge would build in the order pkg-b pkg-a pkg-d pkg-c. If emerge
fails during pkg-b, whats to stop it continuing at pkg-d and then pkg-c?
cya,
--
Iain Buchanan <iaindb at netspace dot net dot au>
Never trust anyone who says money is no object.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-14 19:22 [gentoo-user] Telling emerge to continue when something goes wrong Iván Pérez Domínguez
2007-01-14 20:34 ` Alex Schuster
@ 2007-01-15 0:15 ` Boyd Stephen Smith Jr.
2007-01-15 0:47 ` Iain Buchanan
[not found] ` <45AAD3F6.6010309@gmail.com>
2007-01-16 1:53 ` Bo Ørsted Andresen
2 siblings, 2 replies; 13+ messages in thread
From: Boyd Stephen Smith Jr. @ 2007-01-15 0:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1: Type: text/plain, Size: 1459 bytes --]
On Sunday 14 January 2007 13:22, Iván Pérez Domínguez
<ivanperezdominguez@gmail.com> wrote about '[gentoo-user] Telling emerge
to continue when something goes wrong':
> After installing Gentoo in different machines several times, I wonder if
> is there any way to tell emerge to keep installing as much as possible
> even when something goes wrong.
No, there's not. But, there is a way to emerge to restart either from the
package where it errored out (emerge --resume), or on the next package
(emerge --resume --skipfirst).
Since emerge is a somewhat well-behaved program, it if fails it will exit
with a non-zero exit code. With that knowledge in hand it's easy to have
your shell restart things. The following (all one line) should work in
any POSIX-compliant shell:
emerge --some-options a-bunch/of-packages || while !
emerge --resume --skipfirst; do :; done
I've also attached a longer system update script that I use, for reference.
In general, it's best for a program to bail out if it discovers it can't do
everything you asked, and not do it "half-way". The only program that
even provides a "keep going" option is make, and all the uses I've seen of
that option are abuses.
--
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh
[-- Attachment #1.2: sys-update --]
[-- Type: application/x-shellscript, Size: 758 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-15 0:15 ` Boyd Stephen Smith Jr.
@ 2007-01-15 0:47 ` Iain Buchanan
[not found] ` <45AAD3F6.6010309@gmail.com>
1 sibling, 0 replies; 13+ messages in thread
From: Iain Buchanan @ 2007-01-15 0:47 UTC (permalink / raw
To: gentoo-user
On Sun, 2007-01-14 at 18:15 -0600, Boyd Stephen Smith Jr. wrote:
> On Sunday 14 January 2007 13:22, Iván Pérez Domínguez
> <ivanperezdominguez@gmail.com> wrote about '[gentoo-user] Telling emerge
> to continue when something goes wrong':
> > After installing Gentoo in different machines several times, I wonder if
> > is there any way to tell emerge to keep installing as much as possible
> > even when something goes wrong.
>
> No, there's not. But, there is a way to emerge to restart either from the
> package where it errored out (emerge --resume), or on the next package
> (emerge --resume --skipfirst).
I should add that --skipfirst is sometimes "bad" because it ignores
dependencies. If you let emerge do it, then you could only resume
packages whose dependencies were satisfied.
cya,
--
Iain Buchanan <iaindb at netspace dot net dot au>
When a fellow says, "It ain't the money but the principle of the thing,"
it's the money.
-- Kim Hubbard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <45AAD3F6.6010309@gmail.com>]
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
[not found] ` <45AAD3F6.6010309@gmail.com>
@ 2007-01-15 1:36 ` Boyd Stephen Smith Jr.
2007-01-15 9:04 ` Jakob
2007-01-15 12:34 ` Bo Ørsted Andresen
0 siblings, 2 replies; 13+ messages in thread
From: Boyd Stephen Smith Jr. @ 2007-01-15 1:36 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
On Sunday 14 January 2007 19:08, Iván Pérez Domínguez
<ivanperezdominguez@gmail.com> wrote about 'Re: [gentoo-user] Telling
emerge to continue when something goes wrong':
> Boyd Stephen Smith Jr. wrote:
> > I've also attached a longer system update script that I use, for
> > reference.
>
> I've been taking a look at the script. I wonder why using emerge --sync
> at the beginning and update-eix at the end instead of an eix-sync.
I want the information returned by eix after the script completes to take
into account the package updates that may occur during the portage or
world updates. I also want those updates to take into account the most
recent portage tree. So, I need a sync operation before the updates and a
eix-update after them. Thus, I can't combine the two operations into a
single eix-sync.
--
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-15 1:36 ` Boyd Stephen Smith Jr.
@ 2007-01-15 9:04 ` Jakob
2007-01-15 9:42 ` Ivan Perez
2007-01-15 12:34 ` Bo Ørsted Andresen
1 sibling, 1 reply; 13+ messages in thread
From: Jakob @ 2007-01-15 9:04 UTC (permalink / raw
To: gentoo-user
On 1/15/07, Boyd Stephen Smith Jr. <bss03@volumehost.net> wrote:
> On Sunday 14 January 2007 19:08, Iván Pérez Domínguez
> <ivanperezdominguez@gmail.com> wrote about 'Re: [gentoo-user] Telling
> emerge to continue when something goes wrong':
> > Boyd Stephen Smith Jr. wrote:
> > > I've also attached a longer system update script that I use, for
> > > reference.
> >
> > I've been taking a look at the script. I wonder why using emerge --sync
> > at the beginning and update-eix at the end instead of an eix-sync.
>
> I want the information returned by eix after the script completes to take
> into account the package updates that may occur during the portage or
> world updates. I also want those updates to take into account the most
> recent portage tree. So, I need a sync operation before the updates and a
> eix-update after them. Thus, I can't combine the two operations into a
> single eix-sync.
>
> --
> "If there's one thing we've established over the years,
> it's that the vast majority of our users don't have the slightest
> clue what's best for them in terms of package stability."
> -- Gentoo Developer Ciaran McCreesh
>
>
>
Hi,
have a look at this
http://www.gentoolinux.org/news/en/gwn/20061204-newsletter.xml section
3, maybe its what you want or you could modify it to suit your needs.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-15 1:36 ` Boyd Stephen Smith Jr.
2007-01-15 9:04 ` Jakob
@ 2007-01-15 12:34 ` Bo Ørsted Andresen
2007-01-15 12:56 ` Boyd Stephen Smith Jr.
1 sibling, 1 reply; 13+ messages in thread
From: Bo Ørsted Andresen @ 2007-01-15 12:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 791 bytes --]
On Monday 15 January 2007 02:36, Boyd Stephen Smith Jr. wrote:
> > I've been taking a look at the script. I wonder why using emerge --sync
> > at the beginning and update-eix at the end instead of an eix-sync.
>
> I want the information returned by eix after the script completes to take
> into account the package updates that may occur during the portage or
> world updates. I also want those updates to take into account the most
> recent portage tree. So, I need a sync operation before the updates and a
> eix-update after them. Thus, I can't combine the two operations into a
> single eix-sync.
Hmm.. maybe you think eix behaves like esearch. eix always looks in the vdb so
whether you run update-eix before or after an upgrade is irrelevant..
--
Bo Andresen
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Telling emerge to continue when something goes wrong
2007-01-14 19:22 [gentoo-user] Telling emerge to continue when something goes wrong Iván Pérez Domínguez
2007-01-14 20:34 ` Alex Schuster
2007-01-15 0:15 ` Boyd Stephen Smith Jr.
@ 2007-01-16 1:53 ` Bo Ørsted Andresen
2 siblings, 0 replies; 13+ messages in thread
From: Bo Ørsted Andresen @ 2007-01-16 1:53 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
On Sunday 14 January 2007 20:22, Iván Pérez Domínguez wrote:
> I'm posting this here before going to gentoo-portage-dev or other list
> to know what you think and to try to write a better suggestion.
There is a bug open for this.
https://bugs.gentoo.org/show_bug.cgi?id=12768
--
Bo Andresen
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-01-16 1:59 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-14 19:22 [gentoo-user] Telling emerge to continue when something goes wrong Iván Pérez Domínguez
2007-01-14 20:34 ` Alex Schuster
2007-01-14 22:22 ` Iván Pérez Domínguez
2007-01-15 0:45 ` Iain Buchanan
2007-01-15 0:15 ` Boyd Stephen Smith Jr.
2007-01-15 0:47 ` Iain Buchanan
[not found] ` <45AAD3F6.6010309@gmail.com>
2007-01-15 1:36 ` Boyd Stephen Smith Jr.
2007-01-15 9:04 ` Jakob
2007-01-15 9:42 ` Ivan Perez
2007-01-15 12:34 ` Bo Ørsted Andresen
2007-01-15 12:56 ` Boyd Stephen Smith Jr.
2007-01-15 13:09 ` Bo Ørsted Andresen
2007-01-16 1:53 ` Bo Ørsted Andresen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox