Mailing List Archive

How to restart an emerge.
I thought I saw a thread on this, but can't find it in my personal mail
archives.

When I do an 'emerge -u world', sometimes there are 20 things or more that
need to be done. That's fine. I start it at work in the morning, but when
it's time to go home, it's still going, and going, and going...

If I CTRL+C, it stops the emerge, but when I start it up again with the same
command as above, it STARTS THE LAST COMPILE OVER from the
start/configure?!!! WTF? Should't it realize where it left off, and just
continue?

I tried 'emerge --resume', but that just never seems to do anything.
"nothing to be done".

Compiling some huge-ass program like KDELibs or KDEPIM may take hours. I
don't want to have made it be in vain. Please tell me there is some way to
continue the compilation and salvage all the "wear" on my poor notebook's
CPU/HD...

d


--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
On Thu, 14 Oct 2004 19:18:30 -0700
"Daevid Vincent" <daevid@daevid.com> wrote:

> I thought I saw a thread on this, but can't find it in my personal mail
> archives.
>
> When I do an 'emerge -u world', sometimes there are 20 things or more that
> need to be done. That's fine. I start it at work in the morning, but when
> it's time to go home, it's still going, and going, and going...
>
> If I CTRL+C, it stops the emerge, but when I start it up again with the same
> command as above, it STARTS THE LAST COMPILE OVER from the
> start/configure?!!! WTF? Should't it realize where it left off, and just
> continue?
>
> I tried 'emerge --resume', but that just never seems to do anything.
> "nothing to be done".
>
> Compiling some huge-ass program like KDELibs or KDEPIM may take hours. I
> don't want to have made it be in vain. Please tell me there is some way to
> continue the compilation and salvage all the "wear" on my poor notebook's
> CPU/HD...

why did you ctrl-c it in the first place?

seriously though, ctrl-c stops the process which in turn deletes the
build tree from inside /var/tmp/portage, so yes you must start that
package again.

if you want to stop it for a while to allow some processor time to your
important things like games, try ctrl-z. This stops the process, but
doesn't kill it. type fg to bring it back again.

emerge resume does not resume from the middle of an emerge - in fact it
skips the package that was stopped on the basis that it probably failed
due to a compile error, and lets you get on with the next in the list.

if you need to run other stuff while emerging consider the
PORTAGE_NICENESS keyword in /etc/make.conf. it allows portage to run at
a lower priority, which means full speed when nothing else is happenning,
but it will duck out of the way when something with normal priority is
running.



>
> d
>
>
> --
> gentoo-user@gentoo.org mailing list

--
Nick Rout <nick@rout.co.nz>


--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
> > I tried 'emerge --resume', but that just never seems to do anything.
> > "nothing to be done".

ebuild <path to last ebuild that was worked on> merge

should do the trick -- at least for the last package that was worked
on. To find the last ebuild that was worked on, check
/var/log/emerge.log... it'll be one of the last lines in the file.

After that, you should be able to just issue the original emerge
command, and it should pick up where it left off.

You might want to double-check the ebuild man page, though... I have a
feeling that 'merge' isn't quite right -- it's been a while since I've
done that.

--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
Nick Rout wrote:

>> emerge resume does not resume from the middle of an emerge - in fact it
>> skips the package that was stopped on the basis that it probably failed
>> due to a compile error, and lets you get on with the next in the list.
>>
Not true. emerge --resume starts from the package that was being worked
on when the emerge stopped, whether it was stopped due to a failure or
due to user interruption.

You must be thinking of emerge --resume --skipfirst, which will skip
over the first package in the list (which you would want to do if the
reason the emerge stopped is because that package failed to compile).

Obviously this additional option is necessary because emerge --resume by
itself does *not* "skip over" anything.


James Hiscock wrote:
>>>I tried 'emerge --resume', but that just never seems to do anything.
>>>"nothing to be done".
>
>
> ebuild <path to last ebuild that was worked on> merge
>
> should do the trick -- at least for the last package that was worked
> on. To find the last ebuild that was worked on, check
> /var/log/emerge.log... it'll be one of the last lines in the file.
>
> After that, you should be able to just issue the original emerge
> command, and it should pick up where it left off.
>
> You might want to double-check the ebuild man page, though... I have a
> feeling that 'merge' isn't quite right -- it's been a while since I've
> done that.


Merge will work, but one could also use qmerge:

From the man ebuild page:

merge Normally, to merge an ebuild, you need to fetch, unpack,
compile, install and qmerge. If you're simply interested in merg-
ing the ebuild, you can use this command, which will
perform all these steps for you, stopping along the way if a particu-
lar step doesn't complete successfully.

Hope this helps,

Holly
>
> --
> gentoo-user@gentoo.org mailing list
>
>


