From: Jason Stubbs Date: Sun, 29 Jan 2006 11:51:51 +0000 (-0000) Subject: Allow || ( ) deps that have no default atoms (or turn out empty). X-Git-Tag: v2.1_pre5_2760~124 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e23ac8156f77fe5e965625c220e55c5dec2bac94;p=portage.git Allow || ( ) deps that have no default atoms (or turn out empty). Released in 2.1_pre4-r1. #120803 svn path=/main/trunk/; revision=2604 --- diff --git a/pym/portage.py b/pym/portage.py index 0ef963058..2a13f0c8a 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -3161,6 +3161,11 @@ def dep_eval(deplist): return 1 elif x==1: return 1 + #XXX: unless there's no available atoms in the list + #in which case we need to assume that everything is + #okay as some ebuilds are relying on an old bug. + if len(deplist) == 1: + return 1 return 0 else: for x in deplist: diff --git a/pym/portage_dep.py b/pym/portage_dep.py index 99c00d041..dc0ee4d14 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -87,7 +87,9 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]): if additions: rlist.append(additions) elif rlist and rlist[-1] == "||": - raise portage_exception.InvalidDependString("No default atom(s) in \""+paren_enclose(deparray)+"\"") + #XXX: Currently some DEPEND strings have || lists without default atoms. + # raise portage_exception.InvalidDependString("No default atom(s) in \""+paren_enclose(deparray)+"\"") + rlist.append([]) else: if head[-1] == "?": # Use reduce next group on fail.