[yum-commits] 5 commits - yum/__init__.py yum.spec

James Antill james at osuosl.org
Wed Oct 17 19:32:49 UTC 2012


 yum.spec        |    2 +-
 yum/__init__.py |   42 ++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 41 insertions(+), 3 deletions(-)

New commits:
commit fb8369d2b4faeef9e125ea7fe2fe6d700abe8857
Author: James Antill <james at and.org>
Date:   Wed Oct 17 15:31:51 2012 -0400

    Add txmbrs to install pkgs.

diff --git a/yum/__init__.py b/yum/__init__.py
index b497f86..604ccce 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -4365,10 +4365,14 @@ much more problems).
             i386 vs. i586 or ppc64 vs. ppc64 etc. '''
         if not ipkgs:
             ipkgs = self.rpmdb.searchNames([po.name])
-            for txmbr in self.tsInfo.matchNaevr(po.name):
-                if txmbr.output_state not in TS_INSTALL_STATES:
-                    continue
-                ipkgs.append(txmbr.po)
+        else:
+            ipkgs = ipkgs[:]
+
+        # Add these anyway, just to be sure.
+        for txmbr in self.tsInfo.matchNaevr(po.name):
+            if txmbr.output_state not in TS_INSTALL_STATES:
+                continue
+            ipkgs.append(txmbr.po)
 
         for ipkg in ipkgs:
             if po.arch == ipkg.arch:
commit cc99bcdf1ac5df420e36780e09fe40aeb3ba169a
Author: James Antill <james at and.org>
Date:   Wed Oct 17 15:19:34 2012 -0400

    Fix downloadonly-plugin rawhide version.

diff --git a/yum.spec b/yum.spec
index 60a19d4..4a0297a 100644
--- a/yum.spec
+++ b/yum.spec
@@ -79,7 +79,7 @@ Obsoletes: yum-plugin-protect-packages < 1.1.27-0
 Provides: yum-protect-packages = 1.1.27-0.yum
 Provides: yum-plugin-protect-packages = 1.1.27-0.yum
 Obsoletes: yum-plugin-download-order <= 0.2-2
-Obsoletes: yum-plugin-downloadonly <= 3.4.3-44
+Obsoletes: yum-plugin-downloadonly <= 1.1.31-6.fc19
 Provides: yum-plugin-downloadonly = 3.4.3-44.yum
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
commit b86a17c75aedf3fdf14798105034fa5c12f32671
Merge: 38cc79a ba86c52
Author: James Antill <james at and.org>
Date:   Wed Oct 17 15:17:42 2012 -0400

    Merge branch 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/yum
    
    * 'master' of ssh://yum.baseurl.org/srv/projects/yum/git/yum: (3 commits)
      Add --downloadonly and --downloaddir to bash completion base options.
      ...

commit 38cc79ab03010d56a358d1ecd767c15c6018874f
Author: James Antill <james at and.org>
Date:   Tue Oct 16 17:03:07 2012 -0400

    Deal with canCoInstall problems for ppc64 vs ppc64p7. BZ 859202.

diff --git a/yum/__init__.py b/yum/__init__.py
index be5a608..e43bf3c 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -4329,6 +4329,28 @@ much more problems).
 
         return False
 
+    def _valid_install_arch(self, po, ipkgs=None):
+        ''' See if we can install this arch of package, mainly for
+            i386 vs. i586 or ppc64 vs. ppc64 etc. '''
+        if not ipkgs:
+            ipkgs = self.rpmdb.searchNames([po.name])
+            for txmbr in self.tsInfo.matchNaevr(po.name):
+                if txmbr.output_state not in TS_INSTALL_STATES:
+                    continue
+                ipkgs.append(txmbr.po)
+
+        for ipkg in ipkgs:
+            if po.arch == ipkg.arch:
+                continue
+            if not po.verEQ(ipkg):
+                continue
+            if canCoinstall(po.arch, ipkg.arch):
+                continue
+            self.verbose_logger.log(logginglevels.INFO_2,
+                    _("Package: %s - can't co-install with %s"), po, ipkg)
+            return False
+        return True
+
     def install(self, po=None, **kwargs):
         """Mark the specified item for installation.  If a package
         object is given, mark it for installation.  Otherwise, mark
@@ -4488,6 +4510,9 @@ much more problems).
                 txmbrs = self.update(po=po)
                 tx_return.extend(txmbrs)
                 continue
+
+            if not self._valid_install_arch(po, ipkgs):
+                continue
             
             #  Make sure we're not installing a package which is obsoleted by
             # something else in the repo. Unless there is a obsoletion loop,
@@ -4861,6 +4886,9 @@ much more problems).
                     tx_return.append(txmbr)
                         
         for available_pkg in availpkgs:
+            if not self._valid_install_arch(available_pkg):
+                continue
+
             # "Just do it" if it's a local pkg.
             if isinstance(available_pkg, YumLocalPackage):
                 n = available_pkg.name
@@ -5373,6 +5401,10 @@ much more problems).
         # installed version. Indexed fromn the latest installed pkgtup.
         downgrade_apkgs = {}
         for pkg in sorted(apkgs):
+            # We are cleverer here, I think...
+            # if not self._valid_install_arch(pkg, ipkgs):
+            # continue
+
             na  = (pkg.name, pkg.arch)
 
             # Here we allow downgrades from .i386 => .noarch, or .i586 => .i386
commit d78c3b5ebf0b72cedfa0f31f90892d0ce067f7f3
Author: James Antill <james at and.org>
Date:   Thu Sep 27 14:26:57 2012 -0400

    Fix multilib error typo, and add a TODO for common case #1.

diff --git a/yum/__init__.py b/yum/__init__.py
index a159706..be5a608 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1190,14 +1190,16 @@ class YumBase(depsolve.Depsolve):
                     bigmsg = _("""\
  Multilib version problems found. This often means that the root
 cause is something else and multilib version checking is just
-pointing it that there is a problem. Eg.:
+pointing out that there is a problem. Eg.:
 
   1. You have an upgrade for %(name)s which is missing some
      dependency that another package requires. Yum is trying to
      solve this by installing an older version of %(name)s of the
      different architecture. If you exclude the bad architecture
      yum will tell you what the root cause is (which package
-     requires what).
+     requires what). You can try redoing the upgrade with
+     --exclude %(name)s.otherarch ... this should give you an error
+     message showing the root cause of the problem.
 
   2. You have multiple architectures of %(name)s installed, but
      yum can only see an upgrade for one of those arcitectures.


More information about the Yum-commits mailing list