Hello community,
here is the log from the commit of package libzypp-zmd-backend
checked in at Wed Mar 29 10:18:11 CEST 2006.
--------
--- /work/SRC/all/libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-03-27 13:37:13.000000000 +0200
+++ /work/src/done/STABLE/libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-03-29 06:35:07.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Mar 29 06:33:39 CEST 2006 - kkaempf@suse.de
+
+- adapt to catalogs table change in zmd, now passes 'subscribed'
+ (#161395)
+- rev 2734, needs zmd >= rev 26297
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp-zmd-backend.spec ++++++
--- /var/tmp/diff_new_pack.oDIxTG/_old 2006-03-29 10:17:33.000000000 +0200
+++ /var/tmp/diff_new_pack.oDIxTG/_new 2006-03-29 10:17:33.000000000 +0200
@@ -22,7 +22,7 @@
Obsoletes: zmd-librc-backend
Summary: ZMD backend for Package, Patch, Pattern, and Product Management
Version: 7.1.1
-Release: 18
+Release: 19
Source: zmd-backend-%{version}.tar.bz2
Prefix: /usr
@@ -68,6 +68,10 @@
/etc/logrotate.d/zmd-backend
%changelog -n libzypp-zmd-backend
+* Wed Mar 29 2006 - kkaempf@suse.de
+- adapt to catalogs table change in zmd, now passes 'subscribed'
+ (#161395)
+- rev 2734, needs zmd >= rev 26297
* Mon Mar 27 2006 - visnov@suse.cz
- try to use source alias for YaST source
- rev 2697
++++++ zmd-backend-7.1.1.tar.bz2 ++++++
++++ 11106 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/Makefile.am new/zmd-backend-7.1.1/src/Makefile.am
--- old/zmd-backend-7.1.1/src/Makefile.am 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/Makefile.am 2006-03-28 22:17:23.000000000 +0200
@@ -23,12 +23,12 @@
update-status \
transact
-query_system_SOURCES = query-system.cc
-query_files_SOURCES = query-files.cc
-resolve_dependencies_SOURCES = resolve-dependencies.cc transactions.cc transactions.h
-transact_SOURCES = transact.cc transactions.cc transactions.h RpmCallbacks.h MediaChangeCallback.h
-parse_metadata_SOURCES = parse-metadata.cc
-package_files_SOURCES = package-files.cc
-find_file_SOURCES = find-file.cc
-update_status_SOURCES = update-status.cc
+query_system_SOURCES = query-system.cc zmd-backend.cc
+query_files_SOURCES = query-files.cc zmd-backend.cc
+resolve_dependencies_SOURCES = resolve-dependencies.cc transactions.cc transactions.h zmd-backend.cc
+transact_SOURCES = transact.cc transactions.cc transactions.h RpmCallbacks.h MediaChangeCallback.h zmd-backend.cc
+parse_metadata_SOURCES = parse-metadata.cc zmd-backend.cc
+package_files_SOURCES = package-files.cc zmd-backend.cc
+find_file_SOURCES = find-file.cc zmd-backend.cc
+update_status_SOURCES = update-status.cc zmd-backend.cc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/dbsource/DbSources.cc new/zmd-backend-7.1.1/src/dbsource/DbSources.cc
--- old/zmd-backend-7.1.1/src/dbsource/DbSources.cc 2006-03-14 15:08:30.000000000 +0100
+++ new/zmd-backend-7.1.1/src/dbsource/DbSources.cc 2006-03-29 06:31:17.000000000 +0200
@@ -79,7 +79,7 @@
const char *query =
// 0 1 2 3 4 5
- "SELECT id, name, alias, description, priority, priority_unsubd "
+ "SELECT id, name, alias, description, priority, subscribed "
"FROM catalogs";
sqlite3_stmt *handle = NULL;
@@ -112,16 +112,21 @@
text = (const char *) sqlite3_column_text( handle, 3 );
if (text != NULL) desc = text;
unsigned priority = sqlite3_column_int( handle, 4 );
- unsigned priority_unsub = sqlite3_column_int( handle, 5 );
+ int subscribed = sqlite3_column_int( handle, 5 );
MIL << "id " << id
<< ", name " << name
<< ", alias " << alias
<< ", desc " << desc
<< ", prio " << priority
- << ", pr. un " << priority_unsub
+ << ", subs " << subscribed
<< endl;
+ if (subscribed == 0) {
+ MIL << "Not subscribed, skipping" << endl;
+ continue;
+ }
+
if (alias.empty()) alias = name;
if (desc.empty()) desc = alias;
@@ -133,7 +138,6 @@
impl->setZmdName( name );
impl->setZmdDescription ( desc );
impl->setPriority( priority );
- impl->setPriorityUnsubscribed( priority_unsub );
impl->attachDatabase( _db );
impl->attachIdMap( &_idmap );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/find-file.cc new/zmd-backend-7.1.1/src/find-file.cc
--- old/zmd-backend-7.1.1/src/find-file.cc 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/find-file.cc 2006-03-28 22:25:06.000000000 +0200
@@ -39,26 +39,8 @@
MIL << "-------------------------------------" << endl;
MIL << "START find-file " << argv[1] << " " << argv[2] << endl;
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
-
- Target_Ptr target;
-
- try {
- God->initTarget( "/", true );
- target = God->target();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- return 1;
- }
+ ZYpp::Ptr God = backend::getZYpp();
+ Target_Ptr target = backend::initTarget( God );
string name = target->rpmDb().whoOwnsFile( argv[2] );
if (name.empty()) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/package-files.cc new/zmd-backend-7.1.1/src/package-files.cc
--- old/zmd-backend-7.1.1/src/package-files.cc 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/package-files.cc 2006-03-28 22:25:11.000000000 +0200
@@ -228,32 +228,13 @@
MIL << "-------------------------------------" << endl;
MIL << "START package-files " << argv[1] << " " << argv[2] << endl;
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
-
DbAccess db(argv[1]);
if (!db.openDb( true )) // open for writing
return 1;
- Target_Ptr target;
-
- try {
- God->initTarget( "/", true );
- target = God->target();
- }
- catch( const Exception & excpt_r ) {
- ERR << "Can't initialize target." << endl;
- ZYPP_CAUGHT( excpt_r );
- return 1;
- }
+ ZYpp::Ptr God = backend::getZYpp();
+ Target_Ptr target = backend::initTarget( God );
int result = package_files( db.db(), str::strtonum<long long>( argv[2] ), target );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/parse-metadata.cc new/zmd-backend-7.1.1/src/parse-metadata.cc
--- old/zmd-backend-7.1.1/src/parse-metadata.cc 2006-03-27 13:08:34.000000000 +0200
+++ new/zmd-backend-7.1.1/src/parse-metadata.cc 2006-03-28 22:25:14.000000000 +0200
@@ -222,15 +222,7 @@
// database type path/uri catalog/alias
MIL << "START parse-metadata " << argv[1] << " " << argv[2] << " " << argv[3] << " " << argv[4] << endl;
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
+ ZYpp::Ptr God = backend::getZYpp();
manager = SourceManager::sourceManager();
if (! restore_sources ())
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/query-files.cc new/zmd-backend-7.1.1/src/query-files.cc
--- old/zmd-backend-7.1.1/src/query-files.cc 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/query-files.cc 2006-03-28 22:28:46.000000000 +0200
@@ -402,30 +402,15 @@
MIL << "-------------------------------------" << endl;
MIL << "START query-files " << argv[1] << " " << argv[2] << " " << ((argc>3)?argv[3]:"") << endl;
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
-
- try {
- God->initTarget( "/", true );
- }
- catch( const Exception & excpt_r ) {
- ERR << "Can't initialize target." << endl;
- ZYPP_CAUGHT( excpt_r );
- return 1;
- }
+ ZYpp::Ptr God = backend::getZYpp();
DbAccess db(argv[1]);
if (!db.openDb( true )) // open for writing
return false;
+ backend::initTarget( God );
+
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 --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/query-system.cc new/zmd-backend-7.1.1/src/query-system.cc
--- old/zmd-backend-7.1.1/src/query-system.cc 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/query-system.cc 2006-03-28 22:25:22.000000000 +0200
@@ -136,23 +136,8 @@
MIL << "-------------------------------------" << endl;
MIL << "START query-system " << argv[1] << endl;
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
-
- try {
- God->initTarget("/");
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- return 1;
- }
+ ZYpp::Ptr God = backend::getZYpp();
+ Target_Ptr target = backend::initTarget( God );
DbAccess db( argv[1] );
if (!db.openDb( true ))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/resolve-dependencies.cc new/zmd-backend-7.1.1/src/resolve-dependencies.cc
--- old/zmd-backend-7.1.1/src/resolve-dependencies.cc 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/resolve-dependencies.cc 2006-03-28 22:25:27.000000000 +0200
@@ -75,17 +75,7 @@
if (!db.openDb(false))
return 1;
- // start ZYPP
-
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
+ ZYpp::Ptr God = backend::getZYpp();
// load the catalogs and resolvables from sqlite db
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/transact.cc new/zmd-backend-7.1.1/src/transact.cc
--- old/zmd-backend-7.1.1/src/transact.cc 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/transact.cc 2006-03-28 22:25:32.000000000 +0200
@@ -88,15 +88,8 @@
// start ZYPP
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
+ ZYpp::Ptr God = backend::getZYpp();
+ Target_Ptr target = backend::initTarget( God );
// load the catalogs and resolvables from sqlite db
@@ -127,16 +120,6 @@
return 0;
}
- try {
- God->initTarget( "/", true );
- }
- catch ( Exception & expt_r ) {
- ZYPP_CAUGHT( expt_r );
- cout << "3|" << expt_r.asUserString() << endl;
- cerr << expt_r.asString() << endl;
- return 1;
- }
-
RpmCallbacks r_callbacks; // init and connect rpm progress callbacks
MediaChangeCallback m_callback; // init and connect media change callback
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/update-status.cc new/zmd-backend-7.1.1/src/update-status.cc
--- old/zmd-backend-7.1.1/src/update-status.cc 2006-03-27 11:10:54.000000000 +0200
+++ new/zmd-backend-7.1.1/src/update-status.cc 2006-03-28 22:25:38.000000000 +0200
@@ -159,15 +159,7 @@
// start ZYPP
- ZYpp::Ptr God;
- try {
- God = zypp::getZYpp();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT (excpt_r);
- cerr << "Couldn't aquire Zypp lock" << endl;
- return 2;
- }
+ ZYpp::Ptr God = backend::getZYpp();
// load the catalogs and resolvables from sqlite db
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/zmd-backend.cc new/zmd-backend-7.1.1/src/zmd-backend.cc
--- old/zmd-backend-7.1.1/src/zmd-backend.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/zmd-backend-7.1.1/src/zmd-backend.cc 2006-03-28 22:28:14.000000000 +0200
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+// zmd-backend.cc
+// ZMD backend helpers
+
+#include "zmd-backend.h"
+
+using namespace zypp;
+using namespace std;
+
+namespace backend {
+
+ZYpp::Ptr
+getZYpp()
+{
+ ZYpp::Ptr Z = NULL;
+ try {
+ Z = getZYpp();
+ }
+ catch (Exception & excpt_r) {
+ ZYPP_CAUGHT (excpt_r);
+ cout << "3|A transaction is already in progress." << endl;
+ cerr << "A transaction is already in progress." << endl;
+ exit(1);
+ }
+ return Z;
+}
+
+Target_Ptr
+initTarget( ZYpp::Ptr Z )
+{
+ Target_Ptr T;
+
+ try {
+ Z->initTarget( "/", true ); // its always "/", and we never populate the pool (commit_only = true)
+ T = Z->target();
+ }
+ catch (Exception & excpt_r) {
+ ZYPP_CAUGHT (excpt_r);
+ cout << "3|" << excpt_r.asUserString() << endl;
+ cerr << excpt_r.asString() << endl;
+ exit(1);
+ }
+ return T;
+}
+
+};
+
+// EOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zmd-backend-7.1.1/src/zmd-backend.h new/zmd-backend-7.1.1/src/zmd-backend.h
--- old/zmd-backend-7.1.1/src/zmd-backend.h 2006-03-14 15:08:30.000000000 +0100
+++ new/zmd-backend-7.1.1/src/zmd-backend.h 2006-03-28 22:24:51.000000000 +0200
@@ -3,9 +3,19 @@
#ifndef ZMD_BACKEND_H
#define ZMD_BACKEND_H
-#include "zypp/base/LogControl.h"
+#include