Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 101968 Details for
Bug 141118
multiple levels of indirection in virtual deps cause undesirable results
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
recursively collapse new style virtuals
new_virtuals_collapse.patch (text/plain), 2.16 KB, created by
Zac Medico
on 2006-11-15 00:32:33 UTC
(
hide
)
Description:
recursively collapse new style virtuals
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2006-11-15 00:32:33 UTC
Size:
2.16 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 5050) >+++ pym/portage.py (working copy) >@@ -3475,6 +3475,49 @@ > newsplit.append(x) > return newsplit > >+def expand_new_virtuals(mysplit, mydbapi, mysettings, use, mode, myuse, >+ use_cache, use_binaries, myroot, trees, return_all_deps): >+ """ Recursively expand new-style virtuals so as to >+ collapse one or more levels of indirection.""" >+ newsplit = [] >+ dep_keys = ["RDEPEND","DEPEND","PDEPEND"] >+ def compare_pkgs(a, b): >+ return pkgcmp(b[1], a[1]) >+ portdb = trees[myroot]["porttree"].dbapi >+ for x in mysplit: >+ if type(x) == types.ListType: >+ newsplit.append(expand_new_virtuals(x, mydbapi, mysettings, use, >+ mode, myuse, use_cache, use_binaries, myroot, trees, >+ return_all_deps)) >+ continue >+ elif x.startswith("!"): >+ newsplit.append(x) >+ continue >+ elif not dep_getkey(x).startswith("virtual/"): >+ newsplit.append(x) >+ continue >+ pkgs = [] >+ for cpv in portdb.match(x): >+ # only use new-style matches >+ if cpv.startswith("virtual/"): >+ pkgs.append((cpv, pkgsplit(cpv))) >+ if not pkgs: >+ newsplit.append(x) >+ continue >+ pkgs.sort(compare_pkgs) # Prefer higher versions. >+ a = ['||'] >+ for y in pkgs: >+ depstring = " ".join(portdb.aux_get(y[0], dep_keys)) >+ mycheck = dep_check(depstring, mydbapi, mysettings, use=use, >+ mode=mode, myuse=myuse, use_cache=use_cache, >+ use_binaries=use_binaries, myroot=myroot, trees=trees, >+ return_all_deps=return_all_deps) >+ if not mycheck[0]: >+ raise portage_exception.ParseError(mycheck[1]) >+ a.append(mycheck[1]) >+ newsplit.append(a) >+ return newsplit >+ > def dep_eval(deplist): > if not deplist: > return 1 >@@ -3688,6 +3731,12 @@ > elif mysplit==[]: > #dependencies were reduced to nothing > return [1,[]] >+ >+ # Recursively expand new-style virtuals so as to >+ # collapse one or more levels of indirection. >+ mysplit = expand_new_virtuals(mysplit, mydbapi, mysettings, use, mode, >+ myuse, use_cache, use_binaries, myroot, trees, return_all_deps) >+ > mysplit2=mysplit[:] > mysplit2=dep_wordreduce(mysplit2,mysettings,mydbapi,mode,use_cache=use_cache) > if mysplit2 is None:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 141118
: 101968