Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 112401 Details for
Bug 157357
[PATCH] Add an option to portageq to provide packages that satisfy a virtual
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
virtuals.py
virtual.py (text/plain), 1.14 KB, created by
Petteri Räty (RETIRED)
on 2007-03-07 12:53:04 UTC
(
hide
)
Description:
virtuals.py
Filename:
MIME Type:
Creator:
Petteri Räty (RETIRED)
Created:
2007-03-07 12:53:04 UTC
Size:
1.14 KB
patch
obsolete
>import portage >import sys >import string > ># Code from zmedico in ># https://bugs.gentoo.org/show_bug.cgi?id=157357 ># Ask him when it breaks > >argv = sys.argv[1:] >myroot = argv[0] >pn = argv[1] >try: > slot = argv[2] > myatom = pn + ":" + slot >except IndexError: > myatom = pn > >trees = portage.db >vardb = trees[myroot]["vartree"].dbapi >mysettings = vardb.settings > >try: > myatom = portage.key_expand( > myatom, mydb=vardb, settings=mysettings) > myslots = [] > vdb_matches = vardb.match(myatom) > > for cpv in vdb_matches: > myslots.append(vardb.aux_get(cpv, ["SLOT"])[0]) > > if len(myslots) < 2: > greedy_atoms = [myatom] > else: > greedy_atoms = [] > mykey = portage.dep_getkey(myatom) > for myslot in myslots: > greedy_atoms.append("%s:%s" % (mykey, myslot)) > > for myatom in greedy_atoms: > mycheck = portage.dep_check( > myatom, None, mysettings, myroot=myroot, trees=trees) > if not mycheck[0]: > sys.stderr.write("\n\n%s\n\n" % mycheck[1]) > sys.stderr.write("%s\n\n" % depstring) > sys.exit(1) > for myatom in mycheck[1]: > for cpv in vardb.match(myatom): > if cpv.find(pn) == -1: > print cpv > >except ValueError, e: > portage.writemsg("ValueError:\n", noiselevel=-1)
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 Raw
Actions:
View
Attachments on
bug 157357
:
103508
|
112401
|
112894
|
112907
|
115387
|
274367