View previous topic :: View next topic |
Author |
Message |
petan n00b
Joined: 18 Jan 2016 Posts: 55
|
Posted: Thu Jan 28, 2016 3:22 pm Post subject: How to safely emerge -e @world |
|
|
I had corrupt ram on my system and there is a chance that some binaries I emerged in past contain errors (some of them even used to segfault until I re-built them). In order to make my system stable I would like to rebuild pretty much everything.
My problem is that I have more than 1200 packages that needs rebuild, that would probably take few days. Now the real issue is that emerge works like this:
1: download next package
2.. compile
3. install
4. go back to 1
If any of these steps fail for whatever reason, whole process is terminated.
Is there any way to tell emerge "rebuild world from last package where you failed and skip those you already rebuilt"?
That is what I need to, basically track somehow what already was rebuilt and don't rebuild it again. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Thu Jan 28, 2016 3:37 pm Post subject: |
|
|
You might want to check about the --keep-going option of emerge. Quote: | $ man emerge | sed -n '/--keep-going/,/^$/p' | So even if one package fails, emerge would continue emerging @world. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Thu Jan 28, 2016 3:55 pm Post subject: |
|
|
You could do something like:
Code: | # emerge -e --keep-going world |
or:
Code: | # emerge -e world || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done |
(See man emerge for details of --keep-going, --resume and --skipfirst) _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Thu Jan 28, 2016 5:43 pm Post subject: |
|
|
petan,
On the good news front, there will be nothing to download unless you have emptied your distfiles directory.
Also, parallel-fetch has been the default for a long time now, so fetching carries on while building takes place.
You should use Code: | emerge @world -e --keep-going --with-bdeps | since you want to rebuild build time only dependencies too.
Be aware of the difference between --keep-going and --resume --skipfirst.
When a package fails, --keep-going drops the failed packages and any packages that depend on it, then keeps going.
You get a list of issues at the end.
You can only use --resume --skipfirst after a build fail and it drops only the package that failed.
You might want to consider --jobs= too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Jan 29, 2016 9:28 am Post subject: |
|
|
NeddySeagoon wrote: | You should use
emerge @world -e --keep-going --with-bdeps
since you want to rebuild build time only dependencies too. |
Good catch. I forgot to mention '--with-bdeps=y' as I have it declared in EMERGE_DEFAULT_OPTS in /etc/portage/make.conf.
In my view this is another good example of why '--with-bdeps=y' should be the default instead of '--with-bdeps=n' (as discussed in another recent thread: Is --with-bdeps=y generally recommended?). It's too easy to overlook. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Jan 29, 2016 9:38 am Post subject: |
|
|
NeddySeagoon wrote: | You should use Code: | emerge @world -e --keep-going --with-bdeps |
|
or just Code: | emerge @world @system -e --keep-going | ? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Jan 29, 2016 12:17 pm Post subject: |
|
|
ok, so then --with-bdeps isn't necessary at all |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Jan 29, 2016 12:33 pm Post subject: |
|
|
toralf wrote: | ok, so then --with-bdeps isn't necessary at all |
Why? Presumably some of the packages in the OP's @world set could have build-time dependencies that are not in the @system set, in which case adding '--with-bdeps=y' would cause those to be rebuilt too. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Jan 29, 2016 1:30 pm Post subject: |
|
|
but "-e" covers IMO all (even built-time dep) packages, or ? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Jan 29, 2016 3:16 pm Post subject: |
|
|
You could very well be correct (I'm no expert in Portage). man emerge shows the following for the two options:
Quote: | --with-bdeps < y | n >
In dependency calculations, pull in build time dependencies that are not strictly required. This defaults to ´n´ for installation actions, meaning they will not be installed, and ´y´ for the --depclean action, meaning they will not be removed. This setting can be added to EMERGE_DEFAULT_OPTS (see make.conf(5)) and later overridden via the command line. |
Quote: | --emptytree (-e)
Reinstalls target atoms and their entire deep dependency tree, as though no packages are currently installed. You should run this with --pretend first to make sure the result is what you expect. |
I suppose '--with-bdeps=y' might be a subset of '--emptytree', but I don't know if 'build-time dependencies that are not strictly required' is fully covered by 'entire deep dependency tree'. Hopefully someone who knows Portage inside out will chime in. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
|