Allow || ( ) deps that have no default atoms (or turn out empty).
authorJason Stubbs <jstubbs@gentoo.org>
Sun, 29 Jan 2006 11:51:51 +0000 (11:51 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Sun, 29 Jan 2006 11:51:51 +0000 (11:51 -0000)
Released in 2.1_pre4-r1. #120803

svn path=/main/trunk/; revision=2604

pym/portage.py
pym/portage_dep.py

index 0ef963058d9bc179a9efd9b97cc13c930ffd3fe1..2a13f0c8a1f4dd620bc1a278572f4121ca109062 100644 (file)
@@ -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:
index 99c00d04194f68889ec304591caf38ee89f2f133..dc0ee4d1437fceddef24ce1077a4fbc18901b417 100644 (file)
@@ -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.