diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-04 07:25:38 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-04 07:25:38 +0000 |
commit | a6de25c7e939868c7e1896af32e65e39222df85c (patch) | |
tree | 0bd42165b6069af14c61194aaa43abea99cc3d15 | |
parent | b5d2bc19effeb36929b41897b681249f93d39cdf (diff) | |
download | portage-a6de25c7e939868c7e1896af32e65e39222df85c.tar.gz portage-a6de25c7e939868c7e1896af32e65e39222df85c.tar.bz2 portage-a6de25c7e939868c7e1896af32e65e39222df85c.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().
svn path=/main/trunk/; revision=7917
-rw-r--r-- | pym/portage/__init__.py | 1 | ||||
-rw-r--r-- | pym/portage/dbapi/porttree.py | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 3f180288d..608214f0a 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3065,7 +3065,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"])) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 2c205ae9e..824d1afc4 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -383,7 +383,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() @@ -396,7 +397,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] |