| View previous topic :: View next topic |
| Author |
Message |
gspr Tux's lil' helper


Joined: 07 Sep 2002 Posts: 127
|
Posted: Thu Jun 30, 2005 1:36 pm Post subject: "Pause" feature for emerge |
|
|
I don't know if this has been proposed already, but wouldn't a pause feature for emerge be nice?
Take for instance upgrading the Xorg package, or some other intrusive upgrade. Wouldn't it be nice if one could pass a --pause to emerge that would cause it to stop just before copying in all the files from the image directory, and wait for user confirmation to procede? This would allow for users to for example exit Xorg before changes are actually made to the system. _________________ "People said I should accept the world. Bullshit! I don't accept the world." -- RMS.
"We are to admit no more causes of natural things than such as are both true and sufficient to explain their appearances." -- Newton. |
|
| Back to top |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Jun 30, 2005 1:40 pm Post subject: |
|
|
This is not necessary - all emerge upgrades that do not require a restart to take effect are completely transparent.
If you want to implement this now just run emerge with --buildonly; this causes the binary package to be built but not merged.
To pause an emerge just pause it; ctrl-z to stop the process, fg to restart it. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
| Back to top |
|
 |
BlackEdder Advocate


Joined: 26 Apr 2004 Posts: 2586 Location: Dutch enclave in Egham, UK
|
Posted: Fri Jul 01, 2005 11:34 am Post subject: |
|
|
I guess with completely transparent he means that you can savely leave xorg running while emerging xorg.  |
|
| Back to top |
|
 |
russianpirate Veteran


Joined: 26 Sep 2004 Posts: 1167 Location: Detroit, MI
|
Posted: Fri Jul 01, 2005 12:22 pm Post subject: |
|
|
That is like saying can I use a new kernel when my old one is loaded.  |
|
| Back to top |
|
 |
andrewd18 Guru


Joined: 11 Apr 2004 Posts: 364 Location: Wisconsin, USA
|
Posted: Fri Jul 01, 2005 3:09 pm Post subject: |
|
|
That's right. The Unix filesystem is great that way... you can delete a file that's actually in use by a program, for example, an OOo text document. You can have it open in OOo, delete it with rm <filename>, and you can still make changes to it and save normally, in OOo.
Unix filesystems lock the file instead of removing it, so programs that already have it open can still modify it. Then, once no programs are using it, the file is completely removed.
So for example, you could upgrade X.org while running X.org... the old X.org build files will be locked, and then when you restart X, the old files will be unused (cuz the new one is now running), and within a few minutes, deleted.
~~ Andrew D. _________________ Keep Your Toolchain Stable! - emwrap.sh
There's no place like ::1 |
|
| Back to top |
|
 |
allucid Veteran

Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Fri Jul 01, 2005 8:26 pm Post subject: |
|
|
| russianpirate wrote: | That is like saying can I use a new kernel when my old one is loaded.  |
| adaptr wrote: | | This is not necessary - all emerge upgrades that do not require a restart to take effect are completely transparent. |
|
|
| Back to top |
|
 |
arnvidr Guru


Joined: 19 Aug 2004 Posts: 441 Location: Oslo, Norway
|
Posted: Wed Jul 06, 2005 8:00 pm Post subject: |
|
|
| adaptr wrote: | | To pause an emerge just pause it; ctrl-z to stop the process, fg to restart it. |
Is it possible to pause it, restart, and then emerge --resume or something? |
|
| Back to top |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Jul 07, 2005 11:59 am Post subject: |
|
|
Not directly, but if you use ccache the already-processed bits will not take much time to compile. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
| Back to top |
|
 |
ChojinDSL l33t

Joined: 07 Jul 2003 Posts: 783
|
Posted: Thu Jul 07, 2005 11:20 pm Post subject: |
|
|
| What would be really cool is if you could pause or hibernate an emerge, power off your pc, power it back on and then resume your emerge. Would be very useful in cases where something warrants a reboot, or if you had a laptop and need to unplug it for a while. |
|
| Back to top |
|
 |
GentooBox Veteran


