Coax yum list updates to report full file names
jacliburn at bellsouth.net
Thu Jul 13 14:18:01 UTC 2006
On Wed, Jul 12, 2006 at 09:02:43PM -0600, Charles Curley wrote:
> On Wed, Jul 12, 2006 at 07:42:19PM -0500, Jay Cliburn wrote:
> > I run rawhide at home, but my network connection is only a 256/128 DSL.
> > This makes large yum updates (like today's 385ish MB behemoth) rather
> > lengthy. OTOH, I have an OC-48 network connection at work, with a
> > Cygwin installation on my office PC.
> > What I'd like to do is generate a list of properly formatted filenames
> > from the yum list updates command on the rawhide machine, then take that
> > list to work and feed it to a script that wgets each file from a mirror
> > over the OC-48 connection. Then I can just dump the files to a thumb
> > drive and do the update from it when I get home.
> Can you set up a cron job to slurp it in starting some time after you
> usually go to bed?
Unfortunately, the rawhide machine is in my bedroom and I prefer not to have it powered up all night.
I made a one-line change to /usr/share/yum-cli/output.py to cause 'yum list updates' to format the output my way, but of course that's not really a durable solution because the next version of yum will replace output.py. Paul Howarth's script method (described an a separate reply) is more durable, but I prefer a direct yum solution, so I've begun looking into creating a yum plugin.
Thanks for your reply.
For completeness, the output.py change is documented below.
[jcliburn at osprey ~]$ diff -u /usr/share/yum-cli/output.py.orig /usr/share/yum-cli/output.py
--- /usr/share/yum-cli/output.py.orig 2006-07-12 21:53:53.000000000 -0500
+++ /usr/share/yum-cli/output.py 2006-07-13 08:40:04.000000000 -0500
@@ -65,7 +65,7 @@
na = '%s.%s' % (pkg.name, pkg.arch)
repo = pkg.returnSimple('repoid')
- print "%-40.40s %-22.22s %-16.16s" % (na, ver, repo)
+ print "%s-%s-%s.%s.rpm" % (pkg.name, pkg.version, pkg.release, pkg.arch)
def infoOutput(self, pkg):
More information about the users