Hello community, here is the log from the commit of package libzypp-zmd-backend checked in at Thu Apr 27 14:41:02 CEST 2006. -------- --- libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-04-26 18:16:21.000000000 +0200 +++ STABLE/libzypp-zmd-backend/libzypp-zmd-backend.changes 2006-04-27 14:11:28.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Apr 27 14:10:29 CEST 2006 - kkaempf@suse.de + +- dont exit early if url already known (#170113) +- rev 3252 + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp-zmd-backend.spec ++++++ --- /var/tmp/diff_new_pack.mwTZGj/_old 2006-04-27 14:39:35.000000000 +0200 +++ /var/tmp/diff_new_pack.mwTZGj/_new 2006-04-27 14:39:35.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: 32 +Release: 35 Source: zmd-backend-%{version}.tar.bz2 Prefix: /usr @@ -68,6 +68,9 @@ /etc/logrotate.d/zmd-backend %changelog -n libzypp-zmd-backend +* Thu Apr 27 2006 - kkaempf@suse.de +- dont exit early if url already known (#170113) +- rev 3252 * Wed Apr 26 2006 - kkaempf@suse.de - enable target store in 'transact' helper. - show the message content, not the resolvable. ++++++ 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/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-25 16:38:31.000000000 +0200 +++ new/zmd-backend-7.1.1.0/src/parse-metadata.cc 2006-04-27 14:08:13.000000000 +0200 @@ -70,6 +70,14 @@ //---------------------------------------------------------------------------- // upload all zypp sources as catalogs to the database +// If url is non-empty, it defines the real url where the metadata comes from +// Usually zmd downloads metadata and provides is via a local path +// However, this is not useful for zypp since other applications linking against +// zypp (e.g. YaST) need the real url in order to work with it. +// So in the special case of local metadata (since already downloaded by zmd), the +// real url is passed here and set in the source. This way, storing the source in +// zypp makes all information available to all zypp applications. +// static void sync_source( DbAccess & db, Source_Ref source, const string & catalog, const Url & url, bool zmd_owned ) { @@ -225,21 +233,14 @@ if (uri.asString() == it->url().asString()) { // url already known ? - if (owner == ZMD) { // and owned by ZMD ? - MIL << "Found url, source already known to zypp" << endl; - sync_source( db, *it, catalog, Url(), owner == ZMD ); - break; - } - else { // --type=zypp used but no alias given - ERR << "Duplicate source, url already known" << endl; - cerr << "3|Duplicate source, url already known" << endl; - break; - } + MIL << "Found url, source already known to zypp" << endl; + sync_source( db, *it, catalog, Url(), owner == ZMD ); // since its known by url, it already has a real Url, no need to pass one + break; } } else if (urialias == it->alias()) { // urialias matches zypp one MIL << "Found alias, source already known to zypp" << endl; - sync_source( db, *it, catalog, Url(), owner == ZMD ); + sync_source( db, *it, catalog, Url(), owner == ZMD ); // known by alias break; } } @@ -260,10 +261,12 @@ try { if (owner == ZMD) { // use zmd downloaded metadata: source = SourceFactory().createFrom( pathurl, Pathname(), catalog, Pathname() ); + // zmd provided the data locally, 'source' has a local path, pass the real uri to sync_source sync_source( db, source, catalog, uri, owner == ZMD ); } else { // let zypp do the download source = SourceFactory().createFrom( uri, Pathname(), catalog, Pathname() ); + // new zypp source, 'source' already has the real url, pass empty uri to sync_source sync_source( db, source, catalog, Url(), owner == ZMD ); } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...