Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150097 - app-admin/localepurge patches
Summary: app-admin/localepurge patches
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: José Alberto Suárez López (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-04 13:03 UTC by Charlie Shepherd (RETIRED)
Modified: 2006-10-13 03:28 UTC (History)
0 users

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


Attachments
First patch - general cleanup (cleanup.patch,8.53 KB, patch)
2006-10-04 13:04 UTC, Charlie Shepherd (RETIRED)
Details | Diff
Second patch - add list action and change operation of pretend action (list.patch,3.50 KB, patch)
2006-10-04 13:05 UTC, Charlie Shepherd (RETIRED)
Details | Diff
Updated second patch - add list action and change operation of pretend action (list.patch,3.50 KB, patch)
2006-10-07 06:38 UTC, Charlie Shepherd (RETIRED)
Details | Diff

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