diff options
author | Jonathan Dieter <jdieter@gmail.com> | 2007-04-04 17:35:37 +0300 |
---|---|---|
committer | Jonathan Dieter <jdieter@gmail.com> | 2007-04-04 17:35:37 +0300 |
commit | 1942f8d44c679fc612c97202727ce362c3acb130 (patch) | |
tree | 4af5637766d4e44e1b4bc451861a9281f839e123 /yum-presto/shared/prestoDownload.py | |
parent | bdfb4037667c6af7d0537f9bc36b33d55d86e059 (diff) | |
download | presto-1942f8d44c679fc612c97202727ce362c3acb130.tar.gz presto-1942f8d44c679fc612c97202727ce362c3acb130.tar.xz presto-1942f8d44c679fc612c97202727ce362c3acb130.zip |
Add improved logging. Many bug fixes.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Diffstat (limited to 'yum-presto/shared/prestoDownload.py')
-rw-r--r-- | yum-presto/shared/prestoDownload.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/yum-presto/shared/prestoDownload.py b/yum-presto/shared/prestoDownload.py index f21d409..30e7514 100644 --- a/yum-presto/shared/prestoDownload.py +++ b/yum-presto/shared/prestoDownload.py @@ -60,7 +60,7 @@ def verifyChecksum(filename, checksumType, csum): return 0 -def reconstruct(conduit, po): +def reconstruct(conduit, po, log): deltalocal = po.returnSimple('deltalocalpath') retlist = "" @@ -75,7 +75,10 @@ def reconstruct(conduit, po): except: pass else: - retlist += "Built %s from deltarpm\n" % (os.path.basename(po.localpath), os.path.basename(deltalocal)) + # log success + log.log(po.oldpkg_string, po.newpkg_string, os.stat(po.localpath)[6], os.stat(deltalocal)[6]) + + #retlist += "Built %s from deltarpm\n" % os.path.basename(po.localpath) # Check to see whether or not we should keep the drpms # FIXME: Is there any way to see whether or not a Boolean option was not set? if conduit.confBool('main', 'neverkeepdeltas'): @@ -96,7 +99,7 @@ def reconstruct(conduit, po): -def downloadPkgs(conduit, pkglist): +def downloadPkgs(conduit, pkglist, log): """download list of package objects handed to you, return errors""" opts, commands = conduit.getCmdLine() @@ -134,7 +137,7 @@ def downloadPkgs(conduit, pkglist): else: # Deltarpm is local and good, let's put it in the rebuild thread. conduit.info(5, "using local copy of deltarpm for %s" % po) - queue.put((conduit, po)) + queue.put((conduit, po, log)) continue remote_pkgs.append(po) @@ -159,7 +162,7 @@ def downloadPkgs(conduit, pkglist): except Errors.RepoError, e: adderror(po, str(e)) else: - queue.put((conduit, po)) + queue.put((conduit, po, log)) po.simple['deltalocalpath'] = deltalocal if errors.has_key(po): @@ -180,6 +183,8 @@ def downloadPkgs(conduit, pkglist): curthread.messages = "" lock.release() + conduit.info(2, "Rebuilding rpms from deltarpms") + # Tell build thread that there are no more drpms and wait for it to exit curthread.can_exit = True curthread.join() |