summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-05 03:20:50 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-05 03:20:50 +0000
commitc31f3e5bcf72c80b3ba529201015669c942c4137 (patch)
tree4aff4318c7e80a9f769046d68b276936ab5f8f46 /pym/portage.py
parent4ea96d5f484abfc26ff3e254cb9ba7f2ae572a18 (diff)
downloadportage-c31f3e5bcf72c80b3ba529201015669c942c4137.tar.gz
portage-c31f3e5bcf72c80b3ba529201015669c942c4137.tar.bz2
portage-c31f3e5bcf72c80b3ba529201015669c942c4137.zip
Include the package name in all exceptions raised from
portdbapi.getfetchlist() so that a redundant and sometimes inaccurate message doesn't have to be shown when the error is caught in digestgen(). (trunk r7917) svn path=/main/branches/2.1.2/; revision=7939
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index d17facf8f..c12f39b09 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -3023,7 +3023,6 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
distfiles_map.setdefault(myfile, []).append(cpv)
except portage_exception.InvalidDependString, e:
writemsg("!!! %s\n" % str(e), noiselevel=-1)
- writemsg("!!! Invalid SRC_URI for '%s'.\n" % cpv, noiselevel=-1)
del e
return 0
mytree = os.path.dirname(os.path.dirname(mysettings["O"]))
@@ -6355,7 +6354,8 @@ class portdbapi(dbapi):
# Convert this to an InvalidDependString exception
# since callers already handle it.
raise portage_exception.InvalidDependString(
- "getfetchlist(): Unsupported EAPI: '%s'" % eapi.lstrip("-"))
+ "getfetchlist(): '%s' has unsupported EAPI: '%s'" % \
+ (mypkg, eapi.lstrip("-")))
if useflags is None:
useflags = mysettings["USE"].split()
@@ -6368,7 +6368,9 @@ class portdbapi(dbapi):
for x in newuris:
mya = os.path.basename(x)
if not mya:
- raise portage_exception.InvalidDependString("URI has no basename: '%s'" % x)
+ raise portage_exception.InvalidDependString(
+ "getfetchlist(): '%s' SRC_URI has no file name: '%s'" % \
+ (mypkg, x))
if not mya in myfiles:
myfiles.append(mya)
return [newuris, myfiles]