[pacman-dev] [PATCH 6/6] pacman-key: remake of --reload command

Denis A. Altoé Falqueto denisfalqueto at gmail.com
Thu Oct 7 10:46:28 EDT 2010


On Thu, Oct 7, 2010 at 1:34 AM, Allan McRae <allan at archlinux.org> wrote:
>> +
>> +       # Read the key ids to an array. The conversion from whatever is
>> inside the file
>> +       # to key ids is important, because key ids are the only guarantee
>> of identification
>> +       # for the keys.
>> +       local -A removed_ids
>> +       if [[ -r "${REMOVED_KEYS}" ]]; then
>> +               while read key; do
>> +                       local key_values name
>> +                       key_values=$(${GPG_PACMAN} --quiet --with-colons
>> --list-key "${key}" | grep ^pub | cut -d: -f5,10 --output-delimiter=' ')
>> +                       if [[ -z $key_values ]]; then
>> +                               # The key is not in pacman's keyring, so
>> search it on the added and deprecated keys
>
> This I do not understand.  Surely if a key is in the remove list then it is
> not in the added or deprecated list.  I'd assume that if a key is to be
> removed and is not in the keyring already, then we have to do nothing.
>
> Either that or if it could be added via the added and deprecated lists, deal
> with those first and just remove them all at the end.  I know it is a waste
> to add the key only to remove it later in that weird situation, but it would
> simplify this section of the code a lot.

Yes, you're right. I was overcomplicating because on my tests I
created a too convoluted situation that would not really happen in
real life.

Do you want me to resend the patch or will you adapt it before
including in your repository?

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

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


More information about the pacman-dev mailing list