[yum-git] yum/__init__.py

Seth Vidal skvidal at linux.duke.edu
Thu Mar 13 07:21:12 UTC 2008


 yum/__init__.py |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 0d38390b7d92e75a63eb557ea9101e7311c78671
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Thu Mar 13 03:18:06 2008 -0400

    make sure that intentional yum install somepkg-not-newest works

diff --git a/yum/__init__.py b/yum/__init__.py
index 76de141..ddb4d59 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2304,6 +2304,23 @@ class YumBase(depsolve.Depsolve):
                         if requiringPo:
                             txmbr.setAsDep(requiringPo)
                         tx_return.append(txmbr)
+
+                # check to see if the pkg we want to install is not _quite_ the newest
+                # one but still technically an update over what is installed.
+                #FIXME - potentially do the comparables thing from what used to
+                #        be in cli.installPkgs() to see what we should be comparing
+                #        it to of what is installed. in the meantime name.arch is
+                #        most likely correct
+
+                pot_updated = self.rpmdb.searchNevra(name=available_pkg.name, arch=available_pkg.arch)
+                for ipkg in pot_updated:
+                    if ipkg.EVR < available_pkg.EVR:
+                        txmbr = self.tsInfo.addUpdate(available_pkg, ipkg)
+                        if requiringPo:
+                            txmbr.setAsDep(requiringPo)
+                        tx_return.append(txmbr)
+                                             
+                 
             for installed_pkg in instpkgs:
                 for updating in self.up.updatesdict.get(installed_pkg.pkgtup, []):
                     updating_pkg = self.getPackageObject(updating)



More information about the Yum-cvs-commits mailing list