summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2009-03-11 01:11:39 -0400
committerWill Woods <wwoods@redhat.com>2009-03-11 01:11:39 -0400
commit907e583d68fae9d14ac9b5b022f0703c1d3b51b3 (patch)
tree2660d8bcf4940d2ba06fc1da45d642bdd351e0cf
parente43efc12371fea883a8fb8658c9ded03c4b7fca0 (diff)
downloaddebuginfofs-907e583d68fae9d14ac9b5b022f0703c1d3b51b3.tar.gz
debuginfofs-907e583d68fae9d14ac9b5b022f0703c1d3b51b3.tar.xz
debuginfofs-907e583d68fae9d14ac9b5b022f0703c1d3b51b3.zip
Emit total download/unpack counts at end of run (so we know when it finishes)
-rwxr-xr-xserver/debuginfofs-mirror6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/debuginfofs-mirror b/server/debuginfofs-mirror
index 9dbcac3..2db31f6 100755
--- a/server/debuginfofs-mirror
+++ b/server/debuginfofs-mirror
@@ -338,6 +338,8 @@ def main():
if not opt.keep_src:
# Rather than extracting and then deleting, just don't extract it
excludepat="*/usr/src/debug/*"
+ downloadcount=0
+ unpackcount=0
for p in unpack_packages + download_packages:
if p in download_packages:
repo = y.repos.getRepo(p.repoid)
@@ -347,6 +349,7 @@ def main():
y.logger.error(str(e))
y.logger.error("Can't download %s; skipping" % pkg_to_nevra(p))
continue
+ downloadcount += 1
if opt.download_only:
continue
local = p.localpath
@@ -357,6 +360,7 @@ def main():
y.verbose_logger.info("Unpacking %s" % nevra)
unpack_rpm(local, targetdir, excludepat=excludepat)
+ unpackcount += 1
# Remove cached package now that we've unpacked it
if not opt.savecache:
os.unlink(local)
@@ -366,6 +370,8 @@ def main():
if not opt.keep_lib:
# TODO: it'd be good to nuke all of the extra dirs
shutil.rmtree(os.path.join(targetdir,"usr/lib/debug"))
+ y.verbose_logger.info("Downloaded %i packages" % downloadcount)
+ y.verbose_logger.info("Unpacked %i packages" % unpackcount)
if __name__ == '__main__':
try: