Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <zypper> master : Don't ask also in interactive mode if --gpg-auto-import-keys.
  • From: Ján Kupec <jkupec@xxxxxxx>
  • Date: Tue, 10 Nov 2009 19:11:30 +0100
  • Message-id: <E1N7vIe-0004An-QZ@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit bdc45c3aa8a371aa7654389fd65a0c16923be795
Author: Ján Kupec <jkupec@xxxxxxx>
Date: Tue Nov 10 19:11:30 2009 +0100

Don't ask also in interactive mode if --gpg-auto-import-keys.
---
src/callbacks/keyring.h | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/src/callbacks/keyring.h b/src/callbacks/keyring.h
index fb2118d..e3524fb 100644
--- a/src/callbacks/keyring.h
+++ b/src/callbacks/keyring.h
@@ -137,22 +137,20 @@ namespace zypp
s << str::form(_("Repository: %s"),
context.repoInfo().name().c_str())
<< std::endl;

- // print info and don't ask
- if (_gopts.no_gpg_checks)
+ // if --gpg-auto-import-keys or --no-gpg-checks print info and don't
ask
+ if (_gopts.gpg_auto_import_keys)
{
+ MIL << boost::format("Automatically importing key id '%s', '%s',
fingerprint '%s'")
+ % keyid % keyname % fingerprint << std::endl;
zypper.out().info(s.str());
- if (_gopts.gpg_auto_import_keys)
- {
- MIL << boost::format("Automatically importing key id '%s', '%s',
fingerprint '%s'")
- % keyid % keyname % fingerprint << std::endl;
- return KeyRingReport::KEY_TRUST_AND_IMPORT;
- }
- else
- {
- MIL << boost::format("Automatically trusting key id '%s', '%s',
fingerprint '%s'")
- % keyid % keyname % fingerprint << std::endl;
- return KeyRingReport::KEY_TRUST_TEMPORARILY;
- }
+ return KeyRingReport::KEY_TRUST_AND_IMPORT;
+ }
+ else if (_gopts.no_gpg_checks)
+ {
+ MIL << boost::format("Automatically trusting key id '%s', '%s',
fingerprint '%s'")
+ % keyid % keyname % fingerprint << std::endl;
+ zypper.out().info(s.str());
+ return KeyRingReport::KEY_TRUST_TEMPORARILY;
}

// ask the user
@@ -170,10 +168,10 @@ namespace zypp
// The anserws must be separated by slash characters '/' and must
// correspond to reject/trusttemporarily/trustalways in that order.
// The answers should be lower case letters.
- popts.setOptions(_("r/t/a/"), _gopts.gpg_auto_import_keys ? 2 : 0);
+ popts.setOptions(_("r/t/a/"), 0);
else
// translators: the same as r/t/a, but without 'a'
- popts.setOptions(_("r/t"), _gopts.gpg_auto_import_keys ? 1 : 0);
+ popts.setOptions(_("r/t"), 0);
// translators: help text for the 'r' option in the 'r/t/a' prompt
popts.setOptionHelp(0, _("Don't trust the key."));
// translators: help text for the 't' option in the 'r/t/a' prompt
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages