Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 15347 Details for
Bug 13616
per package USE flags and KEYWORDS
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
portage.py-2.0.49_pre17-per_package_use_flags.patch
portage.py-2.0.49_pre17-per_package_use_flags.patch (text/plain), 3.68 KB, created by
Max Kalika (RETIRED)
on 2003-08-01 17:15:56 UTC
(
hide
)
Description:
portage.py-2.0.49_pre17-per_package_use_flags.patch
Filename:
MIME Type:
Creator:
Max Kalika (RETIRED)
Created:
2003-08-01 17:15:56 UTC
Size:
3.68 KB
patch
obsolete
>--- portage.py.orig 2003-08-01 16:47:42.000000000 -0700 >+++ portage.py 2003-08-01 17:07:50.000000000 -0700 >@@ -897,6 +897,7 @@ > sys.exit(1) > self.configlist.append(self.mygcfg) > self.configdict["conf"]=self.configlist[-1] >+ self.configdict["conf"]["PKGUSE"]=grabdict("/etc/portage/package.use") > > for x in incrementals: > if os.environ.has_key(x): >@@ -925,7 +926,11 @@ > self.regenerate() > > def regenerate(self,useonly=0): >- global incrementals,usesplit,profiledir >+ global incrementals,usesplit,pkgusesplit,profiledir >+ >+ # initialize per-package use variables to an empty dictionary >+ pkgusesplit={} >+ > if useonly: > myincrementals=["USE"] > else: >@@ -968,6 +973,34 @@ > #now append our new setting > if add: > mysetting.append(add) >+ #override per-package use flags >+ if mykey=="USE" and pkgusesplit!={}: >+ for y in pkgusesplit: >+ if add in pkgusesplit[y]: >+ pkgusesplit[y].remove(add) >+ if add[0]=="-" and add[1:] in pkgusesplit[y]: >+ pkgusesplit[y].remove(add[1:]) >+ if add[0]!="-" and "-"+add in pkgusesplit[y]: >+ pkgusesplit[y].remove("-"+add) >+ >+ # initialize per-package use flags >+ if mykey=="USE" and curdb.has_key("PKGUSE"): >+ for x in curdb["PKGUSE"]: >+ if x[0]=="#": >+ continue >+ mypkgusesplit=[] >+ for y in curdb["PKGUSE"][x]: >+ if y=="-*" or y=="*": >+ continue >+ if y[0]=="-": >+ z=y[1:] >+ else: >+ z="-"+y >+ if y not in mysetting and y not in mypkgusesplit and z not in mypkgusesplit: >+ mypkgusesplit.append(y) >+ if mypkgusesplit: >+ pkgusesplit[x]=mypkgusesplit >+ > #store setting in last element of configlist, the original environment: > self.configlist[-1][mykey]=string.join(mysetting," ") > #cache split-up USE var in a global >@@ -993,6 +1026,15 @@ > usesplit.insert(0,self.configdict["defaults"]["ARCH"]) > self.configlist[-1]["USE"]=string.join(usesplit," ") > >+ # Store per-package setting in configlist for display in emerge --info >+ self.configlist[-1]["PKGUSE"]="" >+ mypkgusesplit=pkgusesplit.copy() >+ for x in mypkgusesplit: >+ if pkgusesplit[x]==[]: >+ del(pkgusesplit[x]) >+ else: >+ self.configlist[-1]["PKGUSE"]=self.configlist[-1]["PKGUSE"]+"( "+x+" => "+string.join(pkgusesplit[x]," ")+" )" >+ > def __getitem__(self,mykey): > if mykey=="CONFIG_PROTECT_MASK": > suffix=" /etc/env.d" >@@ -1546,6 +1588,9 @@ > settings["PVR"]=mysplit[1] > else: > settings["PVR"]=mysplit[1]+"-"+mysplit[2] >+ >+ settings["PUSE"]=string.join(dep_getpuse(category+"/"+pf)," ") >+ > settings["SLOT"]="" > if settings.has_key("PATH"): > mysplit=string.split(settings["PATH"],":") >@@ -2565,7 +2610,23 @@ > mydep=mydep[1:] > return prefix+cpv_expand(mydep,mydb)+postfix > >-def dep_check(depstring,mydbapi,use="yes",mode=None): >+def dep_getpuse(mypkg): >+ global usesplit,pkgusesplit >+ if not len(mypkg): >+ return [] >+ mylist=[] >+ for x in pkgusesplit: >+ if db["/"]["porttree"].dbapi.xmatch("bestmatch-list", x, None, None, [mypkg]): >+ for y in pkgusesplit[x]: >+ if y[0]=="-": >+ z=y[1:] >+ else: >+ z="-"+y >+ if z not in mylist and y not in mylist and z in usesplit: >+ mylist.append(y) >+ return mylist >+ >+def dep_check(depstring,mydbapi,use="yes",mode=None,parent=None): > """Takes a depend string and parses the condition.""" > global usesplit > if use=="all": >@@ -2573,7 +2634,13 @@ > myusesplit=["*"] > elif use=="yes": > #default behavior >- myusesplit=usesplit >+ myusesplit=usesplit[:] >+ if parent: >+ for x in dep_getpuse(parent.split()[2]): >+ if x[0]=="-": >+ myusesplit.remove(x[1:]) >+ else: >+ myusesplit.append(x) > else: > #we are being run by autouse(), don't consult USE vars yet. > myusesplit=[]
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 13616
:
7155
|
7156
|
7264
|
7265
|
9218
|
9219
|
10588
|
10589
|
12254
|
12255
|
13752
|
13753
|
14390
|
14678
|
14679
|
14847
|
14873
|
15239
|
15240
|
15241
|
15291
|
15303
|
15304
|
15347
|
15348
|
15349
|
15614
|
15715
|
16609
|
16610
|
16611
|
16768
|
17925
|
17926
|
19128
|
20637
|
20652
|
21575
|
21577