Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to have interruptible builds?
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
battletroll
n00b
n00b


Joined: 16 Apr 2007
Posts: 13
Location: Mexico

PostPosted: Sat Sep 01, 2012 3:29 pm    Post subject: How to have interruptible builds? Reply with quote

Hi. Sometimes I'm compiling a package (such as libreoffice or icedtea) which take several hours to compile, want or need to shutdown my computer.
Right now, miy only option is to pause the compilation with Ctrl+Z and then put the machine to hibernate to be able to resume it after rebooting.
If I'm testing a new kernel and either the grub parameters or Tux on Ice were badly configured, though, several hours of compilation time are lost.

I found a parameter for emerge that forces it not to delete the files should installation finish - either because of an error or because I stop it or cancel it.
It also leaves the files in place even if the build succeeds (OK, so I have to clean them manually in that case). The problem is that I can stop a compilation with Ctrl+C, restart as needed and then resume it with a simple "make", but I cannot notify emerge that somehow the compilation phase just ended and the rest of the steps of an installation can continue.

Is there a set of parameters for that?

And yes, I know about the binary ebuilds - it's just I prefer being able to tweak everything to my heart's content. Though I'd like to be able to compile in doses, so to speak. I already use "nice -n 15" when installing such packages so I can watch movies or surf or whatever and the machine's still responsive. It's just sometimes I wish I could put the compilation to completely "rest", so to speak.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Sep 01, 2012 3:32 pm    Post subject: Reply with quote

You can restart the compile phase (or any other build phase) with the ebuild command. For instance, with libreoffice, I would use
Code:
ebuild `equery which libreoffice` compile
See "man ebuild" for the other phases.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Sep 01, 2012 3:44 pm    Post subject: Reply with quote

Having a large ccache might help too.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sat Sep 01, 2012 3:49 pm    Post subject: Reply with quote

Ant P.

ccache is a doubl edged sword. It speeds second and subsequent builds of the same code by delivering the results from a cache.
Its also the cause of many hard to find problems when it gets it wrong.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
grumblebear
Apprentice
Apprentice


Joined: 26 Feb 2008
Posts: 202

PostPosted: Sun Sep 02, 2012 8:57 pm    Post subject: Reply with quote

Try: FEATURES="keepwork" emerge --resume
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