From 70234559e14244c7fa06ae1cbf09290141fccbeb Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 7 Feb 2007 22:25:01 +0000 Subject: For bug #165783, handle a potential InvalidDependString exception inside doebuild(). (trunk r5920) svn path=/main/branches/2.1.2/; revision=5921 --- pym/portage.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'pym') diff --git a/pym/portage.py b/pym/portage.py index bfacca09c..a3dcd7b06 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -3533,10 +3533,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: -- cgit v1.2.3-1-g7c22