Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]emerge -e world twice?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Wed Sep 07, 2005 7:09 am    Post subject: [SOLVED]emerge -e world twice? Reply with quote

hi, I didn't find on my own, so let me ask you why emerge -e world twice is necesary?

I'm doing a
Code:
emerge -e system
emerge -e system
emerge -e world   <-- I'm here ;)
emerge -e world


I think (correct me if I'm wrong) it is necessary to emerge -e system twice, because in that way, the second time the compiler (gcc ?) is the optimized one(it just became "optimized" from the first emerge -e system

I don't see any reason to do it also twice for the emerge -e world ?

Could you explain this to me, please?


Last edited by truc on Wed Sep 07, 2005 4:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Wed Sep 07, 2005 7:14 am    Post subject: Reply with quote

I don't know why people like to do that. I think it is crazy overkill. This is what I do:

Code:
emerge gcc

gcc-config -l  # make sure it is using the gcc I just emerged, otherwise adjust manually
env-update; source /etc/profile

emerge linux-headers; emerge glibc ; emerge gettext; emerge binutils; emerge gcc

emerge -e world || until emerge --resume --skipfirst; do date; done

This way gcc gets built three times, other important toolchain packages get built twice, and everything else gets built once. Perfect.
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Wed Sep 07, 2005 7:42 am    Post subject: Reply with quote

ok, I think it's a lot quicker!

So gcc, linux-headers, glibc , gettext, binutils are the important package?

They are using each other to compile, right? that's why you emerge manually gcc a second time?

Code:
emerge linux-headers; emerge glibc ; emerge gettext; emerge binutils; emerge gcc



----------------------------------


Hum, even if I will do it this way from now, I'd like you to confirm (or not:) ) that emerging -e world twice is useless then (assuming doing
Code:
emerge -e system
emerge -e system
is a time consuming way of doing what you do by simply run
Code:
 emerge gcc
gcc-config
emerge linux-headers; emerge glibc ; emerge gettext; emerge binutils; emerge gcc
)

----------------------------------

And...

Code:
emerge -e world || until emerge --resume --skipfirst


|| until emerge --resume --skipfirst I don't really understand, and man emerge doesn't really help me, I now know what skipfirst means for emerge, but I still don't get it, and why until

Sorry for being what my status says I am...
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Wed Sep 07, 2005 7:52 am    Post subject: Reply with quote

truc wrote:
ok, I think it's a lot quicker!

So gcc, linux-headers, glibc , gettext, binutils are the important package?

Yep, for the most part.
Quote:
They are using each other to compile, right? that's why you emerge manually gcc a second time?

Yeah, gcc uses them so it's nice to rebuild gcc immediately after they've been rebuilt.

Quote:
Code:
emerge linux-headers; emerge glibc ; emerge gettext; emerge binutils; emerge gcc

Hum, even if I will do it this way from now, I'd like you to confirm (or not:) ) that emerging -e world twice is useless then (assuming doing
Code:
emerge -e system
emerge -e system
is a time consuming way of doing what you do by simply run
Code:
 emerge gcc
gcc-config
emerge linux-headers; emerge glibc ; emerge gettext; emerge binutils; emerge gcc
)

I wouldn't call the second emerge -e world `useless' -- it is a good way to stress-test and prove that you have a healthy system.

