summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-14 10:08:51 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-14 10:08:51 +0000
commitcfa8c4c33ceae77cf8e1e6be25df552c7431017c (patch)
treeedade1a5141f30cb7c65e2c96f74d09466c6cb37
parent043a46c6ee4908e80aa712ec2ce34259bd7dd76b (diff)
downloadportage-cfa8c4c33ceae77cf8e1e6be25df552c7431017c.tar.gz
portage-cfa8c4c33ceae77cf8e1e6be25df552c7431017c.tar.bz2
portage-cfa8c4c33ceae77cf8e1e6be25df552c7431017c.zip
Give a useful error message when a dependency has an ambiguous atom due to the category being unspecified. See bug #123677.
svn path=/main/trunk/; revision=3509
-rwxr-xr-xbin/emerge53
1 files changed, 36 insertions, 17 deletions
diff --git a/bin/emerge b/bin/emerge
index cb93c4e36..4809f5ffe 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1023,23 +1023,42 @@ class depgraph:
mydep={}
mp=string.join(mybigkey)
- if myroot=="/":
- mydep["/"]=edepend["DEPEND"]+" "+edepend["RDEPEND"]
- if not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
- return 0
- else:
- mydep["/"]=edepend["DEPEND"]
- mydep[myroot]=edepend["RDEPEND"]
- if not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
- return 0
- if not self.select_dep(myroot,mydep[myroot],myparent=mp,myuse=myuse):
- return 0
-
- if edepend.has_key("PDEPEND") and edepend["PDEPEND"]:
- # Post Depend -- Add to the list without a parent, as it depends
- # on a package being present AND must be built after that package.
- if not self.select_dep(myroot,edepend["PDEPEND"],myuse=myuse):
- return 0
+ try:
+ if myroot=="/":
+ mydep["/"]=edepend["DEPEND"]+" "+edepend["RDEPEND"]
+ if not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
+ return 0
+ else:
+ mydep["/"]=edepend["DEPEND"]
+ mydep[myroot]=edepend["RDEPEND"]
+ if not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
+ return 0
+ if not self.select_dep(myroot,mydep[myroot],myparent=mp,myuse=myuse):
+ return 0
+
+ if edepend.has_key("PDEPEND") and edepend["PDEPEND"]:
+ # Post Depend -- Add to the list without a parent, as it depends
+ # on a package being present AND must be built after that package.
+ if not self.select_dep(myroot,edepend["PDEPEND"],myuse=myuse):
+ return 0
+ except ValueError, e:
+ pkgs = e.args[0]
+ portage.writemsg("\n\n!!! An atom in the dependencies " + \
+ "is not fully-qualified. Multiple matches:\n\n", noiselevel=-1)
+ for cpv in pkgs:
+ portage.writemsg(" %s\n" % cpv, noiselevel=-1)
+ portage.writemsg("\n", noiselevel=-1)
+ if mytype == "binary":
+ portage.writemsg(
+ "!!! This binary package cannot be installed: '%s'\n" % \
+ mykey, noiselevel=-1)
+ elif mytype == "ebuild":
+ myebuild, mylocation = portage.portdb.findname2(mykey)
+ portage.writemsg("!!! This ebuild cannot be installed: " + \
+ "'%s'\n" % myebuild, noiselevel=-1)
+ portage.writemsg("!!! Please notify the package maintainer " + \
+ "that atoms must be fully-qualified.\n", noiselevel=-1)
+ return 0
return 1