Hello community,
here is the log from the commit of package libzypp-zmd-backend
checked in at Thu Apr 20 20:09:31 CEST 2006.
--------
--- libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-04-19 18:09:08.000000000 +0200
+++ STABLE/libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-04-20 18:51:35.000000000 +0200
@@ -1,0 +2,14 @@
+Thu Apr 20 17:00:04 CEST 2006 - kkaempf@suse.de
+
+- add 'alias=' parameter with "&" if url already contains "?"
+ (#168030)
+- rev 3161
+
+-------------------------------------------------------------------
+Thu Apr 20 14:45:12 CEST 2006 - kkaempf@suse.de
+
+- Don't mis-interpret commit results on package removals (#167822)
+- Instantiate KeyRing and Digest callbacks immediately after ZYpp.
+- rev 3158
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp-zmd-backend.spec ++++++
--- /var/tmp/diff_new_pack.VWgyxg/_old 2006-04-20 20:09:12.000000000 +0200
+++ /var/tmp/diff_new_pack.VWgyxg/_new 2006-04-20 20:09:12.000000000 +0200
@@ -22,7 +22,7 @@
Obsoletes: zmd-librc-backend
Summary: ZMD backend for Package, Patch, Pattern, and Product Management
Version: 7.1.1.0
-Release: 19
+Release: 22
Source: zmd-backend-%{version}.tar.bz2
Prefix: /usr
@@ -68,6 +68,14 @@
/etc/logrotate.d/zmd-backend
%changelog -n libzypp-zmd-backend
+* Thu Apr 20 2006 - kkaempf@suse.de
+- add 'alias=' parameter with "&" if url already contains "?"
+ (#168030)
+- rev 3161
+* Thu Apr 20 2006 - kkaempf@suse.de
+- Don't mis-interpret commit results on package removals (#167822)
+- Instantiate KeyRing and Digest callbacks immediately after ZYpp.
+- rev 3158
* Wed Apr 19 2006 - mvidner@suse.cz
- service-delete: Only add alias to URL for ZYPP type sources (#160613).
Now YUM sources deleted by rug should get deleted from YaST too.
++++++ zmd-backend-7.1.1.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/dbsource/DbSourceImpl.cc new/zmd-backend-7.1.1.0/src/dbsource/DbSourceImpl.cc
--- old/zmd-backend-7.1.1.0/src/dbsource/DbSourceImpl.cc 2006-04-19 13:22:37.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/dbsource/DbSourceImpl.cc 2006-04-20 11:27:23.000000000 +0200
@@ -370,7 +370,7 @@
Atom::Ptr atom = detail::makeResolvableFromImpl( dataCollect, impl );
_store.insert( atom );
- DBG << "Atom[" << id << "] " << *atom << endl;
+ XXX << "Atom[" << id << "] " << *atom << endl;
if ( _idmap != 0)
(*_idmap)[id] = atom;
}
@@ -421,7 +421,7 @@
Patch::Ptr patch = detail::makeResolvableFromImpl( dataCollect, impl );
_store.insert( patch );
- DBG << "Patch[" << id << "] " << *patch << endl;
+ XXX << "Patch[" << id << "] " << *patch << endl;
if ( _idmap != 0)
(*_idmap)[id] = patch;
}
@@ -472,7 +472,7 @@
Pattern::Ptr pattern = detail::makeResolvableFromImpl( dataCollect, impl );
_store.insert( pattern );
- DBG << "Pattern[" << id << "] " << *pattern << endl;
+ XXX << "Pattern[" << id << "] " << *pattern << endl;
if ( _idmap != 0)
(*_idmap)[id] = pattern;
}
@@ -523,7 +523,7 @@
Product::Ptr product = detail::makeResolvableFromImpl( dataCollect, impl );
_store.insert( product );
- DBG << "Product[" << id << "] " << *product << endl;
+ XXX << "Product[" << id << "] " << *product << endl;
if ( _idmap != 0)
(*_idmap)[id] = product;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/find-file.cc new/zmd-backend-7.1.1.0/src/find-file.cc
--- old/zmd-backend-7.1.1.0/src/find-file.cc 2006-04-19 18:03:41.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/find-file.cc 2006-04-20 14:26:28.000000000 +0200
@@ -41,11 +41,11 @@
MIL << "START find-file " << argv[1] << " " << argv[2] << endl;
ZYpp::Ptr God = backend::getZYpp( true );
- Target_Ptr target = backend::initTarget( God );
-
KeyRingCallbacks keyring_callbacks;
DigestCallbacks digest_callbacks;
+ Target_Ptr target = backend::initTarget( God );
+
string name = target->rpmDb().whoOwnsFile( argv[2] );
if (name.empty()) {
ERR << "File " << argv[2] << " does not belong to any (installed) package" << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/package-files.cc new/zmd-backend-7.1.1.0/src/package-files.cc
--- old/zmd-backend-7.1.1.0/src/package-files.cc 2006-04-19 18:03:41.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/package-files.cc 2006-04-20 14:26:42.000000000 +0200
@@ -235,11 +235,11 @@
return 1;
ZYpp::Ptr God = backend::getZYpp( true );
- Target_Ptr target = backend::initTarget( God );
-
KeyRingCallbacks keyring_callbacks;
DigestCallbacks digest_callbacks;
+ Target_Ptr target = backend::initTarget( God );
+
int result = package_files( db.db(), str::strtonum<long long>( argv[2] ), target );
God->finishTarget();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/parse-metadata.cc new/zmd-backend-7.1.1.0/src/parse-metadata.cc
--- old/zmd-backend-7.1.1.0/src/parse-metadata.cc 2006-04-19 18:03:42.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/parse-metadata.cc 2006-04-20 18:48:38.000000000 +0200
@@ -172,12 +172,11 @@
MIL << "START parse-metadata " << argv[1] << " " << argv[2] << " " << argv[3] << " " << argv[4] << " " << argv[5] << endl;
ZYpp::Ptr God = backend::getZYpp( true );
-
- backend::initTarget( God );
-
KeyRingCallbacks keyring_callbacks;
DigestCallbacks digest_callbacks;
+ backend::initTarget( God );
+
manager = SourceManager::sourceManager();
if (! restore_sources ())
return 1;
@@ -193,11 +192,24 @@
string type( argv[2] );
Pathname path( argv[3] );
+ // check for "...;alias=..." and replace with "...&alias=..." (#168030)
+ string checkpath ( argv[3] );
+ string::size_type aliaspos = checkpath.find( ";alias=" );
+ if (aliaspos != string::npos) {
+ checkpath.replace( aliaspos, 1, "&" );
+ }
+
+ string checkurl( argv[4] );
+ aliaspos = checkurl.find( ";alias=" );
+ if (aliaspos != string::npos) {
+ checkurl.replace( aliaspos, 1, "&" );
+ }
+
Url uri;
Url pathurl;
try {
- uri = Url ( ((argv[3][0] == '/') ? string("file:"):string("")) + argv[3] );
- pathurl = Url ( ((argv[4][0] == '/') ? string("file:"):string("")) + argv[4] );
+ uri = Url ( ((checkpath[0] == '/') ? string("file:"):string("")) + checkpath );
+ pathurl = Url ( ((checkurl[0] == '/') ? string("file:"):string("")) + checkurl );
}
catch ( const Exception & excpt_r ) {
ZYPP_CAUGHT( excpt_r );
@@ -222,13 +234,14 @@
SourceManager::Source_const_iterator it;
for (it = manager->Source_begin(); it != manager->Source_end(); ++it) {
string src_uri = it->url().asString();
- MIL << "Uri " << src_uri << endl;
+ MIL << "Uri '" << src_uri << "'" << endl;
if (src_uri == uri.asString()) { // check url first
sync_source( db, *it, catalog, Url(), false );
break;
}
- src_uri += "?alias=" + it->alias();
- MIL << "Uri " << src_uri << endl;
+ string separator = (src_uri.find('?') != string::npos) ? "&" : "?";
+ src_uri += (separator + "alias=" + it->alias());
+ MIL << "Uri '" << src_uri << "'" << endl;
if (src_uri == uri.asString()) { // then check <url>?alias=<alias>
sync_source( db, *it, catalog, Url(), false );
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/query-files.cc new/zmd-backend-7.1.1.0/src/query-files.cc
--- old/zmd-backend-7.1.1.0/src/query-files.cc 2006-04-19 18:03:42.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/query-files.cc 2006-04-20 14:26:59.000000000 +0200
@@ -404,6 +404,8 @@
MIL << "START query-files " << argv[1] << " " << argv[2] << " " << ((argc>3)?argv[3]:"") << endl;
ZYpp::Ptr God = backend::getZYpp( true );
+ KeyRingCallbacks keyring_callbacks;
+ DigestCallbacks digest_callbacks;
DbAccess db(argv[1]);
@@ -412,9 +414,6 @@
backend::initTarget( God );
- KeyRingCallbacks keyring_callbacks;
- DigestCallbacks digest_callbacks;
-
if (strcmp( argv[2], CATALOGSYNC ) == 0) {
MIL << "Doing a catalog sync" << endl;
sync_catalogs( db );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/query-pool.cc new/zmd-backend-7.1.1.0/src/query-pool.cc
--- old/zmd-backend-7.1.1.0/src/query-pool.cc 2006-04-19 18:03:42.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/query-pool.cc 2006-04-20 14:27:34.000000000 +0200
@@ -146,11 +146,11 @@
MIL << "START query-pool " << filter << " " << catalog << endl;
ZYpp::Ptr Z = backend::getZYpp( true );
- Target_Ptr target = backend::initTarget( Z, false );
-
KeyRingCallbacks keyring_callbacks;
DigestCallbacks digest_callbacks;
+ Target_Ptr target = backend::initTarget( Z, false );
+
query_pool( Z, filter, catalog );
MIL << "END query-pool, result 0" << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/query-system.cc new/zmd-backend-7.1.1.0/src/query-system.cc
--- old/zmd-backend-7.1.1.0/src/query-system.cc 2006-04-19 18:03:42.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/query-system.cc 2006-04-20 14:27:41.000000000 +0200
@@ -157,15 +157,15 @@
MIL << "START query-system " << argv[1] << endl;
ZYpp::Ptr God = backend::getZYpp( true );
+ KeyRingCallbacks keyring_callbacks;
+ DigestCallbacks digest_callbacks;
+
Target_Ptr target = backend::initTarget( God, false );
DbAccess db( argv[1] );
if (!db.openDb( true ))
return 1;
- KeyRingCallbacks keyring_callbacks;
- DigestCallbacks digest_callbacks;
-
db.writeStore( God->target()->resolvables(), ResStatus::installed, "@system" );
// sync SourceManager with sources table
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/resolve-dependencies.cc new/zmd-backend-7.1.1.0/src/resolve-dependencies.cc
--- old/zmd-backend-7.1.1.0/src/resolve-dependencies.cc 2006-04-19 18:03:41.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/resolve-dependencies.cc 2006-04-20 14:27:46.000000000 +0200
@@ -77,14 +77,13 @@
return 1;
ZYpp::Ptr God = backend::getZYpp( true );
+ KeyRingCallbacks keyring_callbacks;
+ DigestCallbacks digest_callbacks;
// load the catalogs and resolvables from sqlite db
DbSources dbs(db.db());
- KeyRingCallbacks keyring_callbacks;
- DigestCallbacks digest_callbacks;
-
const SourcesList & sources = dbs.sources();
for (SourcesList::const_iterator it = sources.begin(); it != sources.end(); ++it) {
@@ -99,7 +98,9 @@
// now the pool is complete, add transactions
- int count = read_transactions (God->pool(), db.db(), dbs);
+ int removals = 0; // unused here
+
+ int count = read_transactions (God->pool(), db.db(), dbs, removals);
if (count < 0)
return 1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/service-delete.cc new/zmd-backend-7.1.1.0/src/service-delete.cc
--- old/zmd-backend-7.1.1.0/src/service-delete.cc 2006-04-19 18:03:41.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/service-delete.cc 2006-04-20 18:49:49.000000000 +0200
@@ -45,10 +45,10 @@
string src_uri = it->url().asString();
if (src_type == "zypp")
{
- char separator = (src_uri.find('?') != string::npos) ? ';' : '?';
- src_uri += separator + "alias=" + it->alias();
+ string separator = (src_uri.find('?') != string::npos) ? "&" : "?";
+ src_uri += (separator + "alias=" + it->alias());
}
- MIL << "Uri " << src_uri << endl;
+ MIL << "Uri '" << src_uri << "'" << endl;
if (src_uri == uri) {
manager->removeSource( it->alias() );
try {
@@ -90,11 +90,11 @@
MIL << "START service-delete " << db << " " << alias << endl;
ZYpp::Ptr Z = backend::getZYpp( true );
- Target_Ptr target = backend::initTarget( Z, false );
-
KeyRingCallbacks keyring_callbacks;
DigestCallbacks digest_callbacks;
+ Target_Ptr target = backend::initTarget( Z, false );
+
int result = service_delete( Z, alias );
MIL << "END service-delete, result " << result << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/transact.cc new/zmd-backend-7.1.1.0/src/transact.cc
--- old/zmd-backend-7.1.1.0/src/transact.cc 2006-04-19 18:03:42.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/transact.cc 2006-04-20 14:27:57.000000000 +0200
@@ -105,15 +105,15 @@
// start ZYPP
ZYpp::Ptr God = backend::getZYpp();
+ KeyRingCallbacks keyring_callbacks;
+ DigestCallbacks digest_callbacks;
+
Target_Ptr target = backend::initTarget( God );
// load the catalogs and resolvables from sqlite db
DbSources dbs(db.db());
- KeyRingCallbacks keyring_callbacks;
- DigestCallbacks digest_callbacks;
-
const SourcesList & sources = dbs.sources( true ); // create actual zypp sources
for (SourcesList::const_iterator it = sources.begin(); it != sources.end(); ++it) {
@@ -124,7 +124,8 @@
// now the pool is complete, add transactions
- int count = read_transactions (God->pool(), db.db(), dbs);
+ int removals = 0;
+ int count = read_transactions (God->pool(), db.db(), dbs, removals);
if (count < 0) {
cerr << "Reading transactions failed." << endl;
return 1;
@@ -155,8 +156,13 @@
if (nosignature) policy.rpmNoSignature( true );
ZYppCommitResult zres = God->commit( policy );
- if (zres._result <= 0 // no items committed ?
- || zres._errors.size() > 0)
+
+ // removals aren't counted in zres._result, only installs are
+ // so check if there where installs at all before checking zres._result
+
+ if (((count - removals > 0) // any installs ?
+ && (zres._result <= 0)) // but no items committed ?
+ || zres._errors.size() > 0) // or any errors
{
result = 1;
if (zres._errors.size() > 0) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zmd-backend-7.1.1.0/src/transactions.cc new/zmd-backend-7.1.1.0/src/transactions.cc
--- old/zmd-backend-7.1.1.0/src/transactions.cc 2006-04-19 18:03:42.000000000 +0200
+++ new/zmd-backend-7.1.1.0/src/transactions.cc 2006-04-20 14:28:08.000000000 +0200
@@ -27,7 +27,6 @@
#include