Joined: 22 Jun 2003 Posts: 1168 Location: Denmark
|
Posted: Thu Jul 07, 2005 11:48 pm Post subject: |
|
|
well, you could use the keepwork and keeptemp features of emerge.
just put in:
FEATURES="keepwork keeptemp"
in make.conf
normally when you emerge something, it will put the files into /var/tmp/portage/<name> and when you stop the merge and restart it, it will delete the /var/tmp/portage/<name> folder and unpack the files from the tar files.
but with keepwork and keeptemp, the files will be there when you restart the merge and it will not compile the "pre"-compiled files unless you changed useflags.
the downside is that the files will take up huge amount of space after a while, so you should delete the folders manually when not needed. _________________ Encrypt, lock up everything and duct tape the rest |
|
| Back to top |
|
 |
arnvidr Guru


Joined: 19 Aug 2004 Posts: 441 Location: Oslo, Norway
|
Posted: Fri Jul 08, 2005 4:44 pm Post subject: |
|
|
| That won't do...at least for me. The only time I would need this if I can't let the computer sit and compile overnight, but the emerge isn't finished. I don't know how long it takes until after I've sync'ed anyway, and then I just go ahead no matter what... |
|
| Back to top |
|
 |
dundas Guru


Joined: 16 Dec 2004 Posts: 317 Location: China, Earth
|
Posted: Sat Jul 23, 2005 4:21 pm Post subject: |
|
|
| GentooBox wrote: | well, you could use the keepwork and keeptemp features of emerge.
just put in:
FEATURES="keepwork keeptemp"
in make.conf
normally when you emerge something, it will put the files into /var/tmp/portage/<name> and when you stop the merge and restart it, it will delete the /var/tmp/portage/<name> folder and unpack the files from the tar files.
but with keepwork and keeptemp, the files will be there when you restart the merge and it will not compile the "pre"-compiled files unless you changed useflags.
the downside is that the files will take up huge amount of space after a while, so you should delete the folders manually when not needed. |
This sounds great, so that I won't boil my computer overnight! hope it won't save other tmp files except the portage ones, thank you! _________________ Appreciate Gentoo: Best Devs, Best Forums. YOU could help too: Help Answer |
|
| Back to top |
|
 |
djh-world Apprentice


Joined: 04 Jan 2004 Posts: 281 Location: Nottingham, UK
|
|
| Back to top |
|
 |
djm Arch/Herd Tester


Joined: 12 Apr 2004 Posts: 690 Location: Wadham College, Oxford
|
Posted: Sun Jul 24, 2005 10:39 am Post subject: |
|
|
Surely keepwork/keeptemp only affect what happens when an emerge exits successfully
If it fails, nothing gets deleted from $PORTAGE_TMPDIR
Afaik there's no way of stopping emerge --resume from starting the current package from scratch (I might be wrong though), but you can do ebuild /usr/portage/cat-egory/package/package-ver.ebuild merge, and the merge of the package will be completed without starting again.
However, packages won't be added to your world file if you do this (note: that only normally happens if it's something you explicitly emerged, and not if it's only emerged as a dep), so you can do emerge -n package to add the package to your world file without re-compiling it.
ebuild .. merge only does one package though - anything that was supposed to be merged afterwards you'll need to ask to be emerged again (you could do emerge --resume --skipfirst, fex) _________________ the forums.gentoo.org poster formally known as metal leper |
|
| Back to top |
|
 |
peterton Tux's lil' helper


Joined: 20 Aug 2003 Posts: 110
|
Posted: Wed Sep 28, 2005 2:21 pm Post subject: How I resumed my openoffice-ximian build |
|
|
I know it's a bit of an old thread, but I thought I'd share my experiences anyway.
I wanted to build openoffice-ximian-1.3.16 on a machine which I couldn't leave powered on until the build was finished. I started the build like so:
| Code: | | PORTAGE_TMPDIR=/home emerge -Ov openoffice-ximian |
I wanted to use openoffice-ximian-bin in the meantime, therefore the -O. I have more space free on my /home partition, therefore the PORTAGE_TMPDIR=/home.
When it was time to leave, I'd CTRL+C and powered off. The next day I did:
| Code: | | FEATURES="keepwork keeptemp" PORTAGE_TMPDIR=/home emerge -Ov openoffice-ximian |
... but it gave me an error about not being able to write to a dir. I interrupted during the psprint project. In order to make it compile and continue, I needed:
| Code: | | while(true); do mkdir slo slb lib bin class misc obj inc 2>/dev/null; done |
This was executed in /home/portage/openoffice-ximian-1.3.16/work/OOo_1.1.5/psprint/unxlngi4.pro. |
|
| Back to top |
|
 |
|