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

Bug 150097

Summary: app-admin/localepurge patches
Product: Gentoo Linux Reporter: Charlie Shepherd (RETIRED) <masterdriverz>
Component: New packagesAssignee: José Alberto Suárez López (RETIRED) <bass>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: First patch - general cleanup
Second patch - add list action and change operation of pretend action
Updated second patch - add list action and change operation of pretend action

Description Charlie Shepherd (RETIRED) gentoo-dev 2006-10-04 13:03:44 UTC
Here are two patches for localepurge-0.5.2. The first is a general cleanup patch, the second moves what used to be the pretending action to a new action called list (I felt this was more appropriate for what it does), and creates a new pretend action printing all the files that would be deleted if run without pretend. See a more detailed summary below.

Patch 1:
eerror echoes to stderr
Line up and help text and put it in alphabetical order
Put option parsing in alphabetical order
Change option parsing to elifs, and add an else clause for unrecognised options
Apply consistant coding style:
    Indent = 4 spaces
    if [ .. ]; then
Remove replicated code
Add verbosity requirement to pretend status info

Patch 2:
Define default ACTION as /bin/rm
Define new print function
Add list to option parsing and help
Crash out on list and pretend enabled at the same time
Change /bin/rm to ACTION
Change PRETEND to LIST in certain places
Add pretend status message and change wording of list status message
Comment 1 Charlie Shepherd (RETIRED) gentoo-dev 2006-10-04 13:04:44 UTC
Created attachment 98793 [details, diff]
First patch - general cleanup
Comment 2 Charlie Shepherd (RETIRED) gentoo-dev 2006-10-04 13:05:39 UTC
Created attachment 98794 [details, diff]
Second patch - add list action and change operation of pretend action
Comment 3 Charlie Shepherd (RETIRED) gentoo-dev 2006-10-07 06:38:52 UTC
Created attachment 99042 [details, diff]
Updated second patch - add list action and change operation of pretend action

The original second patch had a syntax error - bash would choke on "else;". This is now fixed.
Comment 4 José Alberto Suárez López (RETIRED) gentoo-dev 2006-10-13 03:28:39 UTC
thanks, nice patch :)
0.5.3 now in CVS