Lines 3194-3200
Link Here
|
3194 |
mypos += 1 |
3194 |
mypos += 1 |
3195 |
return newsplit |
3195 |
return newsplit |
3196 |
|
3196 |
|
3197 |
def dep_virtual(mysplit): |
3197 |
def dep_virtual(mysplit, mysettings): |
3198 |
"Does virtual dependency conversion" |
3198 |
"Does virtual dependency conversion" |
3199 |
|
3199 |
|
3200 |
|
3200 |
|
Lines 3202-3220
Link Here
|
3202 |
newsplit=[] |
3202 |
newsplit=[] |
3203 |
for x in mysplit: |
3203 |
for x in mysplit: |
3204 |
if type(x)==types.ListType: |
3204 |
if type(x)==types.ListType: |
3205 |
newsplit.append(dep_virtual(x)) |
3205 |
newsplit.append(dep_virtual(x, mysettings)) |
3206 |
else: |
3206 |
else: |
3207 |
mykey=dep_getkey(x) |
3207 |
mykey=dep_getkey(x) |
3208 |
if virts.has_key(mykey): |
3208 |
if mysettings.virtuals.has_key(mykey): |
3209 |
if len(virts[mykey])==1: |
3209 |
if len(mysettings.virtuals[mykey])==1: |
3210 |
a=string.replace(x, mykey, virts[mykey][0]) |
3210 |
a=string.replace(x, mykey, mysettings.virtuals[mykey][0]) |
3211 |
else: |
3211 |
else: |
3212 |
if x[0]=="!": |
3212 |
if x[0]=="!": |
3213 |
# blocker needs "and" not "or(||)". |
3213 |
# blocker needs "and" not "or(||)". |
3214 |
a=[] |
3214 |
a=[] |
3215 |
else: |
3215 |
else: |
3216 |
a=['||'] |
3216 |
a=['||'] |
3217 |
for y in virts[mykey]: |
3217 |
for y in mysettings.virtuals[mykey]: |
3218 |
a.append(string.replace(x, mykey, y)) |
3218 |
a.append(string.replace(x, mykey, y)) |
3219 |
newsplit.append(a) |
3219 |
newsplit.append(a) |
3220 |
else: |
3220 |
else: |
Lines 3561-3567
Link Here
|
3561 |
mysplit=portage_dep.dep_opconvert(mysplit) |
3561 |
mysplit=portage_dep.dep_opconvert(mysplit) |
3562 |
|
3562 |
|
3563 |
#convert virtual dependencies to normal packages. |
3563 |
#convert virtual dependencies to normal packages. |
3564 |
mysplit=dep_virtual(mysplit) |
3564 |
mysplit=dep_virtual(mysplit, mysettings) |
3565 |
#if mysplit==None, then we have a parse error (paren mismatch or misplaced ||) |
3565 |
#if mysplit==None, then we have a parse error (paren mismatch or misplaced ||) |
3566 |
#up until here, we haven't needed to look at the database tree |
3566 |
#up until here, we haven't needed to look at the database tree |
3567 |
|
3567 |
|