public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Pratical question about portage tree
@ 2005-09-28  1:05 Allan Spagnol Comar
  2005-09-28  1:13 ` Nick Rout
  2005-09-28  2:52 ` Dave Nebinger
  0 siblings, 2 replies; 12+ messages in thread
From: Allan Spagnol Comar @ 2005-09-28  1:05 UTC (permalink / raw
  To: gentoo-user

Hi all; I was wondering about somethings I got a linux box at work
that I keep always updated; but; I had a dial up connection at home :(
( snip ) !!!

if I copy the portage tree with the distfiles to my home computer I
would be able to make a system update ?

thanks for the atention; Allan

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28  1:05 [gentoo-user] Pratical question about portage tree Allan Spagnol Comar
@ 2005-09-28  1:13 ` Nick Rout
  2005-09-28  2:52 ` Dave Nebinger
  1 sibling, 0 replies; 12+ messages in thread
From: Nick Rout @ 2005-09-28  1:13 UTC (permalink / raw
  To: gentoo-user

yes, provided you are running the same packages and use flags on both
boxes.

I think after copying a new portage tree onto the home machine you
should run

emerge metadata


On Tue, 27 Sep 2005 22:05:54 -0300
Allan Spagnol Comar wrote:

> Hi all; I was wondering about somethings I got a linux box at work
> that I keep always updated; but; I had a dial up connection at home :(
> ( snip ) !!!
> 
> if I copy the portage tree with the distfiles to my home computer I
> would be able to make a system update ?
> 
> thanks for the atention; Allan
> 
> -- 
> gentoo-user@gentoo.org mailing list

-- 
Nick Rout <nick@rout.co.nz>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28  1:05 [gentoo-user] Pratical question about portage tree Allan Spagnol Comar
  2005-09-28  1:13 ` Nick Rout
@ 2005-09-28  2:52 ` Dave Nebinger
  2005-09-28  4:08   ` Norberto Bensa
  1 sibling, 1 reply; 12+ messages in thread
From: Dave Nebinger @ 2005-09-28  2:52 UTC (permalink / raw
  To: gentoo-user

On Tue, Sep 27, 2005 at 10:05:54PM -0300, Allan Spagnol Comar wrote:
> Hi all; I was wondering about somethings I got a linux box at work
> that I keep always updated; but; I had a dial up connection at home :(
> ( snip ) !!!
> 
> if I copy the portage tree with the distfiles to my home computer I
> would be able to make a system update ?
> 
> 

I remember there was a script floating around that could be used to
generate a list of packages that the home system would need.  The
script on the fast network side would process the list to download
the files, you would then burn a cd with the files and take back to
the home system for updates.  This would get you around Nick's comment
about needing same USE flags and installed packages.

Unfortunately Allen I don't remember exactly what the script was or
where I got it, but I think there's a reference to it in the Gentoo
Wiki.

HTH,

Dave

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28  2:52 ` Dave Nebinger
@ 2005-09-28  4:08   ` Norberto Bensa
  2005-09-28  4:41     ` Nick Rout
  0 siblings, 1 reply; 12+ messages in thread
From: Norberto Bensa @ 2005-09-28  4:08 UTC (permalink / raw
  To: gentoo-user; +Cc: Dave Nebinger

Dave Nebinger wrote:
> Unfortunately Allen I don't remember exactly what the script was or
> where I got it, but I think there's a reference to it in the Gentoo
> Wiki.

It is not that hard actually:

comm -13 <(ls /usr/portage/distfiles | sort | uniq) \
    <(for i in $(emerge -pufv world 2>&1 | grep ^http | awk '{ print $1 }')
        do
	    echo $(basename $i)
        done | sort | uniq)

That will print the files you'll need to download. Note however that it will 
only print the filenames. You'll have to add:

    http://distfiles.gentoo.org/distfiles/ 

and perhaps -in some cases- other sources/servers as not everything is in 
d.g.o

Regards

-- 
Norberto Bensa
4544-9692
Ciudad de Buenos Aires, Argentina
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28  4:08   ` Norberto Bensa
@ 2005-09-28  4:41     ` Nick Rout
  2005-09-28 11:03       ` Allan Spagnol Comar
  2005-09-28 11:58       ` Norberto Bensa
  0 siblings, 2 replies; 12+ messages in thread
From: Nick Rout @ 2005-09-28  4:41 UTC (permalink / raw
  To: gentoo-user


On Wed, 28 Sep 2005 01:08:53 -0300
Norberto Bensa wrote:

> Dave Nebinger wrote:
> > Unfortunately Allen I don't remember exactly what the script was or
> > where I got it, but I think there's a reference to it in the Gentoo
> > Wiki.
> 
> It is not that hard actually:
> 
> comm -13 <(ls /usr/portage/distfiles | sort | uniq) \
>     <(for i in $(emerge -pufv world 2>&1 | grep ^http | awk '{ print $1 }')
>         do
> 	    echo $(basename $i)
>         done | sort | uniq)
> 
> That will print the files you'll need to download. Note however that it will 
> only print the filenames. You'll have to add:
> 
>     http://distfiles.gentoo.org/distfiles/ 
> 
> and perhaps -in some cases- other sources/servers as not everything is in 
> d.g.o
> 
> Regards


portage knows where to download the files from, and you have told it
where the best mirrors are for you, why second guess it!

How about this:

Get a list of the packages you want to update from the target machine.
something like:

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

take packlist to the connected machine and type:

for package in `cat packlist` ; do DISTDIR=/where/ever/i/want emerge
--nodeps -f =$package; done

The files will then be in /where/ever/i/want and you can put them on a
cd or whatever method you are using and take them away.

--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)


You could also probably do something like:

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

The GENTOO_MIRRORS="local /usr/portage/distfiles" should take files from
the local system in preference to downloading them, which will save your
bandwidth, although i am not 100% sure of the syntax. 

In other words let your network connected host choose where to download
from.

-- 
Nick Rout <nick@rout.co.nz>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28  4:41     ` Nick Rout
@ 2005-09-28 11:03       ` Allan Spagnol Comar
  2005-09-28 11:58       ` Norberto Bensa
  1 sibling, 0 replies; 12+ messages in thread
From: Allan Spagnol Comar @ 2005-09-28 11:03 UTC (permalink / raw
  To: gentoo-user

Thank you all this was realy great; I will try to rebuild the portage
tree with the script that was speaked out and download the files I
need using the package list; I believe that this will do all the work;
if it got right i will send a message; Thanks, Allan

On 9/28/05, Nick Rout <nick@rout.co.nz> wrote:
>
> On Wed, 28 Sep 2005 01:08:53 -0300
> Norberto Bensa wrote:
>
> > Dave Nebinger wrote:
> > > Unfortunately Allen I don't remember exactly what the script was or
> > > where I got it, but I think there's a reference to it in the Gentoo
> > > Wiki.
> >
> > It is not that hard actually:
> >
> > comm -13 <(ls /usr/portage/distfiles | sort | uniq) \
> >     <(for i in $(emerge -pufv world 2>&1 | grep ^http | awk '{ print $1 }')
> >         do
> >           echo $(basename $i)
> >         done | sort | uniq)
> >
> > That will print the files you'll need to download. Note however that it will
> > only print the filenames. You'll have to add:
> >
> >     http://distfiles.gentoo.org/distfiles/
> >
> > and perhaps -in some cases- other sources/servers as not everything is in
> > d.g.o
> >
> > Regards
>
>
> portage knows where to download the files from, and you have told it
> where the best mirrors are for you, why second guess it!
>
> How about this:
>
> Get a list of the packages you want to update from the target machine.
> something like:
>
> emerge -uDp world|grep ebuild|awk '{print($4)}'>packlist
>
> take packlist to the connected machine and type:
>
> for package in `cat packlist` ; do DISTDIR=/where/ever/i/want emerge
> --nodeps -f =$package; done
>
> The files will then be in /where/ever/i/want and you can put them on a
> cd or whatever method you are using and take them away.
>
> --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)
>
>
> You could also probably do something like:
>
> for package in `cat packlist` ; do DISTDIR="/where/ever/i/want" GENTOO_MIRRORS="local
> /usr/portage/distfiles" emerge --nodeps -f =$package; done
>
> The GENTOO_MIRRORS="local /usr/portage/distfiles" should take files from
> the local system in preference to downloading them, which will save your
> bandwidth, although i am not 100% sure of the syntax.
>
> In other words let your network connected host choose where to download
> from.
>
> --
> Nick Rout <nick@rout.co.nz>
>
> --
> gentoo-user@gentoo.org mailing list
>
>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28  4:41     ` Nick Rout
  2005-09-28 11:03       ` Allan Spagnol Comar
@ 2005-09-28 11:58       ` Norberto Bensa
  2005-09-28 21:24         ` Nick Rout
  1 sibling, 1 reply; 12+ messages in thread
From: Norberto Bensa @ 2005-09-28 11:58 UTC (permalink / raw
  To: gentoo-user; +Cc: Nick Rout

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.


> 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 ;-) 


>
> --
> Nick Rout <nick@rout.co.nz>

Best regards,
Norberto


-- 
Norberto Bensa
4544-9692
Ciudad de Buenos Aires, Argentina
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28 11:58       ` Norberto Bensa
@ 2005-09-28 21:24         ` Nick Rout
  2005-09-28 23:22           ` Norberto Bensa
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Rout @ 2005-09-28 21:24 UTC (permalink / raw
  To: gentoo-user


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 <nick@rout.co.nz>
> 
> Best regards,
> Norberto
> 
> 
> -- 
> Norberto Bensa
> 4544-9692
> Ciudad de Buenos Aires, Argentina
> -- 
> gentoo-user@gentoo.org mailing list

-- 
Nick Rout <nick@rout.co.nz>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28 21:24         ` Nick Rout
@ 2005-09-28 23:22           ` Norberto Bensa
  2005-09-29  0:57             ` W.Kenworthy
  0 siblings, 1 reply; 12+ messages in thread
From: Norberto Bensa @ 2005-09-28 23:22 UTC (permalink / raw
  To: gentoo-user; +Cc: Nick Rout

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

Yup. I know. 

I did it that way because I used to have dialup (I'm on cablemodem now) and 
the only places I knew with broadband were using Windows, so I just made a:

G:
wget -i list.txt

G: was my 1GB pendrive :-P


> 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

Good approach. I haven't tested but it should work.


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

That's why I like Linux ;-)


Best regards,
Norberto
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-28 23:22           ` Norberto Bensa
@ 2005-09-29  0:57             ` W.Kenworthy
  2005-09-29  1:27               ` Nick Rout
  0 siblings, 1 reply; 12+ messages in thread
From: W.Kenworthy @ 2005-09-29  0:57 UTC (permalink / raw
  To: gentoo-user

Here's another way I started using (~1 month) and it seems both simple
and problem free.  Run http-replicator on the machine with good net
access, then point the rest at it.  Its a distfile caching proxy and
best of all, its in potage and there is a gentoo wiki doc on how to set
it up.  Nice!

BillK

*  net-proxy/http-replicator
      Latest version available: 3.0
      Latest version installed: 3.0
      Size of downloaded files: 19 kB
      Homepage:    http://gertjan.freezope.org/replicator/
      Description: Proxy cache for Gentoo packages
      License:     GPL-2


On Wed, 2005-09-28 at 20:22 -0300, Norberto Bensa wrote:
> Nick Rout wrote:
> > OTOH your approach has problems in that not all files reside on gentoo
...
> 
> >
> > Certainly, like most of linux, there is more than one way to do it. :-)
> 
> That's why I like Linux ;-)
> 
> 
> Best regards,
> Norberto
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-29  0:57             ` W.Kenworthy
@ 2005-09-29  1:27               ` Nick Rout
  2005-09-29  2:22                 ` W.Kenworthy
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Rout @ 2005-09-29  1:27 UTC (permalink / raw
  To: gentoo-user


On Thu, 29 Sep 2005 08:57:57 +0800
W.Kenworthy wrote:

> Here's another way I started using (~1 month) and it seems both simple
> and problem free.  Run http-replicator on the machine with good net
> access, then point the rest at it.  Its a distfile caching proxy and
> best of all, its in potage and there is a gentoo wiki doc on how to set
> it up.  Nice!

Yes a good setup if there is fast and easy access between the two
machines.

Sorry how does this help the OP who has a machine at home on dialup and
a fast connection at work? (and who doesn't want to download from home
if he can help it?)

-- 
Nick Rout <nick@rout.co.nz>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Pratical question about portage tree
  2005-09-29  1:27               ` Nick Rout
@ 2005-09-29  2:22                 ` W.Kenworthy
  0 siblings, 0 replies; 12+ messages in thread
From: W.Kenworthy @ 2005-09-29  2:22 UTC (permalink / raw
  To: gentoo-user

Not a lot: I came in late on the thread.  

One thing to investigate is if his ISP keeps a local cache of gentoo as
many of the ones in Oz do - they usually dont charge for local (to the
ISP) traffic.  Then unless its openoffice which is a bit big, a
pre-fetch from the ISP at night is a good scenario.

BillK


On Thu, 2005-09-29 at 13:27 +1200, Nick Rout wrote:
> On Thu, 29 Sep 2005 08:57:57 +0800
> W.Kenworthy wrote:
> 
> > Here's another way I started using (~1 month) and it seems both simple
> > and problem free.  Run http-replicator on the machine with good net
> > access, then point the rest at it.  Its a distfile caching proxy and
> > best of all, its in potage and there is a gentoo wiki doc on how to set
> > it up.  Nice!
> 
> Yes a good setup if there is fast and easy access between the two
> machines.
> 
> Sorry how does this help the OP who has a machine at home on dialup and
> a fast connection at work? (and who doesn't want to download from home
> if he can help it?)
> 
> -- 
> Nick Rout <nick@rout.co.nz>
> 
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-09-29  2:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28  1:05 [gentoo-user] Pratical question about portage tree Allan Spagnol Comar
2005-09-28  1:13 ` Nick Rout
2005-09-28  2:52 ` Dave Nebinger
2005-09-28  4:08   ` Norberto Bensa
2005-09-28  4:41     ` Nick Rout
2005-09-28 11:03       ` Allan Spagnol Comar
2005-09-28 11:58       ` Norberto Bensa
2005-09-28 21:24         ` Nick Rout
2005-09-28 23:22           ` Norberto Bensa
2005-09-29  0:57             ` W.Kenworthy
2005-09-29  1:27               ` Nick Rout
2005-09-29  2:22                 ` W.Kenworthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox