Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140822 - regex config and pretend in app-admin/localepurge
Summary: regex config and pretend in app-admin/localepurge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Low enhancement (vote)
Assignee: José Alberto Suárez López (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-17 13:11 UTC by Rick Morra
Modified: 2006-07-18 00:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
diff file to add pretend and regex configuration (localepurge.patch,6.45 KB, patch)
2006-07-17 13:12 UTC, Rick Morra
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 :)