Skip to content
  • Daan De Meyer's avatar
    pacman-key: Reduce gpg trustdb checks · c7e4f459
    Daan De Meyer authored and Allan McRae's avatar Allan McRae committed
    
    
    Every time we modify gpg's state by signing or revoking a key, gpg
    marks the trustdb as stale and rechecks it the next time key_is_lsigned()
    or key_is_revoked() is called.
    
    Currently, we alternate calls signing of keys and calling key_is_lsigned()
    (idem for revoking) which means that for each key we sign (or revoke), gpg
    will check the trustdb once.
    
    To avoid checking the trustb so many times, we can simply do all the
    key_is_lsigned() and key_is_revoked() checks upfront. Inbetween read
    operations the trustdb is not marked stale and inbetween write operations
    the trustdb is also not marked stale. This reduces the amount of trustdb
    checks from 50 to 1.
    
    Signed-off-by: default avatarAllan McRae <allan@archlinux.org>
    c7e4f459