gpg: Do not require a trustdb with --always-trust.
authorWerner Koch <wk@gnupg.org>
Fri, 11 Oct 2013 07:25:58 +0000 (09:25 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 11 Oct 2013 07:35:01 +0000 (09:35 +0200)
commit2528178e7e2fac6454dd988121167305db7c71d9
tree7f384797e7c4cdfc34505726698b68c5d29f818a
parent0a10f1f91e487d917b6141a4c16e24235a26f311
gpg: Do not require a trustdb with --always-trust.

* g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE.
* g10/trustdb.c (trustdb_args): Add field no_trustdb.
(init_trustdb): Set that field.
(revalidation_mark):  Take care of a nonexistent trustdb file.
(read_trust_options): Ditto.
(get_ownertrust): Ditto.
(get_min_ownertrust): Ditto.
(update_ownertrust): Ditto.
(update_min_ownertrust): Ditto.
(clear_ownertrusts): Ditto.
(cache_disabled_value): Ditto.
(check_trustdb_stale): Ditto.
(get_validity): Ditto.
* g10/gpg.c (main): Do not create a trustdb with most commands for
trust-model always.
--

This slightly changes the semantics of most commands in that they
won't create a trustdb if --trust-model=always is used.  It just does
not make sense to create a trustdb if there is no need for it.

Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 1a0eeaacd1bf09fe5125dbc3f56016bc20f3512e)

Resolved conflicts:
g10/gpg.c
g10/tdbio.h
g10/trustdb.c
 (indentation fixes)
NEWS
g10/gpg.c
g10/tdbio.c
g10/tdbio.h
g10/trustdb.c