diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-13 01:18:59 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-13 01:18:59 +0000 |
commit | afdbf28c324422f18fdf58111bfc1451c2a4022d (patch) | |
tree | 3e54882178e52502b328a2cfc400fb297976a9dc | |
parent | ed153d7cd57b0ace0ec085330c0ba66239a5dba5 (diff) | |
download | portage-afdbf28c324422f18fdf58111bfc1451c2a4022d.tar.gz portage-afdbf28c324422f18fdf58111bfc1451c2a4022d.tar.bz2 portage-afdbf28c324422f18fdf58111bfc1451c2a4022d.zip |
Bug #202036 - In case of blockers, bail out earlier so that later
code can assume there are no blockers.
svn path=/main/trunk/; revision=8889
-rw-r--r-- | pym/_emerge/__init__.py | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 0bebfef60..28c30d96a 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -4097,19 +4097,6 @@ class MergeTask(object): ldpath_mtimes = mtimedb["ldpath"] xterm_titles = "notitles" not in self.settings.features - #check for blocking dependencies - if "--fetchonly" not in self.myopts and \ - "--fetch-all-uri" not in self.myopts and \ - "--buildpkgonly" not in self.myopts: - for x in mylist: - if x[0]=="blocks": - print "\n!!! Error: the "+x[2]+" package conflicts with another package;" - print "!!! the two packages cannot be installed on the same system together." - print "!!! Please use 'emerge --pretend' to determine blockers." - if "--quiet" not in self.myopts: - show_blocker_docs_link() - return 1 - if "--resume" in self.myopts: # We're resuming. print colorize("GOOD", "*** Resuming merge...") @@ -6534,13 +6521,27 @@ def action_build(settings, trees, mtimedb, ("--pretend" in myopts), mydbapi=trees[pkgline[1]]["porttree"].dbapi, tree="porttree") - if "--fetchonly" in myopts or "--fetch-all-uri" in myopts: - pkglist = [] - for pkg in mydepgraph.altlist(): - if pkg[0] != "blocks": - pkglist.append(pkg) + + pkglist = mydepgraph.altlist() + + if fetchonly or "--buildpkgonly" in myopts: + pkglist = [pkg for pkg in pkglist if pkg[0] != "blocks"] else: - pkglist = mydepgraph.altlist() + for x in pkglist: + if x[0] != "blocks": + continue + msg = "Error: the " + x[2] + " package conflicts " + \ + "with another package; the two packages cannot " + \ + "be installed on the same system together. " + \ + "Please use 'emerge --pretend' to determine blockers." + prefix = red(" * ") + from textwrap import wrap + for line in wrap(msg, 70): + print prefix + line + if "--quiet" not in myopts: + show_blocker_docs_link() + return 1 + mydepgraph.saveNomergeFavorites() del mydepgraph mergetask = MergeTask(settings, trees, myopts) |