stop an emerge (compilation), halt the PC, boot and continue the emerge

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

stop an emerge (compilation), halt the PC, boot and continue the emerge

hogren

 

 
Hello !!

I have a little question about portage.

There are many big softwares like Firefox, LibreOffice. At a certain moment, I need to stop the compilation to halt the PC.

But, when I boot up again the PC and I «emerge --resume», it restart the compilation process.

Is there a way to not restart the compilation process ?
I think that if I enter in the temp directory and I type «make && make install», it will install the software but it will not update portage database.


Thank you for your response !

Bye


Hogren
Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

Ian Bloss

Usually what I'll do is ctrl-z which pauses emerge, and then I'll run pm-suspend to put the machine to sleep. After I turn it back on again I'll issue fg and emerge will resume.

The --resume flag just attempts to continue a failed emerge list.


On Mon, Jun 20, 2016, 11:02 Hogren <[hidden email]> wrote:

 

 
Hello !!

I have a little question about portage.

There are many big softwares like Firefox, LibreOffice. At a certain moment, I need to stop the compilation to halt the PC.

But, when I boot up again the PC and I «emerge --resume», it restart the compilation process.

Is there a way to not restart the compilation process ?
I think that if I enter in the temp directory and I type «make && make install», it will install the software but it will not update portage database.


Thank you for your response !

Bye



Hogren
Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

Andrew Lowe-2
In reply to this post by hogren
On 06/20/16 22:58, Hogren wrote:

>
>
>
> Hello !!
>
> I have a little question about portage.
>
> There are many big softwares like Firefox, LibreOffice. At a certain
> moment, I need to stop the compilation to halt the PC.
>
> But, when I boot up again the PC and I «emerge --resume», it restart the
> compilation process.
>
> Is there a way to not restart the compilation process ?
> I think that if I enter in the temp directory and I type «make && make
> install», it will install the software but it will not update portage
> database.
>
>
> Thank you for your response !
>
> Bye
>
>
> Hogren

Hogren,
        What I do may be of help, but then again, it may be all wrong and one
day the gates of hell may open up and swallow mankind because of what I
did, but hey, that's life.

        There is the FEATURES entry in make.conf, man make.conf. Within this
are two options "keeptemp" and "keepwork". I enable them, then the
consequences of which is that stuff is not cleaned up. Hence when I
rerun the emerge, the "make" within sees the already existing files and
skips them, in other words it does as "make" is expected to do.

        Please bear in mind if you have /var/tmp/portage set up to be a RAM
disk of some sort, obviously if you turn your machine off, you'll look
the intermediate files, but if you are hard disk based, they will be
there when you restart the machine and so when you rerun emerge, the
part up until when you killed the emerge originally will be skipped.

        Hope this helps,
                Andrew

Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

Marc Stuermer
In reply to this post by hogren
Zitat von Hogren <[hidden email]>:

> But, when I boot up again the PC and I «emerge --resume», it restart the
> compilation process.
>
> Is there a way to not restart the compilation process ?

Take a look at Tux on Ice, this should do the trick for you.

Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

Mick-10
In reply to this post by Ian Bloss
On Monday 20 Jun 2016 15:52:54 Ian Bloss wrote:
> Usually what I'll do is ctrl-z which pauses emerge, and then I'll run
> pm-suspend to put the machine to sleep. After I turn it back on again I'll
> issue fg and emerge will resume.
>
> The --resume flag just attempts to continue a failed emerge list.

In addition, if you can use the same procedure for hibernate (to disk) if for
some reason you need to completely remove power from your PC.

--
Regards,
Mick

signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

Raffaele BELARDI
In reply to this post by hogren
Hogren wrote:

> There are many big softwares like Firefox, LibreOffice. At a certain
> moment, I need to stop the compilation to halt the PC.
>
> But, when I boot up again the PC and I «emerge --resume», it restart the
> compilation process.
>
> Is there a way to not restart the compilation process ?
> I think that if I enter in the temp directory and I type «make && make
> install», it will install the software but it will not update portage
> database.

I had success in the past using ebuild instead of emerge. Check the man
page, briefly emerge is equivalent to the following steps in sequence:

$ ebuild fetch
$ ebuild unpack
$ ebuild compile
$ ebuild install
$ ebuild qmerge

Running 'make' in the temp dir followed by the last two ebuild steps
only (install and qmerge) should work.

raffaele
Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

Willie Matthews-2
In reply to this post by hogren
On 06/20/2016 07:58 AM, Hogren wrote:

>  
>
>  
> Hello !!
>
> I have a little question about portage.
>
> There are many big softwares like Firefox, LibreOffice. At a certain
> moment, I need to stop the compilation to halt the PC.
>
> But, when I boot up again the PC and I «emerge --resume», it restart the
> compilation process.
>
> Is there a way to not restart the compilation process ?
> I think that if I enter in the temp directory and I type «make && make
> install», it will install the software but it will not update portage
> database.
>
>
> Thank you for your response !
>
> Bye
>
>
> Hogren
This is pretty much what is run when you emerge something.

ebuild [.ebuild] fetch
ebuild [.ebuild] unpack
ebuild [.ebuild] compile
ebuild [.ebuild] install
ebuild [.ebuild] qmerge
ebuild [.ebuild] clean

to continue just choose what part the build was on when you quit it and
start there.

All I really just use is compile and merge. If it didn't get to compile
it isn't worth it. Just emerge the whole thing again.

--

Willie Matthews
[hidden email]
(702) 659-9966


signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

J García
In reply to this post by hogren
El lun, 20-06-2016 a las 16:58 +0200, Hogren escribió:

