Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 24275 Details for
Bug 2272
portage: ability to depend on USE flags being enabled
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
have_flags.patch
have_flags.patch (text/plain), 1.28 KB, created by
TGL
on 2004-01-23 02:32:22 UTC
(
hide
)
Description:
have_flags.patch
Filename:
MIME Type:
Creator:
TGL
Created:
2004-01-23 02:32:22 UTC
Size:
1.28 KB
patch
obsolete
>--- bin/portageq.orig 2004-01-23 10:09:58.000000000 +0100 >+++ bin/portageq 2004-01-23 11:07:49.587331955 +0100 >@@ -61,6 +61,26 @@ > except KeyError: > sys.exit(1) > >+def have_flags(argv): >+ """<root> <category/package> [<use_flag>]+ >+ Returns 0 if all the matching packages have the requested USE flags, 0 otherwise. >+ """ >+ if (len(argv) < 3): >+ print "ERROR: insufficient parameters!" >+ sys.exit(2) >+ myflaglist=argv[2:] >+ myvdbapi=portage.db[argv[0]]["vartree"].dbapi >+ try: >+ mypkglist=myvdbapi.match(argv[1]) >+ for mypkg in mypkglist: >+ mypkgflags=string.split(myvdbapi.aux_get(mypkg,['USE'])[0]) >+ for myflag in myflaglist: >+ if not (myflag in mypkgflags): >+ sys.exit(1) >+ sys.exit(0) >+ except KeyError: >+ sys.exit(1) >+ > > def mass_best_version(argv): > """<root> [<category/package>]+ >--- bin/ebuild.sh.orig 2004-01-23 10:28:28.000000000 +0100 >+++ bin/ebuild.sh 2004-01-23 10:31:15.590854112 +0100 >@@ -202,6 +202,16 @@ > fi > } > >+have_flags() { >+ # return shell-true/shell-false if all matching pkgs have the requested flags. >+ # Takes a single depend-type atoms and a USE flag list. >+ if /usr/lib/portage/bin/portageq 'have_flags' "${ROOT}" "$@"; then >+ return 0 >+ else >+ return 1 >+ fi >+} >+ > best_version() { > # returns the best/most-current match. > # Takes single depend-type atoms.
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 2272
:
24275