summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-07-25 14:45:32 -0700
committerZac Medico <zmedico@gentoo.org>2010-07-25 14:45:32 -0700
commit39e813686999f4ea530938b500f5107fd5d78ab6 (patch)
treed2ab17d29cd5650fbe2da9b77283c3ec9667bd1a
parentc4fdf0e53398e4917c64901da626ced4c6357010 (diff)
downloadportage-39e813686999f4ea530938b500f5107fd5d78ab6.tar.gz
portage-39e813686999f4ea530938b500f5107fd5d78ab6.tar.bz2
portage-39e813686999f4ea530938b500f5107fd5d78ab6.zip
Bug #329159 - If there are merge collisions are detected, only search for
owners if either collision-protect or protect-owned is enabled.
-rw-r--r--pym/portage/dbapi/vartree.py44
1 files changed, 23 insertions, 21 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index c1266bcf2..304b82ee6 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3737,31 +3737,33 @@ class dblink(object):
eerror(msg)
- msg = []
- msg.append("")
- msg.append(_("Searching all installed"
- " packages for file collisions..."))
- msg.append("")
- msg.append(_("Press Ctrl-C to Stop"))
- msg.append("")
- eerror(msg)
-
- owners = self.vartree.dbapi._owners.get_owners(collisions)
- self.vartree.dbapi.flush_cache()
-
- for pkg, owned_files in owners.items():
- cpv = pkg.mycpv
+ owners = None
+ if collision_protect or protect_owned:
msg = []
- msg.append("%s" % cpv)
- for f in sorted(owned_files):
- msg.append("\t%s" % os.path.join(destroot,
- f.lstrip(os.path.sep)))
+ msg.append("")
+ msg.append(_("Searching all installed"
+ " packages for file collisions..."))
+ msg.append("")
+ msg.append(_("Press Ctrl-C to Stop"))
msg.append("")
eerror(msg)
- if not owners:
- eerror([_("None of the installed"
- " packages claim the file(s)."), ""])
+ owners = self.vartree.dbapi._owners.get_owners(collisions)
+ self.vartree.dbapi.flush_cache()
+
+ for pkg, owned_files in owners.items():
+ cpv = pkg.mycpv
+ msg = []
+ msg.append("%s" % cpv)
+ for f in sorted(owned_files):
+ msg.append("\t%s" % os.path.join(destroot,
+ f.lstrip(os.path.sep)))
+ msg.append("")
+ eerror(msg)
+
+ if not owners:
+ eerror([_("None of the installed"
+ " packages claim the file(s)."), ""])
# The explanation about the collision and how to solve
# it may not be visible via a scrollback buffer, especially