Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

"Pause" feature for emerge

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
15 posts • Page 1 of 1
Author
Message
gspr
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 127
Joined: Sat Sep 07, 2002 12:22 pm

"Pause" feature for emerge

  • Quote

Post by gspr » Thu Jun 30, 2005 1:36 pm

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.
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Thu Jun 30, 2005 1:40 pm

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
Top
BlackEdder
Advocate
Advocate
User avatar
Posts: 2588
Joined: Mon Apr 26, 2004 8:47 am
Location: Dutch enclave in Egham, UK
Contact:
Contact BlackEdder
Website

  • Quote

Post by BlackEdder » Fri Jul 01, 2005 11:34 am

I guess with completely transparent he means that you can savely leave xorg running while emerging xorg. :D
Top
russianpirate
Veteran
Veteran
User avatar
Posts: 1167
Joined: Sun Sep 26, 2004 2:47 am
Location: Detroit, MI

  • Quote

Post by russianpirate » Fri Jul 01, 2005 12:22 pm

That is like saying can I use a new kernel when my old one is loaded. :)
Top
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

  • Quote

Post by andrewd18 » Fri Jul 01, 2005 3:09 pm

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
Top
allucid
Veteran
Veteran
Posts: 1314
Joined: Sat Nov 02, 2002 6:27 pm
Location: atlanta

  • Quote

Post by allucid » Fri Jul 01, 2005 8:26 pm

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.
Top
arnvidr
l33t
l33t
User avatar
Posts: 629
Joined: Thu Aug 19, 2004 7:07 pm
Location: Oslo, Norway

  • Quote

Post by arnvidr » Wed Jul 06, 2005 8:00 pm

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?
Top
adaptr
Watchman
Watchman
User avatar
Posts: 6730
Joined: Sun Oct 06, 2002 1:28 pm
Location: Rotterdam, Netherlands

  • Quote

Post by adaptr » Thu Jul 07, 2005 11:59 am

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
Top
ChojinDSL
l33t
l33t
Posts: 784
Joined: Mon Jul 07, 2003 11:38 am
Contact:
Contact ChojinDSL
Website

  • Quote

Post by ChojinDSL » Thu Jul 07, 2005 11:20 pm

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.
Top
GentooBox
Veteran
Veteran
User avatar
Posts: 1168
Joined: Sun Jun 22, 2003 10:52 am
Location: Denmark

  • Quote

Post by GentooBox » Thu Jul 07, 2005 11:48 pm

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
Top
arnvidr
l33t
l33t
User avatar
Posts: 629
Joined: Thu Aug 19, 2004 7:07 pm
Location: Oslo, Norway

  • Quote

Post by arnvidr » Fri Jul 08, 2005 4:44 pm

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...
Top
dundas
Guru
Guru
User avatar
Posts: 317
Joined: Thu Dec 16, 2004 6:28 am
Location: China, Earth

  • Quote

Post by dundas » Sat Jul 23, 2005 4:21 pm

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
Top
djh-world
Apprentice
Apprentice
User avatar
Posts: 281
Joined: Sun Jan 04, 2004 6:52 pm
Location: Nottingham, UK

  • Quote

Post by djh-world » Sat Jul 23, 2005 4:32 pm

You could always use the handy GNU Screen.

Start the emerge in a screen session, then detach it, exit X then just re attach it.

No need for a pause.
djh-solutions :: freelance web design | solution provider
Top
djm
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 690
Joined: Mon Apr 12, 2004 1:00 pm
Location: Wadham College, Oxford

  • Quote

Post by djm » Sun Jul 24, 2005 10:39 am

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
Top
peterton
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Wed Aug 20, 2003 10:00 am
Contact:
Contact peterton
Website

How I resumed my openoffice-ximian build

  • Quote

Post by peterton » Wed Sep 28, 2005 2:21 pm

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: Select all

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: Select all

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: Select all

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.
Top
Post Reply
  • Print view

15 posts • Page 1 of 1

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy