Page MenuHome GnuPG

--fix-trustdb not implemented for a long time, but recommended
Closed, ResolvedPublic

Description

A Debian user complained in http://bugs.debian.org/196860, that gnupg suggests
to use the --fix-trustdb option. But this switch has never been implemented. I
wonder, if it has been simply forgotten :)

So this is not criticism. It's just a question about the situation and a
placeholder, until the switch has been implemented or removed.

Please close this report, if you don't think it's appropriate.

Details

Version
2.0.12

Event Timeline

Should eventually be implemented.

werner set Due Date to Jan 15 2038, 1:00 AM.Dec 5 2008, 6:45 PM
werner added a project: Stalled.
marcus raised the priority of this task from Wishlist to Normal.
marcus added a subscriber: gnupg-hackers.
bernhard removed Due Date.
bernhard changed Version from 1.4.9 to 2.0.12.
bernhard added projects: Bug Report, kks.
bernhard added a subscriber: bernhard.

An admin saw this suggestion in front of a user and got annoyed
that the recommendation

"the trustdb is corrupted; please run \"gpg --fix-trustdb\".\n") );

in tdbio_invalid(void) gnupg-2.0.12 did not work.

If --fix-trustdb is not implemented soon, please change the suggestion
to directly give the workaround.

bernhard renamed this task from --fix-trustdb not implemented for a long time to --fix-trustdb not implemented for a long time, but recommended.Jul 21 2009, 10:26 PM
bernhard removed projects: Stalled, Feature Request.

Fixed in svn 5087.

--fix-trustdb can't be implemented - automatic recovery from data corruption is
not a good idea. What I did instead is to print this message:

gpg: Error: The trustdb is corrupted.
gpg: You may try to re-create the trustdb using the commands:
gpg:   cd ~/.gnupg
gpg:   gpg2 --export-ownertrust > otrust.tmp
gpg:   rm trustdb.gpg
gpg:   gpg2 --import-ownertrust < otrust.tmp
gpg: If that does not work, please consult the manual

gpg2 --fix-trustdb shows the same advice. Note the "try": It is not always
possible to re-create the trustdb this way. The reason is that the ownertrust
values are stored in the trustdb as well and if the basic record structure is
broken, they can't be read and you need to resort to a backup. I'll add a
section to the manual.

Thanks for the change, I will check it out.
Did you consider removing the option --fix-trustdb
if you do not intend to implement it?
I would consider removal to be good, if the warning
is all what people get in the foreseeable future.
The existance of the options assumes that there is code
to do the fixing behind it.

No, --fix-trustdb is a hidden command and may get a new life in the future.

Will this be backported to 1.4 as well?

werner removed a project: Restricted Project.