FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-22-2011, 01:04 AM
Denis A. Altoé Falqueto
 
Default pacman-key: better handling of options and supressing gpg output

On Sat, Feb 19, 2011 at 12:33 PM, Allan McRae <allan@archlinux.org> wrote:
>> + * * * * * * * if ! ${GPG_PACMAN} --quiet --verify "${ADDED_KEYS}.sig"
>> 1>/dev/null 2>&1; then
>
> using "&>/dev/null" would be cleaner. *And given --quiet is obviously not
> doing much, should we just remove it?
>
> As an aside, the man page for gpg says --verify should "verify it without
> generating any output". *Clearly there is output...

Yes, really weird...

>> + * * * case "$arg" in
>> + * * * * * * * --config) isconfig=1;;
>> + * * * * * * * --gpgdir) isgpgdir=1;;
>
>
> This leaves --config and --gpgdir in "$@". *So if I run (e.g.)
> "pacman-key --delete <keyid> --config <file>"
>
> Then the command run will be:
>
> ${GPG_PACMAN} --quiet --batch --delete-key --yes "$@"
>
> where "$@" is expanded to "<keyid> --config <file>", which clearly is bad...
> *So this needs to be slightly more clever.

I've remade the code. Now, it iterates over the parameters and creates
another vector for the values that are not related to --config and
--gpgdir. The real processing is made over the vector, not over $@. It
is a little uncommon, but pacman-key must know beforehand what is the
configuration and gpg home.

I'll resend the patches as a reply just after this mail.

--
A: Because it obfuscates the reading.
Q: Why is top posting so bad?

-------------------------------------------
Denis A. Altoe Falqueto
Linux user #524555
-------------------------------------------

N������^���a��&jw^��.� Ǭj�!�)��ޖ�^��h�X���r�z ��b���^N�W��u�{矴�yǢ�� �z�%u�b����v׍w۞;�^�
 

Thread Tools




All times are GMT. The time now is 01:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org