Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 140822

Summary: regex config and pretend in app-admin/localepurge
Product: Gentoo Linux Reporter: Rick Morra <rjm40>
Component: Current packagesAssignee: José Alberto Suárez López (RETIRED) <bass>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: Low    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: diff file to add pretend and regex configuration

Description Rick Morra 2006-07-17 13:11:09 UTC
I was looking to use localepurge on my Gentoo box and saw that it would be too easy to purge locales I would rather keep. So I edited /usr/bin/localepurge to add 2 new features:

1) A pretend option which displays the directories which would be purged.

2) The ability to use regex patterns in the locale.nopurge file; i.e.: "es.*" would not purge any Spanish locales or "en_US.*" would not purge any US English locales.  This is accomplished by using the locale.nopurge file as a pattern to prune the LOCALELIST in memory, then using this pruned list to check for directories to purge.

I am attaching the diff file between /usr/bin/localepurge (0.5.1) and my revisions in localepurge.new

Also, while working on this, I noticed that if no options were specified on the command line, the VERBOSE and NOCOLOR options in /etc/locale.nopurge were never checked.  This is also addressed in the diff file.
Comment 1 Rick Morra 2006-07-17 13:12:34 UTC
Created attachment 92021 [details, diff]
diff file to add pretend and regex configuration
Comment 2 José Alberto Suárez López (RETIRED) gentoo-dev 2006-07-18 00:11:42 UTC
tahnks for the paatch, it is now in 0.5.2 :)