--
gentoo-user@gentoo.org mailing list
RE: How to restart an emerge. [ In reply to ]
I guess I wasn't completely clear. I need to stop it so that I can power-off
my notebook (don't have suspend working yet) and take it from work to home.
Then I want to start it again where I left off and leave it running all
night at home. This way, when morning comes, it's like christmas and I have
all my new versions of goodies installed ;-). We have gopher cubes here at
work, and there's no way I'm leaving my notebook on my desk ripe for the
taking. ;-) I could get a notebook lock, but at the moment I don't have that
either, as it never leaves my sight when I'm at work. I'm more worried about
the cleaning staff or a random break-in. we've already had a couple
notebooks stolen from people's desks here.

> -----Original Message-----
> From: Nick Rout [mailto:nick@rout.co.nz]
> Sent: Thursday, October 14, 2004 7:28 PM
> To: gentoo-user@lists.gentoo.org
> Subject: Re: [gentoo-user] How to restart an emerge.
>
>
> On Thu, 14 Oct 2004 19:18:30 -0700
> "Daevid Vincent" <daevid@daevid.com> wrote:
>
> > I thought I saw a thread on this, but can't find it in my
> personal mail
> > archives.
> >
> > When I do an 'emerge -u world', sometimes there are 20
> things or more that
> > need to be done. That's fine. I start it at work in the
> morning, but when
> > it's time to go home, it's still going, and going, and going...
> >
> > If I CTRL+C, it stops the emerge, but when I start it up
> again with the same
> > command as above, it STARTS THE LAST COMPILE OVER from the
> > start/configure?!!! WTF? Should't it realize where it left
> off, and just
> > continue?
> >
> > I tried 'emerge --resume', but that just never seems to do anything.
> > "nothing to be done".
> >
> > Compiling some huge-ass program like KDELibs or KDEPIM may
> take hours. I
> > don't want to have made it be in vain. Please tell me there
> is some way to
> > continue the compilation and salvage all the "wear" on my
> poor notebook's
> > CPU/HD...
>
> why did you ctrl-c it in the first place?
>
> seriously though, ctrl-c stops the process which in turn deletes the
> build tree from inside /var/tmp/portage, so yes you must start that
> package again.
>
> if you want to stop it for a while to allow some processor
> time to your
> important things like games, try ctrl-z. This stops the process, but
> doesn't kill it. type fg to bring it back again.
>
> emerge resume does not resume from the middle of an emerge -
> in fact it
> skips the package that was stopped on the basis that it
> probably failed
> due to a compile error, and lets you get on with the next in the list.
>
> if you need to run other stuff while emerging consider the
> PORTAGE_NICENESS keyword in /etc/make.conf. it allows portage
> to run at
> a lower priority, which means full speed when nothing else is
> happenning,
> but it will duck out of the way when something with normal priority is
> running.
>
>
>
> >
> > d
> >
> >
> > --
> > gentoo-user@gentoo.org mailing list
>
> --
> Nick Rout <nick@rout.co.nz>
>
>
> --
> gentoo-user@gentoo.org mailing list
>


--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
On Sat, 2004-10-16 at 01:13, Holly Bostick wrote:
> Nick Rout wrote:
>
> >> emerge resume does not resume from the middle of an emerge - in fact it
> >> skips the package that was stopped on the basis that it probably failed
> >> due to a compile error, and lets you get on with the next in the list.
> >>
> Not true. emerge --resume starts from the package that was being worked
> on when the emerge stopped, whether it was stopped due to a failure or
> due to user interruption.
>
> You must be thinking of emerge --resume --skipfirst, which will skip
> over the first package in the list (which you would want to do if the
> reason the emerge stopped is because that package failed to compile).
>
> Obviously this additional option is necessary because emerge --resume by
> itself does *not* "skip over" anything.

wooops i do believe holly is right, forget my post

>
>
> James Hiscock wrote:
> >>>I tried 'emerge --resume', but that just never seems to do anything.
> >>>"nothing to be done".
> >
> >
> > ebuild <path to last ebuild that was worked on> merge
> >
> > should do the trick -- at least for the last package that was worked
> > on. To find the last ebuild that was worked on, check
> > /var/log/emerge.log... it'll be one of the last lines in the file.
> >
> > After that, you should be able to just issue the original emerge
> > command, and it should pick up where it left off.
> >
> > You might want to double-check the ebuild man page, though... I have a
> > feeling that 'merge' isn't quite right -- it's been a while since I've
> > done that.
>
>
> Merge will work, but one could also use qmerge:
>
> From the man ebuild page:
>
> merge Normally, to merge an ebuild, you need to fetch, unpack,
> compile, install and qmerge. If you're simply interested in merg-
> ing the ebuild, you can use this command, which will
> perform all these steps for you, stopping along the way if a particu-
> lar step doesn't complete successfully.
>
> Hope this helps,
>
> Holly
> >
> > --
> > gentoo-user@gentoo.org mailing list
> >
> >
>
>
> --
> gentoo-user@gentoo.org mailing list
>


