On Wed, 28 Sep 2005 08:58:52 -0300
Norberto Bensa wrote:

> Nick Rout wrote:
> >
> > portage knows where to download the files from, and you have told it
> > where the best mirrors are for you, why second guess it!
> 
> What I've made is download _only_ needed files. For this to work, I've had to 
> remove path names (i.e. http://download.from.server.tld/path/to/filename.tgz 
> becomes filename.tgz) 
> 
> >
> > for package in `cat packlist` ; do DISTDIR=/where/ever/i/want emerge
> > --nodeps -f =$package; done
> 
> This assumes _both_ machines have Gentoo _and_ exactly the same USE flags.
> 
> >
> > --nodeps will make sure that your connected host doesn't substitute its
> > own idea of what the deps are (perhaps based on different USE flags)
> 
> In most cases, you will end with partially downloaded packages.
> 
> 

No it won't, why do you say that (although please read below because I
realise that there is an error with my strtegy because of the possible
difference in USE flags)

> > In other words let your network connected host choose where to download
> > from.
> 
> My method, although not the best, works under Windows and other OSes too ;-) 

That was not the question posed. The question assumed:

Machine A with updated portage and all updates emerged.
Machine B with poor network access, and its portage updated from Machine A

So both machines will have the same portage, but admittedly may not have
the same USE flags.

I think you are right in saying that the USE flag differences will cause 
problems with my method. This is because:

1. Different USE flags may result in different dependencies for a given
package; and

2. Different USE flags may result in different download files even
within the same package.

OTOH your approach has problems in that not all files reside on gentoo
mirrors, some reside on sourceforge or other more obscure places.

IMHO my approach can be fixed by:

1. On machine B, as well as running:

emerge -uDp world|grep ebuild|awk '{print($4)}'>packlist

also run:

emerge info|grep USE |cut -d\" -f2 > B.uselist

2. On machine A, instead of running:

for package in `cat packlist` ; do DISTDIR="/where/ever/i/want" 
GENTOO_MIRRORS="local
/usr/portage/distfiles" emerge --nodeps -f =$package; done

run:

for package in `cat packlist` ; do DISTDIR="/where/ever/i/want" 
GENTOO_MIRRORS="local
/usr/portage/distfiles" USE="-* `cat B.uselist` emerge --nodeps -f
=$package; done


emerge will use the USE list from machine B, and will collect files
locally before grabbing them from the net.

Certainly, like most of linux, there is more than one way to do it. :-)






> 
> 
> >
> > --
> > Nick Rout <[EMAIL PROTECTED]>
> 
> Best regards,
> Norberto
> 
> 
> -- 
> Norberto Bensa
> 4544-9692
> Ciudad de Buenos Aires, Argentina
> -- 
> gentoo-user@gentoo.org mailing list

-- 
Nick Rout <[EMAIL PROTECTED]>

-- 
gentoo-user@gentoo.org mailing list

Reply via email to