[Yum] yum-suck available
seth vidal
skvidal at phy.duke.edu
Wed Jul 30 21:04:52 UTC 2003
On Wed, 2003-07-30 at 16:24, Aleksander Demko wrote:
> On Tue, 2003-07-29 at 21:45, Tom Diehl wrote:
> > If you can do ssh you can usually do rsync. Just add a "-e ssh" to the
> > rsync command line. rsync is a truely wonderful program for mirroring
> > stuff.
>
> Almost. The DMZed machine itself cannot open ANY sockets to the outside
> world - only respond to httpd and ssh requests. So what I did is I
> ssh'ed INTO it and used -R port:some.proxy:port so the server tunnels
> http requests back down my ssh connection and to a proxy, and then to
> the rest of the world.
>
> After giving up with wget, I decided to just hack together my own
> yum/http mirroring tool. It's quite a hack, but seems to work and is
> available at:
Hey,
I just looked through what you were doing.
neat idea.
Summary of it:
grab the header.info file for a repository.
traverse the list and build out the .hdrs files and the .rpms
corresponding to each and download.
nifty.
a couple of pointers that will help.
look at clientStuff.stripENVRA()
that does all the LHS stripping of header.info
Then you have:
epoch, name, ver, rel, arch and the relative path to the rpm.
then you can rebuild from epoch, name, ver, rel, arch the .hdr filename
and get it.
I would suggest using that function to grab the info and using
urlgrabber.py from yum to do the grabbing.
you should be able to do the whole script in a lot less lines if you use
those few functions.
-sv
More information about the Yum
mailing list