[yum-cvs] 2 commits - output.py yum/packages.py

Seth Vidal skvidal at linux.duke.edu
Mon Dec 17 14:08:55 UTC 2007


 output.py       |    2 +-
 yum/packages.py |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 751db5a917d400a740ebb491ba737b74d9308392
Merge: 9a14cfc... a7fcbb4...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Dec 17 09:06:31 2007 -0500

    Merge branch 'master' of ssh://login.linux.duke.edu/home/groups/yum/git/yum
    
    * 'master' of ssh://login.linux.duke.edu/home/groups/yum/git/yum:
      make the skipbroken messages info instead of debug, the user what to see what is being skipped
      print repo when showing packages with depsolving problems to make it easier to detect repo mixing issues
      Support profiling for yum as a whole

commit 9a14cfc3d86cda155e037de9e10f175d713fc57c
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Dec 17 09:06:11 2007 -0500

     - modify search output so that searches output something even in
        -d1 and -d0, just like 'yum list' does. closes rh bug 422571.
     - add checksum and stat information to YumLocalPackage objects

diff --git a/output.py b/output.py
index 932cf41..f7edc73 100644
--- a/output.py
+++ b/output.py
@@ -418,7 +418,7 @@ class YumOutput:
         if matchfor:
             msg = self.term.sub_bold(msg, matchfor)
         
-        self.verbose_logger.log(logginglevels.INFO_2, msg)
+        print msg
         self.verbose_logger.debug('Matched from:')
         for item in values:
             if matchfor:
diff --git a/yum/packages.py b/yum/packages.py
index add3afd..3726a92 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -782,6 +782,11 @@ class YumLocalPackage(YumHeaderPackage):
                  
         self.pkgtype = 'local'
         self.localpath = filename
+        self._checksum = None
+        self._stat = os.stat(self.localpath)
+        self.filetime = str(self._stat[-1])
+        self.packagesize = str(self._stat[6])
+
         
         try:
             hdr = rpmUtils.miscutils.hdrFromPackage(ts, self.localpath)
@@ -797,3 +802,12 @@ class YumLocalPackage(YumHeaderPackage):
     def localPkg(self):
         return self.localpath
     
+    def _do_checksum(self, checksum_type='sha'):
+        if not self._checksum:
+            self._checksum = misc.checksum(checksum_type, self.localpath)
+            
+        return self._checksum    
+
+    checksum = property(fget=lambda self: self._do_checksum())    
+    
+



More information about the Yum-cvs-commits mailing list