> There are many big softwares like Firefox, LibreOffice. At a certain
> moment, I need to stop the compilation to halt the PC.
>
> But, when I boot up again the PC and I «emerge --resume», it restart
> the compilation process.
>
> Is there a way to not restart the compilation process ?
> I think that if I enter in the temp directory and I type «make &&
> make install», it will install the software but it will not update
> portage database.

Yes you can, it is not officially supported to do this but I have done
it several times (webkits, libreoffice) without problems, what I do is
make a binary package and then install it, you should have set $PKGDIR
in make.conf, here's how I've done it:

You stopped at libreoffice, you restart your computer, then you should
find out what is the exact ebuild you were building, equery can help
you, if it is an upgrade, i.e.:

$ equery which libreoffice
${PORDIR}/app-office/libreoffice/libreoffice-5.1.3.2.ebuild

then you pretend you are emerge, by using the portage user to make the
build resume, make sure $PKGDIR is writable by the portage user:

$ sudo -u portage ebuild\
 ${PORTDIR}/app-office/libreoffice/libreoffice-5.1.3.2.ebuild \
package

or nesting both commands:

$ sudo -u portage ebuild $(equery w libreoffice) package

this makes all the previous steps needed (prepare, configure ,build,
install) if they haven't been done,
when that is finished you can merge your recently created binary
package by:

$ sudo emerge -av1K =app-office/libreoffice-5.1.3.2 

and resume the general upgrade with:

emerge --resume -av --exclude app-office/libreoffice





Reply | Threaded
Open this post in threaded view
|

Re: stop an emerge (compilation), halt the PC, boot and continue the emerge

hogren
In reply to this post by Ian Bloss
The 2016-06-20 17:52, Ian Bloss wrote :

> Usually what I'll do is ctrl-z which pauses emerge, and then I'll run
> pm-suspend to put the machine to sleep. After I turn it back on again
> I'll issue fg and emerge will resume.

The 2016-06-20 18:29, Mick wrote :

> In addition, if you can use the same procedure for hibernate (to disk)
> if for
> some reason you need to completely remove power from your PC.

Yes, I know that but I was in a special case where I couldn't use it.




The 2016-06-20 17:56, Andrew Lowe wrote :

> What I do may be of help, but then again, it may be all wrong and one
> day the gates of hell may open up and swallow mankind because of what I
> did, but hey, that's life.
>
> There is the FEATURES entry in make.conf, man make.conf. Within this
> are two options "keeptemp" and "keepwork". I enable them, then the
> consequences of which is that stuff is not cleaned up. Hence when I
> rerun the emerge, the "make" within sees the already existing files and
> skips them, in other words it does as "make" is expected to do.
>
> Please bear in mind if you have /var/tmp/portage set up to be a RAM
> disk of some sort, obviously if you turn your machine off, you'll look
> the intermediate files, but if you are hard disk based, they will be
> there when you restart the machine and so when you rerun emerge, the
> part up until when you killed the emerge originally will be skipped.
>
> Hope this helps,
> Andrew

Hey, this is an instrosting option ! Thank you !



The 2016-06-20 18:12, Marc Stürmer wrote :

> Take a look at Tux on Ice, this should do the trick for you.

I already have suspend and hibernate command. Is it different ?



The 2016-06-20 18:41, Raffaele BELARDI wrote :

> I had success in the past using ebuild instead of emerge. Check the man
> page, briefly emerge is equivalent to the following steps in sequence:
>
> $ ebuild fetch
> $ ebuild unpack
> $ ebuild compile
> $ ebuild install
> $ ebuild qmerge
>
> Running 'make' in the temp dir followed by the last two ebuild steps
> only (install and qmerge) should work.
>
> raffaele

Thank you very much for this little course ! It's very introsting !
And it help me very much !



The 2016-06-20 18:42, Willie M wrote :

> This is pretty much what is run when you emerge something.
>
> ebuild [.ebuild] fetch
> ebuild [.ebuild] unpack
> ebuild [.ebuild] compile
> ebuild [.ebuild] install
> ebuild [.ebuild] qmerge
> ebuild [.ebuild] clean
>
> to continue just choose what part the build was on when you quit it and
> start there.
>
> All I really just use is compile and merge. If it didn't get to compile
> it isn't worth it. Just emerge the whole thing again.

Thank you for your additional informations !


The 2016-06-20 22:52, "J." García wrote :

> Yes you can, it is not officially supported to do this but I have done
> it several times (webkits, libreoffice) without problems, what I do is
> make a binary package and then install it, you should have set $PKGDIR
> in make.conf, here's how I've done it:
>
> You stopped at libreoffice, you restart your computer, then you should
> find out what is the exact ebuild you were building, equery can help
> you, if it is an upgrade, i.e.:
>
> $ equery which libreoffice
> ${PORDIR}/app-office/libreoffice/libreoffice-5.1.3.2.ebuild
>
> then you pretend you are emerge, by using the portage user to make the
> build resume, make sure $PKGDIR is writable by the portage user:
>
> $ sudo -u portage ebuild\
> ${PORTDIR}/app-office/libreoffice/libreoffice-5.1.3.2.ebuild \
> package
>
> or nesting both commands:
>
> $ sudo -u portage ebuild $(equery w libreoffice) package
>
> this makes all the previous steps needed (prepare, configure ,build,
> install) if they haven't been done,
> when that is finished you can merge your recently created binary
> package by:
>
> $ sudo emerge -av1K =app-office/libreoffice-5.1.3.2
>
> and resume the general upgrade with:
>
> emerge --resume -av --exclude app-office/libreoffice

Thank you for your alternate method !




Thank you all, very very much for this lot of introsting and helpful
anwsers !


Hogren