[yum-commits] Branch 'yum-3_2_X' - 3 commits - cli.py yum/__init__.py yum/sqlitesack.py

James Antill james at osuosl.org
Tue Aug 4 20:15:40 UTC 2009


 cli.py            |   15 +++++++++++++--
 yum/__init__.py   |    9 +++++++++
 yum/sqlitesack.py |    1 +
 3 files changed, 23 insertions(+), 2 deletions(-)

New commits:
commit 2ba1953b90e8010f6f2c59fbe481689164dec674
Author: James Antill <james at and.org>
Date:   Tue Aug 4 16:15:33 2009 -0400

    Do the rpmlib() error check in the Copy&Paste code for yum cli

diff --git a/cli.py b/cli.py
index 5ad4e2b..615a1f6 100644
--- a/cli.py
+++ b/cli.py
@@ -420,10 +420,21 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
                  _('Running rpm_check_debug'))
             msgs = self._run_rpm_check_debug()
             if msgs:
-                print _('ERROR with rpm_check_debug vs depsolve:')
+                rpmlib_only = True
+                for msg in msgs:
+                    if msg.startswith('rpmlib('):
+                        continue
+                    rpmlib_only = False
+                if rpmlib_only:
+                    print _("ERROR You need to update rpm to handle:")
+                else:
+                    print _('ERROR with rpm_check_debug vs depsolve:')
+
                 for msg in msgs:
                     print to_utf8(msg)
-    
+
+                if rpmlib_only:
+                    return 1, [_('RPM needs to be updated')]
                 return 1, [_('Please report this error in %s') % self.conf.bugtracker_url]
 
             self.verbose_logger.debug('rpm_check_debug time: %0.3f' % (time.time() - rcd_st))
commit 796e392da09f60de37ff96deb299ec21f249569b
Author: James Antill <james at and.org>
Date:   Tue Aug 4 14:41:53 2009 -0400

     If the rpm trans. test check fails due to rpmlib, tell the user.
    
    We have had significant rpmlib problems, with SHA256 and Xz etc. so we
    might as well look for it and tell the user not to put stuff in yum's
    Bug DB.

diff --git a/yum/__init__.py b/yum/__init__.py
index 55ec450..9deed31 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3821,6 +3821,15 @@ class YumBase(depsolve.Depsolve):
                  _('Running rpm_check_debug'))
             msgs = self._run_rpm_check_debug()
             if msgs:
+                rpmlib_only = True
+                for msg in msgs:
+                    if msg.startswith('rpmlib('):
+                        continue
+                    rpmlib_only = False
+                if rpmlib_only:
+                    retmsgs = [_("ERROR You need to update rpm to handle:")]
+                    retmsgs.extend(msgs)
+                    raise Errors.YumRPMCheckError, retmsgs
                 retmsgs = [_('ERROR with rpm_check_debug vs depsolve:')]
                 retmsgs.extend(msgs) 
                 retmsgs.append(_('Please report this error at %s') 
commit a0eb7f9d96d0b4be6d5542fc0b9982af7ea63143
Author: James Antill <james at and.org>
Date:   Tue Aug 4 14:24:19 2009 -0400

     Fix "yum list y[u]*" to do the same as "yum list yu*".
    
    The problem is that SQL/sqlite has no mapping for [] to SQL's wildcard
    matching. So we currently load everything and do it via.
    parsePackages(). Except we forgot we'd done that, so then returned
    everything.

diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index e9b8112..643f1f6 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -1526,6 +1526,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
             pkgobjlist = self._clean_pkgobjlist()
         else:
             pkgobjlist = self._buildPkgObjList(repoid, patterns, ignore_case)
+            internal_pkgoblist = hasattr(self, 'pkgobjlist')
 
         if internal_pkgoblist and patterns:
             internal_pkgoblist = False


More information about the Yum-commits mailing list