[yum-git] 2 commits - cli.py yum/__init__.py

James Antill james at linux.duke.edu
Mon Jan 28 21:49:17 UTC 2008


 cli.py          |    2 +-
 yum/__init__.py |    7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 239ba6271902c64b8f1bb473b4be6869c5d86b72
Author: James Antill <james at and.org>
Date:   Mon Jan 28 16:49:12 2008 -0500

    Change API to more generic validate() param.

diff --git a/yum/__init__.py b/yum/__init__.py
index 7e78b15..c6f8750 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -193,7 +193,7 @@ class YumBase(depsolve.Depsolve):
     def doFileLogSetup(self, uid, logfile):
         logginglevels.setFileLog(uid, logfile)
 
-    def getReposFromConfigFile(self, repofn, gpgcheck=False, repo_age=None):
+    def getReposFromConfigFile(self, repofn, repo_age=None, validate=None):
         """read in repositories from a config .repo file"""
 
         if repo_age is None:
@@ -237,10 +237,7 @@ class YumBase(depsolve.Depsolve):
                 thisrepo.repo_config_age = repo_age
                 thisrepo.repofile = repofn
 
-            if gpgcheck and not thisrepo.gpgcheck:
-                # Don't allow them to set gpgcheck=False
-                self.logger.warning("Repo %s tries to set gpgcheck=false" %
-                                    (thisrepo))
+            if validate and not validate(thisrepo):
                 continue
                     
             # Got our list of repo objects, add them to the repos
commit 1eac2b275178c04afb72c6681fd5540fb21bdf46
Author: James Antill <james at and.org>
Date:   Mon Jan 28 14:52:10 2008 -0500

    Always have space between name and summary

diff --git a/cli.py b/cli.py
index 79d9515..0b267b6 100644
--- a/cli.py
+++ b/cli.py
@@ -138,7 +138,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
             # XXX Remove this when getSummary is common in plugins
             try:
                 summary = command.getSummary()
-                usage += "%-15s%s\n" % (command.getNames()[0], summary)
+                usage += "%-14s %s\n" % (command.getNames()[0], summary)
             except (AttributeError, NotImplementedError):
                 usage += "%s\n" % command.getNames()[0]
 



More information about the Yum-cvs-commits mailing list