Gentoo Archives: gentoo-user

From: Nick Rout <nick@×××××××.nz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Pratical question about portage tree
Date: Wed, 28 Sep 2005 04:48:06
Message-Id: 20050928163705.53E7.NICK@rout.co.nz
In Reply to: Re: [gentoo-user] Pratical question about portage tree by Norberto Bensa
1 On Wed, 28 Sep 2005 01:08:53 -0300
2 Norberto Bensa wrote:
3
4 > Dave Nebinger wrote:
5 > > Unfortunately Allen I don't remember exactly what the script was or
6 > > where I got it, but I think there's a reference to it in the Gentoo
7 > > Wiki.
8 >
9 > It is not that hard actually:
10 >
11 > comm -13 <(ls /usr/portage/distfiles | sort | uniq) \
12 > <(for i in $(emerge -pufv world 2>&1 | grep ^http | awk '{ print $1 }')
13 > do
14 > echo $(basename $i)
15 > done | sort | uniq)
16 >
17 > That will print the files you'll need to download. Note however that it will
18 > only print the filenames. You'll have to add:
19 >
20 > http://distfiles.gentoo.org/distfiles/
21 >
22 > and perhaps -in some cases- other sources/servers as not everything is in
23 > d.g.o
24 >
25 > Regards
26
27
28 portage knows where to download the files from, and you have told it
29 where the best mirrors are for you, why second guess it!
30
31 How about this:
32
33 Get a list of the packages you want to update from the target machine.
34 something like:
35
36 emerge -uDp world|grep ebuild|awk '{print($4)}'>packlist
37
38 take packlist to the connected machine and type:
39
40 for package in `cat packlist` ; do DISTDIR=/where/ever/i/want emerge
41 --nodeps -f =$package; done
42
43 The files will then be in /where/ever/i/want and you can put them on a
44 cd or whatever method you are using and take them away.
45
46 --nodeps will make sure that your connected host doesn't substitute its
47 own idea of what the deps are (perhaps based on different USE flags)
48
49
50 You could also probably do something like:
51
52 for package in `cat packlist` ; do DISTDIR="/where/ever/i/want" GENTOO_MIRRORS="local
53 /usr/portage/distfiles" emerge --nodeps -f =$package; done
54
55 The GENTOO_MIRRORS="local /usr/portage/distfiles" should take files from
56 the local system in preference to downloading them, which will save your
57 bandwidth, although i am not 100% sure of the syntax.
58
59 In other words let your network connected host choose where to download
60 from.
61
62 --
63 Nick Rout <nick@×××××××.nz>
64
65 --
66 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Pratical question about portage tree Allan Spagnol Comar <allan.comar@×××××.com>
Re: [gentoo-user] Pratical question about portage tree Norberto Bensa <nbensa@×××.net>