1 |
On Wed, 28 Sep 2005 08:58:52 -0300 |
2 |
Norberto Bensa wrote: |
3 |
|
4 |
> Nick Rout wrote: |
5 |
> > |
6 |
> > portage knows where to download the files from, and you have told it |
7 |
> > where the best mirrors are for you, why second guess it! |
8 |
> |
9 |
> What I've made is download _only_ needed files. For this to work, I've had to |
10 |
> remove path names (i.e. http://download.from.server.tld/path/to/filename.tgz |
11 |
> becomes filename.tgz) |
12 |
> |
13 |
> > |
14 |
> > for package in `cat packlist` ; do DISTDIR=/where/ever/i/want emerge |
15 |
> > --nodeps -f =$package; done |
16 |
> |
17 |
> This assumes _both_ machines have Gentoo _and_ exactly the same USE flags. |
18 |
> |
19 |
> > |
20 |
> > --nodeps will make sure that your connected host doesn't substitute its |
21 |
> > own idea of what the deps are (perhaps based on different USE flags) |
22 |
> |
23 |
> In most cases, you will end with partially downloaded packages. |
24 |
> |
25 |
> |
26 |
|
27 |
No it won't, why do you say that (although please read below because I |
28 |
realise that there is an error with my strtegy because of the possible |
29 |
difference in USE flags) |
30 |
|
31 |
> > In other words let your network connected host choose where to download |
32 |
> > from. |
33 |
> |
34 |
> My method, although not the best, works under Windows and other OSes too ;-) |
35 |
|
36 |
That was not the question posed. The question assumed: |
37 |
|
38 |
Machine A with updated portage and all updates emerged. |
39 |
Machine B with poor network access, and its portage updated from Machine A |
40 |
|
41 |
So both machines will have the same portage, but admittedly may not have |
42 |
the same USE flags. |
43 |
|
44 |
I think you are right in saying that the USE flag differences will cause problems with my method. This is because: |
45 |
|
46 |
1. Different USE flags may result in different dependencies for a given |
47 |
package; and |
48 |
|
49 |
2. Different USE flags may result in different download files even |
50 |
within the same package. |
51 |
|
52 |
OTOH your approach has problems in that not all files reside on gentoo |
53 |
mirrors, some reside on sourceforge or other more obscure places. |
54 |
|
55 |
IMHO my approach can be fixed by: |
56 |
|
57 |
1. On machine B, as well as running: |
58 |
|
59 |
emerge -uDp world|grep ebuild|awk '{print($4)}'>packlist |
60 |
|
61 |
also run: |
62 |
|
63 |
emerge info|grep USE |cut -d\" -f2 > B.uselist |
64 |
|
65 |
2. On machine A, instead of running: |
66 |
|
67 |
for package in `cat packlist` ; do DISTDIR="/where/ever/i/want" GENTOO_MIRRORS="local |
68 |
/usr/portage/distfiles" emerge --nodeps -f =$package; done |
69 |
|
70 |
run: |
71 |
|
72 |
for package in `cat packlist` ; do DISTDIR="/where/ever/i/want" GENTOO_MIRRORS="local |
73 |
/usr/portage/distfiles" USE="-* `cat B.uselist` emerge --nodeps -f |
74 |
=$package; done |
75 |
|
76 |
|
77 |
emerge will use the USE list from machine B, and will collect files |
78 |
locally before grabbing them from the net. |
79 |
|
80 |
Certainly, like most of linux, there is more than one way to do it. :-) |
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
> |
88 |
> |
89 |
> > |
90 |
> > -- |
91 |
> > Nick Rout <nick@×××××××.nz> |
92 |
> |
93 |
> Best regards, |
94 |
> Norberto |
95 |
> |
96 |
> |
97 |
> -- |
98 |
> Norberto Bensa |
99 |
> 4544-9692 |
100 |
> Ciudad de Buenos Aires, Argentina |
101 |
> -- |
102 |
> gentoo-user@g.o mailing list |
103 |
|
104 |
-- |
105 |
Nick Rout <nick@×××××××.nz> |
106 |
|
107 |
-- |
108 |
gentoo-user@g.o mailing list |