Mailinglist Archive: zypp-commit (315 mails)
| < Previous | Next > |
[zypp-commit] r11168 - /trunk/zypper/src/callbacks/keyring.h
- From: jkupec@xxxxxxxxxxxxxxxx
- Date: Thu, 25 Sep 2008 14:38:07 -0000
- Message-id: <20080925143807.B9C5C30092@xxxxxxxxxxxxxxxx>
Author: jkupec
Date: Thu Sep 25 16:38:07 2008
New Revision: 11168
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11168&view=rev
Log:
- one more improvement to the keyring texts
Modified:
trunk/zypper/src/callbacks/keyring.h
Modified: trunk/zypper/src/callbacks/keyring.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/callbacks/keyring.h?rev=11168&r1=11167&r2=11168&view=diff
==============================================================================
--- trunk/zypper/src/callbacks/keyring.h (original)
+++ trunk/zypper/src/callbacks/keyring.h Thu Sep 25 16:38:07 2008
@@ -87,11 +87,11 @@
if (context.empty())
Zypper::instance()->out().warning(boost::str(boost::format(
- _("Accepting file '%s' signed with an unknown key %s."))
+ _("Accepting file '%s' signed with an unknown key '%s'."))
% file % id));
else
Zypper::instance()->out().warning(boost::str(boost::format(
- _("Accepting file '%s' from repository '%s' signed with an
unknown key %s."))
+ _("Accepting file '%s' from repository '%s' signed with an
unknown key '%s'."))
% file % context.repoInfo().name() % id));
return true;
@@ -117,28 +117,34 @@
const PublicKey &key, const zypp::KeyContext & context)
{
Zypper & zypper = *Zypper::instance();
-
+ std::ostringstream s;
const std::string & keyid = key.id(), keyname = key.name(),
fingerprint = key.fingerprint();
if (_gopts.no_gpg_checks)
- {
- MIL << boost::format("Automatically trusting key id %s, %s,
fingerprint %s")
- % keyid % keyname % fingerprint << std::endl;
- zypper.out().info(boost::str(boost::format(
- _("Automatically trusting key id %s, %s, fingerprint %s"))
- % keyid % keyname % fingerprint));
- return KeyRingReport::KEY_TRUST_TEMPORARILY;
- }
+ s << _("Automatically trusting the following key:") << std::endl;
+ else
+ s << _("New repository or package signing key receieved:") <<
std::endl;
- std::ostringstream s;
- s << _("New repository or package signing key receieved.") << std::endl
+ // gpg key info
+ s
<< str::form(_("Key ID: %s"), keyid.c_str()) << std::endl
<< str::form(_("Key Name: %s"), keyname.c_str()) << std::endl
<< str::form(_("Key Fingerprint: %s"), fingerprint.c_str()) <<
std::endl;
if (!context.empty())
s << str::form(_("Repository: %s"),
context.repoInfo().name().c_str())
<< std::endl;
+
+ // print info and dont ask
+ 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
s << std::endl;
s << _("Do you want to trust key?");
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx
Date: Thu Sep 25 16:38:07 2008
New Revision: 11168
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11168&view=rev
Log:
- one more improvement to the keyring texts
Modified:
trunk/zypper/src/callbacks/keyring.h
Modified: trunk/zypper/src/callbacks/keyring.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/callbacks/keyring.h?rev=11168&r1=11167&r2=11168&view=diff
==============================================================================
--- trunk/zypper/src/callbacks/keyring.h (original)
+++ trunk/zypper/src/callbacks/keyring.h Thu Sep 25 16:38:07 2008
@@ -87,11 +87,11 @@
if (context.empty())
Zypper::instance()->out().warning(boost::str(boost::format(
- _("Accepting file '%s' signed with an unknown key %s."))
+ _("Accepting file '%s' signed with an unknown key '%s'."))
% file % id));
else
Zypper::instance()->out().warning(boost::str(boost::format(
- _("Accepting file '%s' from repository '%s' signed with an
unknown key %s."))
+ _("Accepting file '%s' from repository '%s' signed with an
unknown key '%s'."))
% file % context.repoInfo().name() % id));
return true;
@@ -117,28 +117,34 @@
const PublicKey &key, const zypp::KeyContext & context)
{
Zypper & zypper = *Zypper::instance();
-
+ std::ostringstream s;
const std::string & keyid = key.id(), keyname = key.name(),
fingerprint = key.fingerprint();
if (_gopts.no_gpg_checks)
- {
- MIL << boost::format("Automatically trusting key id %s, %s,
fingerprint %s")
- % keyid % keyname % fingerprint << std::endl;
- zypper.out().info(boost::str(boost::format(
- _("Automatically trusting key id %s, %s, fingerprint %s"))
- % keyid % keyname % fingerprint));
- return KeyRingReport::KEY_TRUST_TEMPORARILY;
- }
+ s << _("Automatically trusting the following key:") << std::endl;
+ else
+ s << _("New repository or package signing key receieved:") <<
std::endl;
- std::ostringstream s;
- s << _("New repository or package signing key receieved.") << std::endl
+ // gpg key info
+ s
<< str::form(_("Key ID: %s"), keyid.c_str()) << std::endl
<< str::form(_("Key Name: %s"), keyname.c_str()) << std::endl
<< str::form(_("Key Fingerprint: %s"), fingerprint.c_str()) <<
std::endl;
if (!context.empty())
s << str::form(_("Repository: %s"),
context.repoInfo().name().c_str())
<< std::endl;
+
+ // print info and dont ask
+ 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
s << std::endl;
s << _("Do you want to trust key?");
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx
| < Previous | Next > |