diff options
author | Werner Koch <[email protected]> | 2009-07-22 09:43:10 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-07-22 09:43:10 +0000 |
commit | 5d310a8de75e513ac0d44b2960966a631dae9670 (patch) | |
tree | ea684db1398d32be5f22613b259770eb861571aa /g10/trustdb.c | |
parent | Fix i18n bug. (diff) | |
download | gnupg-5d310a8de75e513ac0d44b2960966a631dae9670.tar.gz gnupg-5d310a8de75e513ac0d44b2960966a631dae9670.zip |
Print verbose instructions in case of a corrupted trustdb.
Diffstat (limited to 'g10/trustdb.c')
-rw-r--r-- | g10/trustdb.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c index 902089c2d..1d083a738 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -408,6 +408,27 @@ setup_trustdb( int level, const char *dbname ) } void +how_to_fix_the_trustdb () +{ + const char *name = trustdb_args.dbname; + + if (!name) + name = "trustdb.gpg"; + + log_info (_("You may try to re-create the trustdb using the commands:\n")); + log_info (" cd %s\n", default_homedir ()); + log_info (" gpg2 --export-ownertrust > otrust.tmp\n"); +#ifdef HAVE_W32_SYSTEM + log_info (" del %s\n", name); +#else + log_info (" rm %s\n", name); +#endif + log_info (" gpg2 --import-ownertrust < otrust.tmp\n"); + log_info (_("If that does not work, please consult the manual\n")); +} + + +void init_trustdb() { int level = trustdb_args.level; |