Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 137907
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: José Alberto Suárez López <bass@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Charlie Shepherd (RETIRED) <masterdriverz@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
rewrite.diff Patch to change the way localpurge parses options patch Charlie Shepherd (RETIRED) 2006-06-25 01:14 0000 3.52 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 137907 depends on: Show dependency tree
Bug 137907 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-06-25 01:12 0000
Localepurge currently parses options like this

if [ "$1" = "-debug" ] || [ "$1" = "-d" ] \
    || [ "$2" = "-debug" ] || [ "$2" = "-d" ] \
    || [ "$3" = "-debug" ] || [ "$3" = "-d" ] \
    || [ "$4" = "-debug" ] || [ "$4" = "-d" ] \
    || [ "$5" = "-debug" ] || [ "$5" = "-d" ]; then
set -x
fi

So if I (ok so this is unlikely) execute localepurge -nc -nc -nc -nc -nc -debug
it won't find debug. A better way of doing it is

for x in $@
do
    if "$x" = "-debug" ] || [ "$x" = "-d"; then
    set -x
    fi
done

See the attached patch for more comprehensive rewrite.

------- Comment #1 From Charlie Shepherd (RETIRED) 2006-06-25 01:14:40 0000 -------
Created an attachment (id=90077) [details]
Patch to change the way localpurge parses options

------- Comment #2 From José Alberto Suárez López 2006-07-13 03:08:01 0000 -------
Thanks :)

nice patch, 0.5.1 now in cvs

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug