Author: matz Date: Thu May 15 01:30:04 2008 New Revision: 10096 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10096&view=rev Log: Shovel off a number of useless calls to external programs. Modified: trunk/libzypp/zypp/target/rpm/RpmDb.cc Modified: trunk/libzypp/zypp/target/rpm/RpmDb.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/rpm/RpmDb.cc?rev=10096&r1=10095&r2=10096&view=diff ============================================================================== --- trunk/libzypp/zypp/target/rpm/RpmDb.cc (original) +++ trunk/libzypp/zypp/target/rpm/RpmDb.cc Thu May 15 01:30:04 2008 @@ -898,11 +898,15 @@ { MIL << "Importing zypp trusted keyring" << std::endl; - std::list<PublicKey> rpm_keys = pubkeys(); - std::list<PublicKey> zypp_keys; - zypp_keys = getZYpp()->keyRing()->trustedPublicKeys(); + /* The pubkeys() call below is expensive. It calls gpg2 for each + gpg-pubkey in the rpm db. Useless if we don't have any keys in + zypp yet. */ + if (zypp_keys.empty()) + return; + + std::list<PublicKey> rpm_keys = pubkeys(); for ( std::list<PublicKey>::const_iterator it = zypp_keys.begin(); it != zypp_keys.end(); ++it) { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org