[yum-commits] 5 commits - repodiff.py repoquery.py

James Antill james at osuosl.org
Wed Jun 2 22:06:07 UTC 2010


 repodiff.py  |    2 +-
 repoquery.py |   26 ++++++++++++++------------
 2 files changed, 15 insertions(+), 13 deletions(-)

New commits:
commit 15bcc9bd157bd1a18fb72da15783e3395b5535f1
Author: James Antill <james at and.org>
Date:   Wed Jun 2 16:34:56 2010 -0400

    Don't explicitly call doRepoSetup()

diff --git a/repoquery.py b/repoquery.py
index 5828f03..2d053a6 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -856,12 +856,6 @@ def main(args):
             for repo in repoq.repos.findRepos(repo_match):
                 repo.enable()
 
-    try:
-        repoq.doRepoSetup()
-    except yum.Errors.RepoError, e:
-        repoq.logger.error("Could not setup repo: %s" % (e))
-        sys.exit(50)
-    
     for exp in regexs:
         if exp.endswith('.src'):
             needsource = 1
commit 07dae9d1a86e2c966bff223809ed1d362b17534c
Author: James Antill <james at and.org>
Date:   Wed Jun 2 16:34:39 2010 -0400

    Use .arch.archlist if available, also don't call .doTsSetup

diff --git a/repoquery.py b/repoquery.py
index 5227788..5828f03 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -874,8 +874,11 @@ def main(args):
         archlist.append('src')
 
     try:
-        repoq.doSackSetup(archlist=archlist)
-        repoq.doTsSetup()
+        if not hasattr(repoq, 'arch'):
+            repoq.doSackSetup(archlist=archlist)
+        elif archlist is not None:
+            repoq.arch.archlist = archlist
+
         if needfiles:
             repoq.repos.populateSack(mdtype='filelists')
         if needother:
commit d20aecab3b39a52012012c42eeb960279373f203
Author: James Antill <james at and.org>
Date:   Wed Jun 2 16:34:04 2010 -0400

    Use prerepoconf, if available

diff --git a/repoquery.py b/repoquery.py
index 15990b4..5227788 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -811,11 +811,16 @@ def main(args):
         
     # Show what is going on, if --quiet is not set.
     if not opts.quiet and sys.stdout.isatty():
-        repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))
-        repoq.repos.callback = output.CacheProgressCallback()
         yumout = output.YumOutput()
         freport = ( yumout.failureReport, (), {} )
-        repoq.repos.setFailureCallback( freport )       
+        if hasattr(repoq, 'prerepoconf'):
+            repoq.prerepoconf.progressbar = TextMeter(fo=sys.stdout)
+            repoq.prerepoconf.callback = output.CacheProgressCallback()
+            repoq.prerepoconf.failure_callback = freport
+        else:
+            repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))
+            repoq.repos.callback = output.CacheProgressCallback()
+            repoq.repos.setFailureCallback(freport)
     
     if not repoq.setCacheDir(opts.tempcache):
         repoq.logger.error("Error: Could not make cachedir, exiting")
commit 8f0edc70d7b7ebb214d43b63e1b6a1bba9ffc60c
Author: James Antill <james at and.org>
Date:   Wed Jun 2 16:33:15 2010 -0400

    Don't auto needfiles, when we are just looking at installed

diff --git a/repoquery.py b/repoquery.py
index 85c05a4..15990b4 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -746,7 +746,7 @@ def main(args):
         if not opts.group:
             needfiles = 1
         pkgops.append("list")
-    if opts.alldeps:
+    if opts.alldeps and not (opts.installed or opts.pkgnarrow == 'installed'):
         needfiles = 1
     if opts.envra:
         pkgops.append("envra")
commit 1be1c2b3e5aedc1409926fab7efb3d5657847f8d
Author: James Antill <james at and.org>
Date:   Tue May 25 13:38:54 2010 -0400

    Fix comment typo

diff --git a/repodiff.py b/repodiff.py
index a22f9b1..3cb1f77 100755
--- a/repodiff.py
+++ b/repodiff.py
@@ -103,7 +103,7 @@ class DiffYum(yum.YumBase):
         #  Note that this _only_ shows something when you have an additional
         # package obsoleting a removed package. If the obsoleted package is
         # still there (somewhat "common") or the obsoleter is an update (dito)
-        # you get get hits here.
+        # you _don't_ get hits here.
         for po in remove:
             # Remember: Obsoletes are for package names only.
             poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release))


More information about the Yum-commits mailing list