Summary: | [patch] sys-apps/portage: Enhanced output for emerge --pretend --fetchonly | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Miroslav Los <milamby> |
Component: | Conceptual/Abstract Ideas | Assignee: | Portage team <dev-portage> |
Status: | UNCONFIRMED --- | ||
Severity: | enhancement | CC: | kingjon3377 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 377365 | ||
Attachments: |
portage-fetch_listheader.patch
Sample downloader script |
Description
Miroslav Los
2011-08-22 22:55:01 UTC
Created attachment 284269 [details, diff]
portage-fetch_listheader.patch
This patch does not address listing the same file for multiple packages. This can be solved bu simply piping through sort -u, with a caveat that the URI list may be AFAIR in a randomized order. Alternatively, one may use something like this:
PORTAGE_FETCH_LISTHEADER="${file}${tab}${size}${tab}" emerge -pfq ... | sort -uk 1,2
This patch does not handle documentation. Also, it does not register PORTAGE_FETCH_LISTHEADER anywhere (which may be a requirement in portage).
Created attachment 284271 [details]
Sample downloader script
For lack of a better venue, I present a sample downloader script utilising the patch. It requires a custom setting for PORTAGE_FETCH_LISTHEADER, either in make.conf or on the commandline.
Simplest usage:
Target machine:
PORTAGE_FETCH_LISTHEADER="${file}${tab}${size}${tab}${SHA256}${tab}" emerge -pfq -uDn --with-bdeps=y @world | sort -uk 1,1 >/media/drive/wishlist
Fetcher machine:
cd /media/drive; KEEP_GOING=y bash getem
Bad mistake in the examples I gave: the value of PORTAGE_FETCH_LISTHEADER must use escaped \$ signs both in make.conf and on the command line of course. That is: PORTAGE_FETCH_LISTHEADER="\${file}\${tab}\${size}\${tab}\${SHA256}\${tab}" |