[yum-commits] plugins/local

James Antill james at osuosl.org
Thu Jan 28 16:51:43 UTC 2010


 plugins/local/local.py |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit fd63dbab7b29546169a36a90432727c6eeda33d6
Author: James Antill <james at and.org>
Date:   Thu Jan 28 11:51:36 2010 -0500

    Fix the done message in the "local" plugin

diff --git a/plugins/local/local.py b/plugins/local/local.py
index 3f16b5c..70118c9 100644
--- a/plugins/local/local.py
+++ b/plugins/local/local.py
@@ -76,10 +76,10 @@ def postdownload_hook(conduit):
 
     if not done:
         return
-    _rebuild(conduit)
+    _rebuild(conduit, done)
     _reposetup(conduit)
 
-def _rebuild(conduit):
+def _rebuild(conduit, done=None):
     cache_dir = conduit.confString('createrepo', 'cachedir', default=None)
     checksum  = conduit.confString('createrepo', 'checksum', default=None)
 
@@ -115,10 +115,11 @@ def _rebuild(conduit):
         args.append(cache_dir)
     args.append(local_repo_dir)
     if not quiet:
-#        FIXME: Something is rotten here, where does done come from
-#        conduit.info(2, "== Rebuilding _local repo. with %u new packages ==" %
-#                     done)
-        conduit.info(2, "== Rebuilding _local repo.  ==")
+        if done is None:
+            conduit.info(2, "== Rebuilding _local repo. ==")
+        else:
+            msg = "== Rebuilding _local repo. with %u new packages ==" % done
+            conduit.info(2, msg)
     os.spawnvp(os.P_WAIT, "createrepo", args)
     # For the prerepo. check
     os.utime("%s/repodata/repomd.xml" % local_repo_dir, None)


More information about the Yum-commits mailing list