Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 12254 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]
new portage.py patch
portage.py_per_package_use.4.patch (text/plain), 4.16 KB, created by
Max Kalika (RETIRED)
on 2003-05-21 12:24:18 UTC
(
hide
)
Description:
new portage.py patch
Filename:
MIME Type:
Creator:
Max Kalika (RETIRED)
Created:
2003-05-21 12:24:18 UTC
Size:
4.16 KB
patch
obsolete
>--- portage.py.orig 2003-05-21 09:13:02.000000000 -0700 >+++ portage.py 2003-05-21 09:12:43.000000000 -0700 >@@ -55,8 +55,8 @@ > sys.stderr.write(red("*** Please add this user to the portage group if you wish to use portage.\n")) > sys.stderr.write("\n") > >-incrementals=["USE","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"] >-stickies=["KEYWORDS_ACCEPT","USE","CFLAGS","CXXFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EMAKE"] >+incrementals=["USE","PKGUSE","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"] >+stickies=["KEYWORDS_ACCEPT","USE","PKGUSE","CFLAGS","CXXFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EMAKE"] > > def getcwd(): > "this fixes situations where the current directory doesn't exist" >@@ -887,7 +887,7 @@ > self.regenerate() > > def regenerate(self,useonly=0): >- global incrementals,usesplit,profiledir >+ global incrementals,usesplit,pkgusesplit,profiledir > if useonly: > myincrementals=["USE"] > else: >@@ -904,6 +904,8 @@ > continue > #variables are already expanded > mysplit=curdb[mykey].split() >+ if mykey=="USE": >+ mysplit=self.parseuse(mysplit) > for x in mysplit: > if x=="-*": > # "-*" is a special "minus" var that means "unset all settings". so USE="-* gnome" will have *just* gnome enabled. >@@ -920,6 +922,7 @@ > if mysetting[y]==remove: > #we found a previously-defined variable; add it to our dellist for later removal. > dellist.append(mysetting[y]) >+ > for y in dellist: > while y in mysetting: > mysetting.remove(y) >@@ -933,7 +936,59 @@ > for x in string.split(self.configlist[-1]["USE"]): > if x not in self.usemask: > usesplit.append(x) >+ >+ mypkgusesplit=pkgusesplit >+ pkgusesplit={} >+ for x in mypkgusesplit: >+ mypos=0 >+ while mypos<len(mypkgusesplit[x]): >+ if mypkgusesplit[x][mypos] in usesplit: >+ del mypkgusesplit[x][mypos] >+ else: >+ mypos=mypos+1 >+ if mypkgusesplit[x]!=[]: >+ pkgusesplit[x]=mypkgusesplit[x] >+ >+ self.configlist[-1]["PKGUSE"]="" >+ for x in pkgusesplit: >+ self.configlist[-1]["PKGUSE"]=self.configlist[-1]["PKGUSE"]+"( "+x+" => "+string.join(pkgusesplit[x]," ")+" )" > >+ def parseuse(self,myusesplit,mypos=0): >+ global pkgusesplit >+ try: >+ if pkgusesplit: pass >+ except: >+ pkgusesplit={} >+ while mypos<len(myusesplit): >+ if myusesplit[mypos]=="(": >+ firstpos=mypos >+ mypos=mypos+1 >+ while mypos<len(myusesplit): >+ if myusesplit[mypos]==")": >+ if mypos==firstpos+3: >+ myitems=[myusesplit[mypos-1]] >+ elif mypos>firstpos+3: >+ myitems=myusesplit[firstpos+2:mypos] >+ pkg=myusesplit[firstpos+1] >+ pkgusesplit[pkg]=[] >+ for x in myitems: >+ if x=="-*" or x=="*": >+ myusesplit[firstpos:mypos+1]=[] >+ mypos=firstpos-1 >+ break >+ if x[0]=="-": >+ y=x[1:] >+ else: >+ y="-"+x >+ if x not in pkgusesplit[pkg] and y not in pkgusesplit[pkg]: >+ pkgusesplit[pkg].append(x) >+ myusesplit[firstpos:mypos+1]=[] >+ mypos=firstpos-1 >+ break >+ mypos=mypos+1 >+ mypos=mypos+1 >+ return myusesplit >+ > # Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch. > if profiledir: > if self.configdict["defaults"].has_key("ARCH"): >@@ -2507,15 +2562,27 @@ > mydep=mydep[1:] > return prefix+cpv_expand(mydep,mydb)+postfix > >-def dep_check(depstring,mydbapi,use="yes",mode=None): >+def dep_check(depstring,mydbapi,use="yes",mode=None,parent=None): > """Takes a depend string and parses the condition.""" >- global usesplit >+ global usesplit,pkgusesplit > if use=="all": > #enable everything (for repoman) > myusesplit=["*"] > elif use=="yes": > #default behavior >- myusesplit=usesplit >+ myusesplit=usesplit[:] >+ if parent and (pkgusesplit!={}): >+ myparent=pkgsplit(parent.split()[2])[0] >+ if pkgusesplit.has_key(myparent): >+ for x in pkgusesplit[myparent]: >+ if x[0]=="-": >+ y=x[1:] >+ else: >+ y="-"+x >+ if y in myusesplit: >+ myusesplit.remove(y) >+ if x not in myusesplit: >+ 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