summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-07 22:24:06 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-07 22:24:06 +0000
commitc546f9cd63b267ad9cb33851ba97b785c8439ce0 (patch)
treeeabfeacca48d1163b6594a9a363044195c18ccb8
parent44f267dcadde9890d138cad7367d8b1023481216 (diff)
downloadportage-c546f9cd63b267ad9cb33851ba97b785c8439ce0.tar.gz
portage-c546f9cd63b267ad9cb33851ba97b785c8439ce0.tar.bz2
portage-c546f9cd63b267ad9cb33851ba97b785c8439ce0.zip
For bug #165783, handle a potential InvalidDependString exception inside doebuild().
svn path=/main/trunk/; revision=5920
-rw-r--r--pym/portage/__init__.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 5ba744660..1bcc0faff 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2701,7 +2701,7 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
try:
for myfile in fetchlist_dict[cpv]:
distfiles_map.setdefault(myfile, []).append(cpv)
- except portage_exception.InvalidDependString, e:
+ except portage.exception.InvalidDependString, e:
writemsg("!!! %s\n" % str(e), noiselevel=-1)
writemsg("!!! Invalid SRC_URI for '%s'.\n" % cpv, noiselevel=-1)
del e
@@ -3560,10 +3560,16 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
# Make sure we get the correct tree in case there are overlays.
mytree = os.path.realpath(
os.path.dirname(os.path.dirname(mysettings["O"])))
- newuris, alist = mydbapi.getfetchlist(
- mycpv, mytree=mytree, mysettings=mysettings)
- alluris, aalist = mydbapi.getfetchlist(
- mycpv, mytree=mytree, all=True, mysettings=mysettings)
+ try:
+ newuris, alist = mydbapi.getfetchlist(
+ mycpv, mytree=mytree, mysettings=mysettings)
+ alluris, aalist = mydbapi.getfetchlist(
+ mycpv, mytree=mytree, all=True, mysettings=mysettings)
+ except portage.exception.InvalidDependString, e:
+ writemsg("!!! %s\n" % str(e), noiselevel=-1)
+ writemsg("!!! Invalid SRC_URI for '%s'.\n" % mycpv, noiselevel=-1)
+ del e
+ return 1
mysettings["A"] = " ".join(alist)
mysettings["AA"] = " ".join(aalist)
if ("mirror" in features) or fetchall: