Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 96915 Details for
Bug 14321
CONFIG_PROTECT_FILES & CONFIG_PROTECT_FILES_MASK
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
make emerge scan for individual files
chk_updated_cfg_files.patch (text/plain), 1.69 KB, created by
Zac Medico
on 2006-09-13 16:02:31 UTC
(
hide
)
Description:
make emerge scan for individual files
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2006-09-13 16:02:31 UTC
Size:
1.69 KB
patch
obsolete
>diff --git a/bin/emerge b/bin/emerge >index 68b6722..7ed596c 100755 >--- a/bin/emerge >+++ b/bin/emerge >@@ -20,7 +20,7 @@ try: > except KeyboardInterrupt: > sys.exit(1) > >-import os >+import os, stat > os.environ["PORTAGE_CALLER"]="emerge" > sys.path = ["/usr/lib/portage/pym"]+sys.path > >@@ -2521,15 +2521,29 @@ def chk_updated_cfg_files(target_root, c > procount=0 > for x in config_protect: > x = os.path.join(target_root, x.lstrip(os.path.sep)) >- if os.path.isdir(x): >- a=commands.getstatusoutput("cd "+x+"; find . -iname '._cfg????_*'") >- if a[0]!=0: >- print " "+red("*")+" error scanning",x >- else: >- files=string.split(a[1]) >- if files: >- procount=procount+1 >- print " "+yellow("* IMPORTANT:")+"",len(files),"config files in",x,"need updating." >+ try: >+ mymode = os.lstat(x).st_mode >+ except OSError: >+ continue >+ if stat.S_ISDIR(mymode): >+ mycommand = "cd '%s'; find . -name '._cfg????_*'" % x >+ else: >+ mycommand = "cd '%s'; find . -maxdepth 1 -name '._cfg????_%s'" % \ >+ os.path.split(x.rstrip(os.path.sep)) >+ a = commands.getstatusoutput(mycommand) >+ if a[0] != 0: >+ print >> sys.stderr, " " + bad("*")+ " error scanning '%s'" % x >+ else: >+ files = a[1].split() >+ if files: >+ procount += 1 >+ print colorize("WARN", " * IMPORTANT:"), >+ if stat.S_ISDIR(mymode): >+ print "%d config files in '%s' need updating." % \ >+ (len(files), x) >+ else: >+ print "config file '%s' needs updating." % x >+ > if procount: > #print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files." > print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
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 14321
:
25352
|
96837
|
96850
| 96915 |
97005
|
97009