If localepurge is called with -nocolor or -nc, the script exits complaining about the unknown parameter. For the -nocolor -debug switches to apply for other options with immediate effect, these parameters are parsed upfront. The second parameter loop does not check them again, therefore they end up in the else block for unknown parameters. Reproducible: Always Steps to Reproduce: 1. Call "localepurge -nc" Actual Results: localepurge exiting at parameter parsing because of an unknown option. Expected Results: normal operation.
Created attachment 363062 [details, diff] Patch fixing the issue by adding an empty if block for -nocolor and -debug options.
Created attachment 363112 [details, diff] Quick fix: patch for ebuild.
Created attachment 363114 [details, diff] Quick fix: patch named suitable for the ebuild patch.
(In reply to Jan-Matthias Braun from comment #3) > Created attachment 363114 [details, diff] [details, diff] > Quick fix: patch named suitable for the ebuild patch. There's a small error in the patch. I submit a corrected version (with improved English in the comments :) )
Created attachment 399308 [details, diff] Corrected fix_options_parsing.patch Corrected the number of lines in the patch from 15 to 14.
(In reply to Peter Humphrey from comment #4) > (In reply to Jan-Matthias Braun from comment #3) > > Created attachment 363114 [details, diff] [details, diff] [details, diff] > > Quick fix: patch named suitable for the ebuild patch. > > There's a small error in the patch. I submit a corrected version (with > improved English in the comments :) ) It tests out OK here; can it be included in the ebuild and a version -r3 released, please?
*** Bug 541910 has been marked as a duplicate of this bug. ***
Removing wrt #183273.