Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 14830 Details for
Bug 24990
[patch] CLEAN_PROTECT to protect modules from portage clean
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
portage-2.0.49_pre12--clean_protect.patch
portage--clean_protect.patch (text/plain), 3.21 KB, created by
TGL
on 2003-07-21 12:57:18 UTC
(
hide
)
Description:
portage-2.0.49_pre12--clean_protect.patch
Filename:
MIME Type:
Creator:
TGL
Created:
2003-07-21 12:57:18 UTC
Size:
3.21 KB
patch
obsolete
>--- portage.py.orig 2003-07-21 20:35:18.000000000 +0200 >+++ portage.py 2003-07-21 21:15:09.000000000 +0200 >@@ -76,7 +76,7 @@ > 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"] >+incrementals=["USE","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","CLEAN_PROTECT_MASK","CLEAN_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"] > stickies=["KEYWORDS_ACCEPT","USE","CFLAGS","CXXFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EMAKE"] > > def getcwd(): >@@ -433,7 +433,7 @@ > continue > pos=pos+1 > >- specials={"KDEDIRS":[],"PATH":[],"CLASSPATH":[],"LDPATH":[],"MANPATH":[],"INFODIR":[],"INFOPATH":[],"ROOTPATH":[],"CONFIG_PROTECT":[],"CONFIG_PROTECT_MASK":[],"PRELINK_PATH":[],"PRELINK_PATH_MASK":[]} >+ specials={"KDEDIRS":[],"PATH":[],"CLASSPATH":[],"LDPATH":[],"MANPATH":[],"INFODIR":[],"INFOPATH":[],"ROOTPATH":[],"CONFIG_PROTECT":[],"CONFIG_PROTECT_MASK":[],"CLEAN_PROTECT":[],"CLEAN_PROTECT_MASK":[],"PRELINK_PATH":[],"PRELINK_PATH_MASK":[]} > env={} > > for x in fns: >@@ -528,7 +528,7 @@ > if len(specials[path])==0: > continue > outstring="export "+path+"='" >- if path in ["CONFIG_PROTECT","CONFIG_PROTECT_MASK"]: >+ if path in ["CONFIG_PROTECT","CONFIG_PROTECT_MASK","CLEAN_PROTECT","CLEAN_PROTECT_MASK"]: > for x in specials[path][:-1]: > outstring += x+" " > else: >@@ -4097,6 +4097,20 @@ > if os.path.isdir(ppath): > self.protectmask.append(ppath) > #if it doesn't exist, silently skip it >+ >+ self.cleanprotect=[] >+ for x in string.split(settings["CLEAN_PROTECT"]): >+ ppath=os.path.normpath(self.myroot+"/"+x)+"/" >+ if os.path.isdir(ppath): >+ self.cleanprotect.append(ppath) >+ #if it doesn't exist, silently skip it >+ >+ self.cleanprotectmask=[] >+ for x in string.split(settings["CLEAN_PROTECT_MASK"]): >+ ppath=os.path.normpath(self.myroot+"/"+x)+"/" >+ if os.path.isdir(ppath): >+ self.cleanprotectmask.append(ppath) >+ #if it doesn't exist, silently skip it > > def isprotected(self,obj): > """Checks if obj is in the current protect/mask directories. Returns >@@ -4113,6 +4127,21 @@ > masked=len(pmpath) > return (protected > masked) > >+ def iscleanprotected(self,obj): >+ """Checks if obj is in the current clean protect/mask directories. Returns >+ 0 on unprotected/masked, and 1 on protected.""" >+ masked=0 >+ protected=0 >+ for ppath in self.cleanprotect: >+ if (len(ppath) > masked) and (obj[0:len(ppath)]==ppath): >+ protected=len(ppath) >+ #config file management >+ for pmpath in self.cleanprotectmask: >+ if (len(pmpath) >= protected) and (obj[0:len(pmpath)]==pmpath): >+ #skip, it's in the mask >+ masked=len(pmpath) >+ return (protected > masked) >+ > def unmerge(self,pkgfiles=None,trimworld=1): > if not pkgfiles: > print "No package files given... Grabbing a set." >@@ -4154,6 +4183,10 @@ > if self.isprotected(obj): > print "--- cfgpro "+str(pkgfiles[obj][0]), obj > continue >+ >+ if self.iscleanprotected(obj): >+ print "--- clnpro "+str(pkgfiles[obj][0]), obj >+ continue > > lstatobj=os.lstat(obj) > lmtime=str(lstatobj[ST_MTIME])
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 24990
:
14830
|
17830
|
17924
|
18007