FS#25820 - [pacman-key] wrong operation count in option parsing
Attached to Project:
Pacman
Opened by Jakob Matthes (jakobm) - Tuesday, 30 August 2011, 00:13 GMT
Last edited by Dan McGee (toofishes) - Friday, 02 September 2011, 13:49 GMT
Opened by Jakob Matthes (jakobm) - Tuesday, 30 August 2011, 00:13 GMT
Last edited by Dan McGee (toofishes) - Friday, 02 September 2011, 13:49 GMT
|
Details
Summary and Info:
Wrong operation count in pacman-key renders several options useless: Some switches are setting two option variables to 1 resulting in a numopt=2 and then in pacman-key aborting with "Please run [...] separately". All switches in question set the operation itself (e.g. ADD) and UPDATEDB to 1 [1]. That code was already there for a while, I think the effect comes from a typo fix (UPDATEBD to UPDATEDB [2]). Further, UPDATEDB is used ambiguously: - with --updatedb to update the trustdb - for various other options to indicate a change to the keyring (this is a guess) Possible fix: Use one variable for each of the current uses, modify numopt summation. Steps to Reproduce: pacman-key -a pacman-key -r foo bar (various other invocations) 1: http://projects.archlinux.org/pacman.git/tree/scripts/pacman-key.sh.in?id=12a6c77fdd0c465761f4f9518eff0eeeda668d20#n347 2: http://projects.archlinux.org/pacman.git/commit/scripts/pacman-key.sh.in?id=768d3589a36c1a3c86cd91c4db401bc47737c47a |
This task depends upon
Closed by Dan McGee (toofishes)
Friday, 02 September 2011, 13:49 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in commit 8129b93afe1
Friday, 02 September 2011, 13:49 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in commit 8129b93afe1