Hello community,
here is the log from the commit of package libzypp
checked in at Thu Apr 20 13:29:47 CEST 2006.
--------
--- libzypp/libzypp.changes 2006-04-19 16:56:01.000000000 +0200
+++ STABLE/libzypp/libzypp.changes 2006-04-20 13:25:15.000000000 +0200
@@ -1,0 +2,15 @@
+Thu Apr 20 13:14:25 CEST 2006 - kkaempf@suse.de
+
+- recursively soft-uninstall recommended package on real uninstall,
+ not on update (#167603)
+- rev 3155
+
+-------------------------------------------------------------------
+Thu Apr 20 13:01:28 CEST 2006 - dmacvicar@suse.de
+
+- fix #167605 (importing keys to rpm multiple times due to
+ wrong interpretation of rpm gpg versioning.
+- add support for reading the rpm keys, with full id and fingerprint
+- rev 3153
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.ss1ept/_old 2006-04-20 13:26:33.000000000 +0200
+++ /var/tmp/diff_new_pack.ss1ept/_new 2006-04-20 13:26:33.000000000 +0200
@@ -18,7 +18,7 @@
Autoreqprov: on
Summary: Package, Patch, Pattern, and Product Management
Version: 0.0.8
-Release: 107
+Release: 110
Source: zypp-0.0.0.tar.bz2
Prefix: /usr
Provides: yast2-packagemanager
@@ -104,6 +104,15 @@
%{_libdir}/pkgconfig/libzypp.pc
%changelog -n libzypp
+* Thu Apr 20 2006 - kkaempf@suse.de
+- recursively soft-uninstall recommended package on real uninstall,
+ not on update (#167603)
+- rev 3155
+* Thu Apr 20 2006 - dmacvicar@suse.de
+- fix #167605 (importing keys to rpm multiple times due to
+ wrong interpretation of rpm gpg versioning.
+- add support for reading the rpm keys, with full id and fingerprint
+- rev 3153
* Wed Apr 19 2006 - kkaempf@suse.de
- don't add duplicate error infos to ResolverContext (#167309)
- rev 3146
++++++ zypp-0.0.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypp-0.0.0/po/zypp.pot new/zypp-0.0.0/po/zypp.pot
--- old/zypp-0.0.0/po/zypp.pot 2006-04-17 19:25:27.000000000 +0200
+++ new/zypp-0.0.0/po/zypp.pot 2006-04-20 13:18:08.000000000 +0200
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: translation@suse.de\n"
-"POT-Creation-Date: 2006-04-17 19:25+0200\n"
+"POT-Creation-Date: 2006-04-20 13:18+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -1916,100 +1916,100 @@
msgid "Zuni"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1769
+#: zypp/target/rpm/RpmDb.cc:1793
#, c-format
msgid "Changed configuration files for %s:"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1922
+#: zypp/target/rpm/RpmDb.cc:1946
#, c-format
msgid "rpm saved %s as %s but it was impossible to determine the difference"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1924
+#: zypp/target/rpm/RpmDb.cc:1948
#, c-format
msgid ""
"rpm saved %s as %s.\n"
"Here are the first 25 lines of difference:\n"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1927
+#: zypp/target/rpm/RpmDb.cc:1951
#, c-format
msgid "rpm created %s as %s but it was impossible to determine the difference"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1929
+#: zypp/target/rpm/RpmDb.cc:1953
#, c-format
msgid ""
"rpm created %s as %s.\n"
"Here are the first 25 lines of difference:\n"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1934
+#: zypp/target/rpm/RpmDb.cc:1958
#, c-format
msgid "%s install failed"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1935 zypp/target/rpm/RpmDb.cc:2043
+#: zypp/target/rpm/RpmDb.cc:1959 zypp/target/rpm/RpmDb.cc:2067
msgid "rpm output:"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1939
+#: zypp/target/rpm/RpmDb.cc:1963
#, c-format
msgid "%s installed ok"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:1941 zypp/target/rpm/RpmDb.cc:2048
+#: zypp/target/rpm/RpmDb.cc:1965 zypp/target/rpm/RpmDb.cc:2072
msgid "Additional rpm output:"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2042
+#: zypp/target/rpm/RpmDb.cc:2066
#, c-format
msgid "%s remove failed"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2046
+#: zypp/target/rpm/RpmDb.cc:2070
#, c-format
msgid "%s remove ok"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2062
+#: zypp/target/rpm/RpmDb.cc:2086
msgid "Ok"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2065
+#: zypp/target/rpm/RpmDb.cc:2089
msgid "The package is not OK for the following reasons:"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2071
+#: zypp/target/rpm/RpmDb.cc:2095
msgid "The package contains different version than expected"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2077
+#: zypp/target/rpm/RpmDb.cc:2101
msgid "The package file has incorrect MD5 sum"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2083
+#: zypp/target/rpm/RpmDb.cc:2107
msgid "The package is not signed"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2089
+#: zypp/target/rpm/RpmDb.cc:2113
msgid "The package has no MD5 sum"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2095
+#: zypp/target/rpm/RpmDb.cc:2119
msgid "The package has incorrect signature"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2101
+#: zypp/target/rpm/RpmDb.cc:2125
msgid "The package archive has incorrect MD5 sum"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2107
+#: zypp/target/rpm/RpmDb.cc:2131
msgid "rpm failed for unkown reason, see log file"
msgstr ""
-#: zypp/target/rpm/RpmDb.cc:2251
+#: zypp/target/rpm/RpmDb.cc:2275
#, c-format
msgid "created backup %s"
msgstr ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypp-0.0.0/zypp/KeyRing.cc new/zypp-0.0.0/zypp/KeyRing.cc
--- old/zypp-0.0.0/zypp/KeyRing.cc 2006-04-19 16:46:58.000000000 +0200
+++ new/zypp-0.0.0/zypp/KeyRing.cc 2006-04-20 13:13:19.000000000 +0200
@@ -390,6 +390,11 @@
"--list-public-keys",
"--with-colons",
"--with-fingerprint",
+ "--no-tty",
+ "--no-greeting",
+ "--batch",
+ "--status-fd",
+ "1",
"--homedir",
keyring.asString().c_str(),
NULL
@@ -401,19 +406,35 @@
int count = 0;
str::regex rxColons("^([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):\n$");
+ str::regex rxColonsFpr("^([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):\n$");
+
for(line = prog.receiveLine(), count=0; !line.empty(); line = prog.receiveLine(), count++ )
{
//MIL << line << std::endl;
str::smatch what;
if(str::regex_match(line, what, rxColons, str::match_extra))
{
+ PublicKey key;
if ( what[1] == "pub" )
{
- PublicKey key;
key.id = what[5];
key.name = what[10];
- MIL << "Found key " << key.id << " [" << key.name << "]" << std::endl;
+
+ std::string line2;
+ for(line2 = prog.receiveLine(); !line2.empty(); line2 = prog.receiveLine(), count++ )
+ {
+ str::smatch what2;
+ if (str::regex_match(line2, what2, rxColonsFpr, str::match_extra))
+ {
+ if ( (what2[1] == "fpr") && (what2[1] != "pub") && (what2[1] !="sub"))
+ {
+ key.fingerprint = what2[10];
+ break;
+ }
+ }
+ }
keys.push_back(key);
+ MIL << "Found key " << "[" << key.id << "]" << " [" << key.name << "]" << " [" << key.fingerprint << "]" << std::endl;
}
//dumpRegexpResults(what);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypp-0.0.0/zypp/KeyRing.h new/zypp-0.0.0/zypp/KeyRing.h
--- old/zypp-0.0.0/zypp/KeyRing.h 2006-04-19 16:46:58.000000000 +0200
+++ new/zypp-0.0.0/zypp/KeyRing.h 2006-04-20 13:13:19.000000000 +0200
@@ -48,7 +48,7 @@
struct PublicKey
{
bool operator==(PublicKey b)
- { return b.id == id; }
+ { return (b.id == id) && (b.fingerprint == fingerprint); }
bool operator==(std::string sid)
{ return sid == id; }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypp-0.0.0/zypp/solver/detail/QueueItemUninstall.cc new/zypp-0.0.0/zypp/solver/detail/QueueItemUninstall.cc
--- old/zypp-0.0.0/zypp/solver/detail/QueueItemUninstall.cc 2006-04-13 11:35:21.000000000 +0200
+++ new/zypp-0.0.0/zypp/solver/detail/QueueItemUninstall.cc 2006-04-20 13:01:44.000000000 +0200
@@ -409,10 +409,13 @@
}
// soft-remove the installed items which have been recommended by the to-be-uninstalled
- // but not when upgrade
+ // but not when upgrade, and not for packages
- if (!_upgraded_to)
+ if (_upgraded_to // its an upgrade
+ || _item->kind() == ResTraits<Package>::kind)
+ {
goto finished;
+ }
CapSet recomments = _item->dep (Dep::RECOMMENDS);
for (CapSet::const_iterator iter = recomments.begin(); iter != recomments.end(); iter++) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypp-0.0.0/zypp/target/rpm/RpmDb.cc new/zypp-0.0.0/zypp/target/rpm/RpmDb.cc
--- old/zypp-0.0.0/zypp/target/rpm/RpmDb.cc 2006-04-10 16:28:09.000000000 +0200
+++ new/zypp-0.0.0/zypp/target/rpm/RpmDb.cc 2006-04-20 13:13:19.000000000 +0200
@@ -884,16 +884,16 @@
{
MIL << "Importing zypp trusted keyring" << std::endl;
- std::setstd::string rpm_keys = pubkeys();
+ std::list<PublicKey> rpm_keys = pubkeys();
std::list<PublicKey> zypp_keys;
zypp_keys = getZYpp()->keyRing()->trustedPublicKeys();
for ( std::list<PublicKey>::const_iterator it = zypp_keys.begin(); it != zypp_keys.end(); ++it)
- {
- std::string id = (*it).id;
- std::setstd::string::iterator ik = find( rpm_keys.begin(), rpm_keys.end(), id);
+ {
+ // we find only the left part of the long gpg key, as rpm does not support long ids
+ std::list<PublicKey>::iterator ik = find( rpm_keys.begin(), rpm_keys.end(), (*it));
if ( ik != rpm_keys.end() )
{
MIL << "Key " << (*it).id << " (" << (*it).name << ") is already in rpm database." << std::endl;
@@ -909,7 +909,7 @@
{
os.open(file.path().asString().c_str());
// dump zypp key into the tmp file
- getZYpp()->keyRing()->dumpTrustedPublicKey( id, os );
+ getZYpp()->keyRing()->dumpTrustedPublicKey( (*it).id, os );
os.close();
}
catch (std::exception &e)
@@ -977,17 +977,41 @@
// METHOD NAME : RpmDb::pubkeys
// METHOD TYPE : set<Edition>
//
-setstd::string RpmDb::pubkeys() const
+list<PublicKey> RpmDb::pubkeys() const
{
- setstd::string ret;
+ list<PublicKey> ret;
librpmDb::db_const_iterator it;
- for ( it.findByName( string( "gpg-pubkey" ) ); *it; ++it ) {
+ for ( it.findByName( string( "gpg-pubkey" ) ); *it; ++it )
+ {
Edition edition = it->tag_edition();
if (edition != Edition::noedition)
- ret.insert( str::toUpper(edition.version() + edition.release()) );
+ {
+ // we export the rpm key into a file
+ RpmHeader::constPtr result = new RpmHeader();
+ getData( std::string("gpg-pubkey"), edition, result );
+ TmpFile file;
+ std::ofstream os;
+ try
+ {
+ os.open(file.path().asString().c_str());
+ // dump rpm key into the tmp file
+ os << result->tag_description();
+ //MIL << "-----------------------------------------------" << std::endl;
+ //MIL << result->tag_description() <keyRing()->readPublicKey(file.path());
+ ret.push_back(key);
+ }
+ catch (std::exception &e)
+ {
+ ERR << "Could not dump key " << edition.asString() << " in tmp file " << file.path() << std::endl;
+ // just ignore the key
+ }
+ }
}
-
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypp-0.0.0/zypp/target/rpm/RpmDb.h new/zypp-0.0.0/zypp/target/rpm/RpmDb.h
--- old/zypp-0.0.0/zypp/target/rpm/RpmDb.h 2006-04-05 16:50:29.000000000 +0200
+++ new/zypp-0.0.0/zypp/target/rpm/RpmDb.h 2006-04-20 13:13:19.000000000 +0200
@@ -25,6 +25,7 @@
#include "zypp/Package.h"
#include "zypp/Source.h"
+#include "zypp/KeyRing.h"
#include "zypp/target/rpm/RpmHeader.h"
#include "zypp/target/rpm/RpmCallbacks.h"
@@ -203,7 +204,7 @@
/**
* Return the long ids of all installed public keys.
**/
- std::setstd::string pubkeys() const;
+ std::list<PublicKey> pubkeys() const;
/**
* Return the edition of all installed public keys.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...