LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   Can emerge export a list of files to fetch? (https://www.linuxquestions.org/questions/gentoo-87/can-emerge-export-a-list-of-files-to-fetch-943843/)

CollieJim 05-08-2012 03:07 AM

Can emerge export a list of files to fetch?
 
Hi,

Due to overcast days and a dependency on PV panels for my power, I am reluctant to leave my computer on overnight to fetch updates on my off-peak quota. I do have a Buffalo Linkstation NAS box running, but it appears to run a Debian variant.

It would be nice if I could run emerge and export a list of files needed so the NAS box could get them on my off-peak quota.

Having already patched my copy of emerge to print a timestamp on the ">>> Emerge" line, I could probably add an export function if it does not already exist.

Once downloaded, could the files just be copied to /usr/portage/distfiles, or is there a record of downloads that needs to be updated as well?

Thanks
Jim

ps It would be even nicer if I could put Gentoo on the NAS box...

i92guboj 05-09-2012 02:17 AM

Quote:

Originally Posted by CollieJim (Post 4673116)
Hi,

Due to overcast days and a dependency on PV panels for my power, I am reluctant to leave my computer on overnight to fetch updates on my off-peak quota. I do have a Buffalo Linkstation NAS box running, but it appears to run a Debian variant.

It would be nice if I could run emerge and export a list of files needed so the NAS box could get them on my off-peak quota.

Having already patched my copy of emerge to print a timestamp on the ">>> Emerge" line, I could probably add an export function if it does not already exist.

Ugh. I'd rather just use a shell function and run the time command before emerge starts, if what you want is to know the date when it started. In any case, be careful with this kind of patches. And when something fails, be sure you first try the unpatched version of emerge before reporting anything. In any case, and to answer your question, all you need -if I understood correctly- is "emerge -pf" and simple shell redirection.

Example:

Code:

emerge -pf fluxbox > filelist.txt
If you, for some reason, want the full dependency list, you can do

Code:

emerge -pef fluxbox > filelist.txt
This file will contain a simple plain-text list of URLs, so, it can be used under most download managers, for example, in wget via the -i|--input-file parameter. If you want to make sure that it does what you have in mind, you can try first without redirecting to a file.

Quote:

Once downloaded, could the files just be copied to /usr/portage/distfiles, or is there a record of downloads that needs to be updated as well?
No artifice in there. If the files are found in $DISTDIR (usually /usr/portage/distfiles), then they will be used. That is, as long as the checksums match. Else, they will be deleted and re-downloaded.

Quote:

ps It would be even nicer if I could put Gentoo on the NAS box...
Probably possible, since it already has linux onto it. A thing to try in the future :)

CollieJim 05-09-2012 02:53 AM

Thanks.

The reason for wanting timestamps is that packages like xulrunner and webkit can take over 2 hours to compile and it would be nice to know when they started.

i92guboj 05-09-2012 03:01 AM

There's an emerge log in /var/log/emerge.log, unfortunately, someone decided that time signatures in it should not be human readable :P

The good news is that there's a package called app-portage/genlop in portage, which parses this log and even can give you estimations for future merges, based on the previous history. It can also query online, and give estimations based on similar cpus and similar USE and CFLAGS settings. So I heard, at least. Admittedly, I rarely use it because I never needed that kind of info myself.


All times are GMT -5. The time now is 04:22 PM.