[yum-commits] Branch 'yum-3_2_X' - 2 commits - output.py yum/rpmsack.py

James Antill james at osuosl.org
Wed Apr 1 05:47:05 UTC 2009


 output.py      |   12 ++++++++++--
 yum/rpmsack.py |    5 +++++
 2 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit cb6f763a0083efc89500607165109551553433be
Author: James Antill <james at and.org>
Date:   Wed Apr 1 01:31:15 2009 -0400

    Output yumdb repoid in list/info.

diff --git a/output.py b/output.py
index b88bc27..198bd10 100755
--- a/output.py
+++ b/output.py
@@ -469,7 +469,10 @@ class YumOutput:
         ver = pkg.printVer()
         na = '%s%s.%s' % (indent, pkg.name, pkg.arch)
         hi_cols = [highlight, 'normal', 'normal']
-        columns = zip((na, ver, pkg.repoid), columns, hi_cols)
+        rid = pkg.repoid
+        if hasattr(pkg, 'yumdb_info') and 'repoid' in pkg.yumdb_info:
+            rid = '@' + pkg.yumdb_info.repoid
+        columns = zip((na, ver, rid), columns, hi_cols)
         print self.fmtColumns(columns)
 
     def simpleEnvraList(self, pkg, ui_overflow=False,
@@ -481,7 +484,10 @@ class YumOutput:
             columns = (-63, -16) # Old default
         envra = '%s%s' % (indent, str(pkg))
         hi_cols = [highlight, 'normal', 'normal']
-        columns = zip((envra, pkg.repoid), columns, hi_cols)
+        rid = pkg.repoid
+        if hasattr(pkg, 'yumdb_info') and 'repoid' in pkg.yumdb_info:
+            rid = '@' + pkg.yumdb_info.repoid
+        columns = zip((envra, rid), columns, hi_cols)
         print self.fmtColumns(columns)
 
     def fmtKeyValFill(self, key, val):
@@ -533,6 +539,8 @@ class YumOutput:
         print _("Release    : %s") % to_unicode(pkg.release)
         print _("Size       : %s") % self.format_number(float(pkg.size))
         print _("Repo       : %s") % to_unicode(pkg.repoid)
+        if hasattr(pkg, 'yumdb_info') and 'repoid' in pkg.yumdb_info:
+            print _("From repo  : %s") % to_unicode(pkg.yumdb_info.repoid)
         if self.verbose_logger.isEnabledFor(logginglevels.DEBUG_3):
             print _("Committer  : %s") % to_unicode(pkg.committer)
             print _("Committime : %s") % time.ctime(pkg.committime)
commit 3aed7763ff3861930ac7e325bdb8886f71cbcd3d
Author: James Antill <james at and.org>
Date:   Wed Apr 1 01:27:07 2009 -0400

    Readd sync_with_rpmdb() function for Seth to fill in

diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index aadb333..52d9e6c 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -692,6 +692,11 @@ class RPMDBAdditionalData(object):
         
         return RPMDBAdditionalDataPackage(self.conf, thisdir)
 
+    def sync_with_rpmdb(self, rpmdbobj):
+        """populate out the dirs and remove all the items no longer in the rpmd
+           and/or populate various bits to the currently installed version"""
+        pass
+
 class RPMDBAdditionalDataPackage(object):
     def __init__(self, conf, pkgdir):
         self._conf = conf


More information about the Yum-commits mailing list