[pacman-dev] [PATCH] scripts/pacman-key.sh.in: fix processing of --help/-h and --version/-V options

Ivan Kanak ivan.kanak at gmail.com
Tue Apr 19 16:04:07 EDT 2011

so it seems nobody merged anything yet,
I got denis' patch, the one indicated by Allan,
and applied it to master, then built mine on top.
I actually didn't like his patch,
most things were reverted back.
I'll post my patches in a while, working my way with git-send-email..

On 30 March 2011 07:30, Allan McRae <allan at archlinux.org> wrote:

> On 30/03/11 07:22, ivan.kanak at gmail.com wrote:
>> From: Ivan Kanakarakis<ivan.kanak at gmail.com>
>> ok, I think this is much better. The process is as follows:
>> The script first tries to read the options as defined in the usage.
>> It then expects to read a command. If the command exists and it's one of
>> --help/-h/--version/-V
>> it skips any check and goes straight to the case loop, and thus executes
>> those.
>> If the command is something else, it enters the big if block and checks
>> for the needed conditions.
>> also when an unknown command is given there now an error message instead
>> of just the usage
>> unknown command:<--the_command>
>> some more comments:
>> I saw some things like
>> error "$(gettext "The key identified by %s doesn't exist")" "$1"
>> while error() only knows about the first argument given to it, so %s there
>> is actually left blank.
>> also I think there are some cases where gettext is redundant as in called
>> twice for the same text.
>> I can go fixing this too.
>> Signed-off-by: Ivan Kanakarakis<ivan.kanak at gmail.com>
> I'll add a note that we also have this patch floating about that actually
> handles --config and --gpgdir properly.  (among other changes).
> http://mailman.archlinux.org/pipermail/pacman-dev/2011-February/012515.html
> Allan

Ivan c00kiemon5ter V Kanak

More information about the pacman-dev mailing list