summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/depgraph.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-11 00:57:11 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-13 20:25:00 -0800
commitfe1da139518296dbd31c8d55c6baca065ace0017 (patch)
tree0e01ecf27b546cd0b6c35ea03cc2f1e4b92c4c57 /pym/_emerge/depgraph.py
parentfa27cc81397464861b97d04f54869ae3960463ae (diff)
downloadportage-fe1da139518296dbd31c8d55c6baca065ace0017.tar.gz
portage-fe1da139518296dbd31c8d55c6baca065ace0017.tar.bz2
portage-fe1da139518296dbd31c8d55c6baca065ace0017.zip
depgraph: avoid reinstall of identical binpkg
This will fix bug #354441.
Diffstat (limited to 'pym/_emerge/depgraph.py')
-rw-r--r--pym/_emerge/depgraph.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index fe706af40..004103c0d 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2977,6 +2977,7 @@ class depgraph(object):
existing_node = None
myeb = None
rebuilt_binaries = 'rebuilt_binaries' in self._dynamic_config.myparams
+ usepkg = "--usepkg" in self._frozen_config.myopts
usepkgonly = "--usepkgonly" in self._frozen_config.myopts
empty = "empty" in self._dynamic_config.myparams
selective = "selective" in self._dynamic_config.myparams
@@ -3078,6 +3079,20 @@ class depgraph(object):
# to a KEYWORDS mask. See bug #252167.
if pkg.type_name != "ebuild" and matched_packages:
+ # Don't re-install a binary package that is
+ # identical to the currently installed package
+ # (see bug #354441).
+ identical_binary = False
+ if usepkg and pkg.installed:
+ for selected_pkg in matched_packages:
+ if selected_pkg.type_name == "binary" and \
+ selected_pkg.cpv == pkg.cpv and \
+ selected_pkg.metadata.get('BUILD_TIME') == \
+ pkg.metadata.get('BUILD_TIME'):
+ identical_binary = True
+ break
+
+ if not identical_binary:
# If the ebuild no longer exists or it's
# keywords have been dropped, reject built
# instances (installed or binary).