Hello community,
here is the log from the commit of package libzypp-zmd-backend
checked in at Mon Oct 2 19:30:17 CEST 2006.
--------
--- libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-09-14 13:10:21.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-10-02 19:20:11.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Oct 2 19:18:32 CEST 2006 - dmacvicar@suse.de
+
+- disable wrting patch and delta rpm information to the database.
+ will enable later
+- r4218
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp-zmd-backend.spec ++++++
--- /var/tmp/diff_new_pack.B5PGWc/_old 2006-10-02 19:28:39.000000000 +0200
+++ /var/tmp/diff_new_pack.B5PGWc/_new 2006-10-02 19:28:39.000000000 +0200
@@ -12,7 +12,7 @@
Name: libzypp-zmd-backend
Version: 7.1.1.0_0.4
-Release: 2
+Release: 6
License: GPL
Group: System/Management
Summary: ZMD backend for Package, Patch, Pattern, and Product Management
@@ -72,6 +72,10 @@
/etc/logrotate.d/zmd-backend
%changelog -n libzypp-zmd-backend
+* Mon Oct 02 2006 - dmacvicar@suse.de
+- disable wrting patch and delta rpm information to the database.
+ will enable later
+- r4218
* Thu Sep 14 2006 - schubi@suse.de
- Revision 4144
* Thu Sep 14 2006 - mvidner@suse.cz
++++++ zmd-backend-7.1.1.0_0.4.tar.bz2 ++++++
++++ 26736 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.0_0.4/config.h.in new/zmd-backend-7.1.1.0_0.4/config.h.in
--- old/zmd-backend-7.1.1.0_0.4/config.h.in 2006-09-14 12:45:21.000000000 +0200
+++ new/zmd-backend-7.1.1.0_0.4/config.h.in 2006-09-13 13:07:07.000000000 +0200
@@ -19,15 +19,27 @@
*/
#undef HAVE_ALLOCA_H
+/* Define to 1 if you have the `argz_count' function. */
+#undef HAVE_ARGZ_COUNT
+
/* Define to 1 if you have the header file. */
#undef HAVE_ARGZ_H
+/* Define to 1 if you have the `argz_next' function. */
+#undef HAVE_ARGZ_NEXT
+
+/* Define to 1 if you have the `argz_stringify' function. */
+#undef HAVE_ARGZ_STRINGIFY
+
/* Define to 1 if you have the `asprintf' function. */
#undef HAVE_ASPRINTF
/* Define to 1 if you have the header file. */
#undef HAVE_BOOST_SCOPED_PTR_HPP
+/* Define to 1 if the compiler understands __builtin_expect. */
+#undef HAVE_BUILTIN_EXPECT
+
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
@@ -109,18 +121,12 @@
/* Define to 1 if you have the header file. */
#undef HAVE_LIMITS_H
-/* Define to 1 if you have the header file. */
-#undef HAVE_LOCALE_H
-
/* Define if you have the 'long double' type. */
#undef HAVE_LONG_DOUBLE
/* Define if you have the 'long long' type. */
#undef HAVE_LONG_LONG
-/* Define to 1 if you have the header file. */
-#undef HAVE_MALLOC_H
-
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
@@ -133,12 +139,19 @@
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
-/* Define to 1 if you have the header file. */
-#undef HAVE_NL_TYPES_H
+/* Define if you have and it defines the NL_LOCALE_NAME macro if
+ _GNU_SOURCE is defined. */
+#undef HAVE_NL_LOCALE_NAME
/* Define if your printf() function supports format strings with positions. */
#undef HAVE_POSIX_PRINTF
+/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */
+#undef HAVE_PTHREAD_MUTEX_RECURSIVE
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#undef HAVE_PTHREAD_RWLOCK
+
/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
@@ -203,6 +216,10 @@
/* Define if you have the 'unsigned long long' type. */
#undef HAVE_UNSIGNED_LONG_LONG
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+ declarations. */
+#undef HAVE_VISIBILITY
+
/* Define if you have the 'wchar_t' type. */
#undef HAVE_WCHAR_T
@@ -212,15 +229,6 @@
/* Define if you have the 'wint_t' type. */
#undef HAVE_WINT_T
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
-
/* Define to 1 if you have the `__fsetlocking' function. */
#undef HAVE___FSETLOCKING
@@ -254,13 +262,16 @@
/* Define if exists and defines unusable PRI* macros. */
#undef PRI_MACROS_BROKEN
+/* Define if the pthread_in_use() detection is hard. */
+#undef PTHREAD_IN_USE_DETECTION_HARD
+
/* Define as the maximum value of type 'size_t', if the system doesn't define
it. */
#undef SIZE_MAX
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
+ automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
@@ -272,27 +283,50 @@
/* gettext textdomain */
#undef TEXTDOMAIN
+/* Define if the POSIX multithreading library can be used. */
+#undef USE_POSIX_THREADS
+
+/* Define if references to the POSIX multithreading library should be made
+ weak. */
+#undef USE_POSIX_THREADS_WEAK
+
+/* Define if the GNU Pth multithreading library can be used. */
+#undef USE_PTH_THREADS
+
+/* Define if references to the GNU Pth multithreading library should be made
+ weak. */
+#undef USE_PTH_THREADS_WEAK
+
+/* Define if the old Solaris multithreading library can be used. */
+#undef USE_SOLARIS_THREADS
+
+/* Define if references to the old Solaris multithreading library should be
+ made weak. */
+#undef USE_SOLARIS_THREADS_WEAK
+
+/* Define if the Win32 multithreading API can be used. */
+#undef USE_WIN32_THREADS
+
/* Version number of package */
#undef VERSION
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
-/* Define to `long' if does not define. */
-#undef off_t
-
/* Define as the type of the result of subtracting two pointers, if the system
doesn't define it. */
#undef ptrdiff_t
@@ -300,9 +334,41 @@
/* Define to empty if the C compiler doesn't support this keyword. */
#undef signed
-/* Define to `unsigned' if does not define. */
+/* Define to `unsigned int' if does not define. */
#undef size_t
/* Define to unsigned long or unsigned long long if and
don't define. */
#undef uintmax_t
+
+
+#define __libc_lock_t gl_lock_t
+#define __libc_lock_define gl_lock_define
+#define __libc_lock_define_initialized gl_lock_define_initialized
+#define __libc_lock_init gl_lock_init
+#define __libc_lock_lock gl_lock_lock
+#define __libc_lock_unlock gl_lock_unlock
+#define __libc_lock_recursive_t gl_recursive_lock_t
+#define __libc_lock_define_recursive gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive gl_recursive_lock_init
+#define __libc_lock_lock_recursive gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
+#define glthread_in_use libintl_thread_in_use
+#define glthread_lock_init libintl_lock_init
+#define glthread_lock_lock libintl_lock_lock
+#define glthread_lock_unlock libintl_lock_unlock
+#define glthread_lock_destroy libintl_lock_destroy
+#define glthread_rwlock_init libintl_rwlock_init
+#define glthread_rwlock_rdlock libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock libintl_rwlock_wrlock
+#define glthread_rwlock_unlock libintl_rwlock_unlock
+#define glthread_rwlock_destroy libintl_rwlock_destroy
+#define glthread_recursive_lock_init libintl_recursive_lock_init
+#define glthread_recursive_lock_lock libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy
+#define glthread_once libintl_once
+#define glthread_once_call libintl_once_call
+#define glthread_once_singlethreaded libintl_once_singlethreaded
+
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.0_0.4/src/dbsource/DbAccess.cc new/zmd-backend-7.1.1.0_0.4/src/dbsource/DbAccess.cc
--- old/zmd-backend-7.1.1.0_0.4/src/dbsource/DbAccess.cc 2006-09-14 12:44:03.000000000 +0200
+++ new/zmd-backend-7.1.1.0_0.4/src/dbsource/DbAccess.cc 2006-10-02 19:15:25.000000000 +0200
@@ -777,15 +777,16 @@
sqlite3_bind_int( handle, 10, pkg->sourceMediaNr() );
rc = sqlite3_step( handle);
- sqlite3_reset( handle);
-
+
if (rc != SQLITE_DONE)
{
ERR << "Error adding package to SQL: " << sqlite3_errmsg (_db) << endl;
return -1;
}
sqlite_int64 package_rowid = sqlite3_last_insert_rowid (_db);
+ sqlite3_reset( handle);
+#if 0
// access package implementation to get delta and patch rpm info
detail::ResImplTraitsPackage::Impl::constPtr pipp( detail::ImplConnect::resimpl( pkg ) );
@@ -806,7 +807,7 @@
writePatchPackage ( package_rowid, *it );
}
}
-
+#endif
return package_rowid;
}
@@ -834,7 +835,6 @@
sqlite3_bind_int( handle, 6, patch_pkg.buildtime() );
rc = sqlite3_step( handle);
- sqlite3_reset( handle);
if (rc != SQLITE_DONE)
{
@@ -849,14 +849,16 @@
writePatchPackageBaseversion( rowid, *it );
}
+ sqlite3_reset( handle);
return rowid;
}
sqlite_int64
DbAccess::writePatchPackageBaseversion(sqlite_int64 patch_package_id, const PatchRpm::BaseVersion &baseversion )
{
+ MIL << "writing " << baseversion << std::endl;
int rc;
- sqlite3_stmt *handle = _insert_patch_package_handle;
+ sqlite3_stmt *handle = _insert_patch_package_baseversion_handle;
sqlite3_bind_int64( handle, 1, patch_package_id);
@@ -872,14 +874,16 @@
}
rc = sqlite3_step( handle);
- sqlite3_reset( handle);
-
+
if (rc != SQLITE_DONE)
{
ERR << "Error adding patch package baseversion to SQL: " << sqlite3_errmsg (_db) << endl;
return -1;
}
sqlite_int64 rowid = sqlite3_last_insert_rowid (_db);
+
+ sqlite3_reset( handle);
+
return rowid;
}
@@ -893,39 +897,93 @@
int rc;
sqlite3_stmt *handle = _insert_delta_package_handle;
- sqlite3_bind_int64( handle, 1, package_id);
-
- // on media location data
- sqlite3_bind_int( handle, 2, delta_pkg.location().medianr() );
- sqlite3_bind_text( handle, 3, delta_pkg.location().filename().asString().c_str(), -1, SQLITE_STATIC );
- std::string checksum_encoded_string = delta_pkg.location().checksum().type() + ":" + delta_pkg.location().checksum().checksum();
- sqlite3_bind_text( handle, 4, checksum_encoded_string.c_str() , -1, SQLITE_STATIC );
- sqlite3_bind_int( handle, 5, delta_pkg.location().downloadsize() );
-
- // delta rpm own data
- sqlite3_bind_int( handle, 6, delta_pkg.buildtime() );
+ // "INSERT INTO delta_packages "
+ // 1 2 3 4 5 6
+ // " ( package_id, media_nr, location, checksum, download_size, build_time"
+ // 7 8 9 10 11 12
+ // " , baseversion_version, baseversion_release, baseversion_epoch, baseversion_checksum, baseversion_build_time, baseversion_sequence_info ) "
+ // " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+
+ MIL << "Delta: " << std::endl;
+ MIL << package_id << " " << delta_pkg.location().medianr() << " " << delta_pkg.location().filename().asString() << std::endl;
+
+ try {
+ rc = sqlite3_bind_int64( handle, 1, package_id);
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ // on media location data
+ rc = sqlite3_bind_int( handle, 2, delta_pkg.location().medianr() );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ rc = sqlite3_bind_text( handle, 3, delta_pkg.location().filename().asString().c_str(), -1, SQLITE_STATIC );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ std::string checksum_encoded_string = delta_pkg.location().checksum().type() + ":" + delta_pkg.location().checksum().checksum();
+
+ // this segfaults
+ rc = sqlite3_bind_text( handle, 4, checksum_encoded_string.c_str() , -1, SQLITE_STATIC );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ rc = sqlite3_bind_int( handle, 5, (int) delta_pkg.location().downloadsize() );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ // delta rpm own data
+ rc = sqlite3_bind_int( handle, 6, (int) delta_pkg.buildtime() );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+
+ // base version data
+ rc = sqlite3_bind_text( handle, 7, delta_pkg.baseversion().edition().version().c_str(), -1, SQLITE_STATIC );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ rc = sqlite3_bind_text( handle, 8, delta_pkg.baseversion().edition().release().c_str(), -1, SQLITE_STATIC );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ if (delta_pkg.baseversion().edition().epoch() == Edition::noepoch)
+ {
+ rc = sqlite3_bind_int( handle, 9, 0);
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+ }
+ else
+ {
+ rc = sqlite3_bind_int( handle, 9, (int) delta_pkg.baseversion().edition().epoch() );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+ }
+ checksum_encoded_string = delta_pkg.baseversion().checksum().type() + ":" + delta_pkg.baseversion().checksum().checksum();
+ rc = sqlite3_bind_text( handle, 10, checksum_encoded_string.c_str() , -1, SQLITE_STATIC );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ rc = sqlite3_bind_int( handle, 11, (int) delta_pkg.baseversion().buildtime() );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
+
+ rc = sqlite3_bind_text( handle, 12, delta_pkg.baseversion().sequenceinfo().c_str() , -1, SQLITE_STATIC );
+ if ( rc != SQLITE_OK )
+ ZYPP_THROW(Exception(sqlite3_errmsg(_db)));
- // base version data
- sqlite3_bind_text( handle, 7, delta_pkg.baseversion().edition().version().c_str(), -1, SQLITE_STATIC );
- sqlite3_bind_text( handle, 8, delta_pkg.baseversion().edition().release().c_str(), -1, SQLITE_STATIC );
- if (delta_pkg.baseversion().edition().epoch() == Edition::noepoch)
- {
- sqlite3_bind_int( handle, 9, 0);
}
- else
+ catch ( const Exception &e )
{
- sqlite3_bind_int( handle, 9, delta_pkg.baseversion().edition().epoch() );
+ ERR << "Error adding delta package to SQL: " << e.msg() << endl;
+ return -1;
}
- checksum_encoded_string = delta_pkg.baseversion().checksum().type() + ":" + delta_pkg.baseversion().checksum().checksum();
- sqlite3_bind_text( handle, 10, checksum_encoded_string.c_str() , -1, SQLITE_STATIC );
- sqlite3_bind_int( handle, 11, delta_pkg.baseversion().buildtime() );
- sqlite3_bind_text( handle, 12, delta_pkg.baseversion().sequenceinfo().c_str() , -1, SQLITE_STATIC );
-
+
+
//FIXME add build time data
rc = sqlite3_step( handle);
- sqlite3_reset( handle);
if (rc != SQLITE_DONE)
{
@@ -933,7 +991,7 @@
return -1;
}
sqlite_int64 rowid = sqlite3_last_insert_rowid (_db);
-
+ sqlite3_reset( handle);
return rowid;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org