--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
On Fri, 15 Oct 2004 12:04:21 -0700, Daevid Vincent wrote:

> I guess I wasn't completely clear. I need to stop it so that I can
> power-off my notebook (don't have suspend working yet) and take it
> from work to home. Then I want to start it again where I left off and
> leave it running all night at home.

It would be easiest to suspend the emerge with Ctrl-Z. Your battery
should easily last the journey home, then you can restart with fg.

Alternatively, kill the compile with Ctrl-C and restart it at home with
"ebuild /full/path/to/ebuild merge"

Another option is to use eprogress (search the forums for this script)
to determine how complete the current emerge is, so you only break a
short emerge or one that has only just started.


--
Neil Bothwick

THIS IS A 100% MATTER PRODUCT. In the unlikely event that this computer
should contact Antimatter in any form, a catastrophic explosion will
result.
Re: How to restart an emerge. [ In reply to ]
Daevid Vincent wrote, On 15.10.2004 21:04:
> I guess I wasn't completely clear. I need to stop it so that I can power-off
> my notebook (don't have suspend working yet) and take it from work to home.
> Then I want to start it again where I left off and leave it running all
> night at home.


try :

emerge --noreplace (-n)

--noreplace (-n)
Skips the packages specified on the command-line that have already
been installed. Without this option, any packages, ebuilds, or deps you
specify on the command-line *will* cause Portage to remerge the package,
even if it is already installed. Note that Portage will not remerge
ependencies by default.


I hven´t tried it yet, but

emerge --noreplace -uD world

should work.


bye Thilo


--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
this works for me:

while emerging foo, Ctrl+C
all temp files in /var/tmp/portage
After poweroff and/or rebooting, when you like to, reemerge doing:

FEATURES="keepwork" emerge foo

this has a problem: see man make.conf

keepwork

Do not delete the ${WORKDIR} directory after the
merge process.

Actually it checks if WORKDIR exists when emerging, and if it exists
then execs "configure" and "make", but "make" recycle everything
you have already compiled.

This can be a problem if you have shortage of disk space. Try
removing the tmpdir after the emerge (rm -rf /var/tmp/portage)

GoodLuck



--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
Daevid Vincent <daevid <at> daevid.com> writes:

>
> I thought I saw a thread on this, but can't find it in my personal mail
> archives.
>
> When I do an 'emerge -u world', sometimes there are 20 things or more that
> need to be done. That's fine. I start it at work in the morning, but when
> it's time to go home, it's still going, and going, and going...
>
> If I CTRL+C, it stops the emerge, but when I start it up again with the same
> command as above, it STARTS THE LAST COMPILE OVER from the
> start/configure?!!! WTF? Should't it realize where it left off, and just
> continue?
>
> I tried 'emerge --resume', but that just never seems to do anything.
> "nothing to be done".
>
> Compiling some huge-ass program like KDELibs or KDEPIM may take hours. I
> don't want to have made it be in vain. Please tell me there is some way to
> continue the compilation and salvage all the "wear" on my poor notebook's
> CPU/HD...
>
> d
>
>
> --
> gentoo-user <at> gentoo.org mailing list
>
>
>



Ok i found that on the forum a long time ago

after you've killed the emerge process
got to the tmp dir of the package
probably
/var/tmp/portage/package_name/work/package_name

here is located the untared sources

run make (since i suppose configure was already done)
(it will start of where it was stoped)

then go back to
/var/tmp/portage/package_name

do a "ls -al"
you should see a .unpacked file
just do
touch .compiled
to create this last file which will tell emerge the compile process is done

then

ebuild package_name.ebuild install
ebuild package_name.ebuild merge

and finally

ebuild package_name.ebuild qmerge

there you're all set

just finish your world emerge update after that

(that's what i do all the time)





--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
Daevid Vincent wrote:

> When I do an 'emerge -u world', sometimes there are 20 things or more that
> need to be done. That's fine. I start it at work in the morning, but when
> it's time to go home, it's still going, and going, and going...

Get suspend to disk working. Configure KLaptop to suspend to disk
(hibernate) when you close the lid. The notebook continues with power on
the next morning.

regards
Martin


--
gentoo-user@gentoo.org mailing list
Re: How to restart an emerge. [ In reply to ]
Philippe Leroux <leroux00 <at> yahoo.fr> writes:

>
> Daevid Vincent <daevid <at> daevid.com> writes:
>
>
>
> then
>
> ebuild package_name.ebuild install
> ebuild package_name.ebuild merge
>
> and finally
>
> ebuild package_name.ebuild qmerge
>
>
>



Correction, you don't ebuild foo install then merge then qmerge
but just install and qmerge
since merge is all the operations from unpack to qmerge




--
gentoo-user@gentoo.org mailing list