[yum-git] yum/__init__.py
Seth Vidal
skvidal at linux.duke.edu
Thu Mar 13 06:04:54 UTC 2008
yum/__init__.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 6ed8cf839077d17e5cca2d1994c36b2c909627b8
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Mar 13 02:01:49 2008 -0400
if there is an older ver than they have installed available yum doesn't try to install it
when someone types:
yum install some-pkg
don't install it.
diff --git a/yum/__init__.py b/yum/__init__.py
index 1acadf1..76de141 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2159,7 +2159,15 @@ class YumBase(depsolve.Depsolve):
self.verbose_logger.warning(_('Package %s already installed and latest version'), po)
continue
-
+ # make sure we don't have a name.arch of this already installed
+ # if so pass it to update b/c it should be able to figure it out
+ if self.rpmdb.contains(name=po.name, arch=po.arch) and not self.allowedMultipleInstalls(po):
+ if not self.tsInfo.getMembersWithState(po.pkgtup, TS_REMOVE_STATES):
+ self.verbose_logger.warning(_('Package matching %s already installed. Checking for update.'), po)
+ txmbrs = self.update(po=po)
+ tx_return.extend(txmbrs)
+ continue
+
# make sure we're not installing a package which is obsoleted by something
# else in the repo
thispkgobsdict = self.up.checkForObsolete([po.pkgtup])
More information about the Yum-cvs-commits
mailing list