[yum-cvs] yum-utils repotrack.py,1.6,1.7
Seth Vidal
skvidal at linux.duke.edu
Sun Jan 22 21:05:27 UTC 2006
Update of /home/groups/yum/cvs/yum-utils
In directory login1.linux.duke.edu:/tmp/cvs-serv28611
Modified Files:
repotrack.py
Log Message:
make urls only print if the file needs to be download and -u is in cli
flags.
Index: repotrack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/repotrack.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- repotrack.py 9 Jan 2006 07:07:43 -0000 1.6
+++ repotrack.py 22 Jan 2006 21:05:25 -0000 1.7
@@ -223,17 +223,20 @@
for pkg in download_list:
repo = my.repos.getRepo(pkg.repoid)
remote = pkg.returnSimple('relativepath')
- if opts.urls:
- url = urljoin(repo.urls[0],remote)
- print '%s' % url
- continue
local = os.path.basename(remote)
local = os.path.join(opts.destdir, local)
if (os.path.exists(local) and
str(os.path.getsize(local)) == pkg.returnSimple('packagesize')):
+
if not opts.quiet:
my.errorlog(0,"%s already exists and appears to be complete" % local)
continue
+
+ if opts.urls:
+ url = urljoin(repo.urls[0],remote)
+ print '%s' % url
+ continue
+
# Disable cache otherwise things won't download
repo.cache = 0
my.log(2, 'Downloading %s' % os.path.basename(remote))
More information about the Yum-cvs-commits
mailing list