[yum-commits] Branch 'yum-3_2_X' - 3 commits - yum/__init__.py yum-updatesd.py yum/yumRepo.py

Tim Lauridsen timlau at osuosl.org
Sun Mar 29 11:04:40 UTC 2009


 yum-updatesd.py |    2 +-
 yum/__init__.py |    4 ++--
 yum/yumRepo.py  |    5 +++--
 3 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit a5b295226c82e2fd15f929d2c2949227abdfe8dc
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Sun Mar 29 13:01:17 2009 +0200

    fix these pylint errors
    ************* Module yum.yumRepo
    E:1541:YumRepository._readMirrorList: Undefined variable 'url'
    E:1626:YumRepository._preload_pkg_from_system_cache: Undefined variable 'filename'

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 1ed5542..ba052e6 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1538,7 +1538,7 @@ class YumRepository(Repository, config.RepoConf):
             try:
                 content = fo.readlines()
             except Exception, e:
-                print "Could not read mirrorlist %s error was \n%s" %(url, e)
+                print "Could not read mirrorlist, error was \n%s" %(e)
                 content = []
             for line in content:
                 if re.match('^\s*\#.*', line) or re.match('^\s*$', line):
@@ -1620,10 +1620,11 @@ class YumRepository(Repository, config.RepoConf):
         """attempts to copy the metadata file from the system-wide cache,
            if possible"""
         return self._preload_file_from_system_cache(filename)
+    
     def _preload_pkg_from_system_cache(self, pkg):
         """attempts to copy the package from the system-wide cache,
            if possible"""
-        return self._preload_file_from_system_cache(filename,subdir='packages/')
+        return self._preload_file_from_system_cache(pkg.localPkg(),subdir='packages/')
 
 
 def getMirrorList(mirrorlist, pdict = None):
commit 67a4f71ab9095555e06820c0c1dcd4bc3931ec4a
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Sun Mar 29 12:48:36 2009 +0200

    fix this pylint error
    ************* Module yum
    E:3423:YumBase._limit_installonly_pkgs: Undefined variable 'packages'

diff --git a/yum/__init__.py b/yum/__init__.py
index 396339e..f6df913 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -65,7 +65,7 @@ import callbacks
 import warnings
 warnings.simplefilter("ignore", Errors.YumFutureDeprecationWarning)
 
-from packages import parsePackages, YumAvailablePackage, YumLocalPackage, YumInstalledPackage
+from packages import parsePackages, YumAvailablePackage, YumLocalPackage, YumInstalledPackage, comparePoEVR
 from constants import *
 from yum.rpmtrans import RPMTransaction,SimpleCliCallBack
 from misc import to_unicode
@@ -3420,7 +3420,7 @@ class YumBase(depsolve.Depsolve):
                     installed = self.rpmdb.searchNevra(name=m.name)
                     if len(installed) >= self.conf.installonly_limit - 1: # since we're adding one
                         numleft = len(installed) - self.conf.installonly_limit + 1
-                        installed.sort(packages.comparePoEVR)
+                        installed.sort(comparePoEVR)
                         for po in installed:
                             if (po.version, po.release) == (cur_kernel_v, cur_kernel_r): 
                                 # don't remove running
commit 8647d23518d230842d8db87bbdb33f2deac645d9
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Sun Mar 29 12:40:48 2009 +0200

    fix this one.
    
    ************* Module yum-updatesd
    E: 43: No name 'MIMEText' in module 'email'

diff --git a/yum-updatesd.py b/yum-updatesd.py
index ac05f2b..8849668 100644
--- a/yum-updatesd.py
+++ b/yum-updatesd.py
@@ -40,7 +40,7 @@ import gobject
 import smtplib
 import threading
 from optparse import OptionParser
-from email.MIMEText import MIMEText
+from email.mime.text import MIMEText
 
 
 


More information about the Yum-commits mailing list