But I call it `overkill' -- as in "really not necessary".

Quote:
And...

Code:
emerge -e world || until emerge --resume --skipfirst


|| until emerge --resume --skipfirst I don't really understand, and man emerge doesn't really help me, I now know what skipfirst means for emerge, but I still don't get it, and why until

The:
Code:
|| until emerge --resume --skipfirst; do date; done

Is just a bash loop. Bascially, *IF* the emerge -e world fails, then the || (which means "OR") will cause the until loop to start.

The until loop will run "emerge --resume --skipfirst" as the test condition. *IF* that failed, then "date" will be run (which is just a placeholder command, and not important) and the until loop will start again.

This way -- regardless of how many packages fail to compile -- emerge will always begin again and continue on to the next package (that's what --resume --skipfirst means).
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Wed Sep 07, 2005 8:03 am    Post subject: Reply with quote

Thanks so much Dlareh, I am almost ready to mark it as SOLVED ;) but...

Quote:
This way -- regardless of how many packages fail to compile -- emerge will always begin again and continue on to the next package (that's what --resume --skipfirst means)


That was almost what I did understand, but what about the package that failed to compile?
1) how can you know which are these(s) package(s) once all is finished?
2) when you know 1) do you have to manually *try* to emerge them?
3) and finally for the
Code:
 do date
, where will you read it? emerge.log?
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Wed Sep 07, 2005 8:48 am    Post subject: Reply with quote

truc wrote:
Thanks so much Dlareh, I am almost ready to mark it as SOLVED ;) but...

Quote:
This way -- regardless of how many packages fail to compile -- emerge will always begin again and continue on to the next package (that's what --resume --skipfirst means)


That was almost what I did understand, but what about the package that failed to compile?
1) how can you know which are these(s) package(s) once all is finished?

Unfortunately there is no easy fix to report such failures. But usually they will show up in a subsequent emerge -uD world
Quote:
2) when you know 1) do you have to manually *try* to emerge them?

Yes, and then ask for help on these forums (possibly posting to https://bugs.gentoo.org if we determine that it is a bug)
Quote:
3) and finally for the
Code:
 do date
, where will you read it? emerge.log?

Well it's really just a placeholder. It could just as easily be "do true" or somesuch (which according to the 'true' manpage "does nothing, successfully" )

But I do sometimes notice the date if I pipe the emerge output through tee and look back.

I suppose I could script up something sort of like this:
Code:
{ emerge -e world 2>&1 || until emerge --resume --skipfirst 2>&1 ; do date; echo SOMETHING JUST FAILED; done; } | tee -a /tmp/massive_emerge_log
grep --color=always -B20 "SOMETHING JUST FAILED" /tmp/massive_emerge_log | less -R

But I've never bothered ;)
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?


Last edited by Dlareh on Wed Sep 07, 2005 10:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
RuiP
l33t
l33t


Joined: 15 Jan 2005
Posts: 643

PostPosted: Wed Sep 07, 2005 8:57 am    Post subject: Reply with quote

hi,
emerge -e world twice is a little paranoic in fact...
but you can read some arguments in favour (and why do it) here:
https://forums.gentoo.org/viewtopic-t-355125.html
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Wed Sep 07, 2005 4:35 pm    Post subject: Reply with quote

RuiP wrote:
hi,
emerge -e world twice is a little paranoic in fact...
but you can read some arguments in favour (and why do it) here:
https://forums.gentoo.org/viewtopic-t-355125.html


hum.. interesting.. I still didn't make up my mind :?

Since I have no monitor for now(and won't haveone before a week)and I'm connecting with ssh , I think I gonna choose the loonnng and redondant way, I don't mind loosing time on that computer, since that's all he can do for me for now


Thank you all ;)
Back to top
View user's profile Send private message
heavyt
Guru
Guru


Joined: 03 Mar 2003
Posts: 498
Location: Matrix (Washington,DC)

PostPosted: Wed Sep 07, 2005 8:05 pm    Post subject: Reply with quote

Quote:
But I do sometimes notice the date if I pipe the emerge output through tee and look back.

I suppose I could script up something sort of like this:
Code:
{ emerge -e world 2>&1 || until emerge --resume --skipfirst 2>&1 ; do date; echo SOMETHING JUST FAILED; done; } | tee -a /tmp/massive_emerge_log
grep --color=always -B20 "SOMETHING JUST FAILED" /tmp/massive_emerge_log | less

But I've never bothered ;)

I am giving your script a try. :)
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Sep 08, 2005 4:48 pm    Post subject: Reply with quote

wo!! I would like to know how big the tmp/massive_emerge_log will be..;)
Back to top
View user's profile Send private message
heavyt
Guru
Guru


Joined: 03 Mar 2003
Posts: 498
Location: Matrix (Washington,DC)

PostPosted: Thu Sep 08, 2005 8:54 pm    Post subject: Reply with quote

Yes it was 40 mbs and growing when I had a change of heart and it. :o

I wanted it to give out only the fail emerge, should have look at it harder.
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Thu Sep 08, 2005 10:44 pm    Post subject: Reply with quote

heavyt wrote:
Yes it was 40 mbs and growing when I had a change of heart and it. :o

I wanted it to give out only the fail emerge, should have look at it harder.

Well the grep will do that; you can delete the massive_emerge_log whenever you want.

I'm still trying to think of a better way.. but I think it might involve using named pipes or fancy stuff like that I'm not super familiar with.
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum