Hello community,
here is the log from the commit of package libzypp
checked in at Sat Sep 15 12:03:52 CEST 2007.
--------
--- libzypp/libzypp.changes 2007-09-13 18:20:01.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes 2007-09-14 23:15:01.870064000 +0200
@@ -1,0 +2,7 @@
+Fri Sep 14 22:57:54 CEST 2007 - ma@suse.de
+
+- Enable using patch and delta rpms. (#309124)
+- version 3.24.0
+- revision 7253
+
+-------------------------------------------------------------------
Old:
----
libzypp-3.23.2.tar.bz2
New:
----
libzypp-3.24.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.U16253/_old 2007-09-15 12:03:31.000000000 +0200
+++ /var/tmp/diff_new_pack.U16253/_new 2007-09-15 12:03:31.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package libzypp (Version 3.23.2)
+# spec file for package libzypp (Version 3.24.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -14,11 +14,11 @@
License: GPL v2 or later
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Autoreqprov: on
+AutoReqProv: on
Summary: Package, Patch, Pattern, and Product Management
-Version: 3.23.2
+Version: 3.24.0
Release: 1
-Source: libzypp-3.23.2.tar.bz2
+Source: libzypp-3.24.0.tar.bz2
Source1: libzypp-rpmlintrc
Prefix: /usr
Provides: yast2-packagemanager
@@ -44,7 +44,7 @@
Ladislav Slezak
%package devel
-Requires: libzypp == 3.23.2
+Requires: libzypp == 3.24.0
Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
Requires: cmake
@@ -129,6 +129,10 @@
%{_libdir}/pkgconfig/libzypp.pc
%changelog
+* Fri Sep 14 2007 - ma@suse.de
+- Enable using patch and delta rpms. (#309124)
+- version 3.24.0
+- revision 7253
* Thu Sep 13 2007 - ma@suse.de
- On update do not delete unmaintained non-SuSE packages.
- version 3.23.2
++++++ libzypp-3.23.2.tar.bz2 -> libzypp-3.24.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/devel/devel.ma/CMakeLists.txt new/libzypp-3.24.0/devel/devel.ma/CMakeLists.txt
--- old/libzypp-3.23.2/devel/devel.ma/CMakeLists.txt 2007-09-13 18:19:37.000000000 +0200
+++ new/libzypp-3.24.0/devel/devel.ma/CMakeLists.txt 2007-09-14 23:14:30.000000000 +0200
@@ -29,7 +29,7 @@
## ############################################################
-FOREACH( loop_var ScanSource Iorder Xml Main FakePool AOUT Parse Test Basic)
+FOREACH( loop_var ScanSource Iorder Xml Ex Main FakePool AOUT Parse Test Basic)
ADD_EXECUTABLE( ${loop_var}
${loop_var}.cc
)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/devel/devel.ma/Ex.cc new/libzypp-3.24.0/devel/devel.ma/Ex.cc
--- old/libzypp-3.23.2/devel/devel.ma/Ex.cc 2007-09-13 18:19:37.000000000 +0200
+++ new/libzypp-3.24.0/devel/devel.ma/Ex.cc 2007-09-14 23:14:30.000000000 +0200
@@ -1,170 +1,91 @@
-#include
+#include "Tools.h"
-#include <iostream>
-
-#include
+#include
+#include
#include
-#include
-#include
-#include
-#include
+#include
+#include
+
+#include "zypp/ZYppFactory.h"
+#include "zypp/ResPoolProxy.h"
+#include
+
+#include "zypp/ZYppCallbacks.h"
+#include "zypp/NVRAD.h"
+#include "zypp/ResPool.h"
+#include "zypp/ResFilters.h"
+#include "zypp/CapFilters.h"
+#include "zypp/Package.h"
+#include "zypp/Pattern.h"
+#include "zypp/Language.h"
+#include "zypp/Digest.h"
+#include "zypp/PackageKeyword.h"
+#include "zypp/NameKindProxy.h"
+#include "zypp/pool/GetResolvablesToInsDel.h"
+
+#include "zypp/parser/TagParser.h"
+#include "zypp/parser/susetags/PackagesFileReader.h"
+#include "zypp/parser/susetags/PackagesLangFileReader.h"
+#include "zypp/parser/susetags/PatternFileReader.h"
+#include "zypp/parser/susetags/ContentFileReader.h"
+#include "zypp/parser/susetags/RepoIndex.h"
+#include "zypp/parser/susetags/RepoParser.h"
+#include "zypp/cache/CacheStore.h"
+#include "zypp/RepoManager.h"
+#include "zypp/RepoInfo.h"
+
+#include "zypp/ui/PatchContents.h"
+#include "zypp/ResPoolProxy.h"
using namespace std;
using namespace zypp;
-using namespace zypp::parser::yum;
-
-#include "zypp/parser/yum/YUMParser.h"
+using namespace zypp::functor;
+using namespace zypp::ui;
+using zypp::parser::TagParser;
///////////////////////////////////////////////////////////////////
-template<class _Cl>
- void ti( const _Cl & c )
- {
- SEC << __PRETTY_FUNCTION << endl;
- }
+static const Pathname sysRoot( "/Local/GTEST" );
+
///////////////////////////////////////////////////////////////////
-template<class _Parser>
- bool consume( const typename _Parser::value_type & node_r )
+struct Xprint
+{
+ bool operator()( const PoolItem & obj_r )
{
- //DBG << node_r << endl;
+// handle( asKind<Package>( obj_r ) );
+// handle( asKind<Patch>( obj_r ) );
+// handle( asKind<Pattern>( obj_r ) );
+// handle( asKind<Product>( obj_r ) );
return true;
}
-template<class _Parser>
- void parseXmlFile( const Pathname & file_r,
- function consume_r
- = consume<_Parser> )
- {
- Measure x( " zparse "+file_r.asString() );
- ifgzstream istr( file_r.asString().c_str() );
- if ( ! istr )
- {
- ZYPP_THROW( Exception( "Bad stream" ) );
- }
+ void handle( const Package_constPtr & p )
+ {
+ if ( !p )
+ return;
+ }
- for( _Parser parser( istr, "" ); ! parser.atEnd(); ++parser )
- {
- if ( consume_r && ! consume_r( *parser ) )
- {
- DBG << "abort parseXmlFile " << file_r << endl;
- return;
- }
- }
+ void handle( const Patch_constPtr & p )
+ {
+ if ( !p )
+ return;
}
-bool consumeRepomd( const YUMRepomdParser::value_type & node_r )
-{
- DBG << node_r << endl;
- return true;
-}
+ void handle( const Pattern_constPtr & p )
+ {
+ if ( !p )
+ return;
+ }
-void zparse( const Pathname & repodata_r )
-{
- Measure x( "ZPARSE" );
- parseXmlFile<YUMRepomdParser> ( repodata_r / "repomd.xml", consumeRepomd );
- parseXmlFile<YUMPrimaryParser> ( repodata_r / "primary.xml" );
- parseXmlFile<YUMOtherParser> ( repodata_r / "other.xml" );
- parseXmlFile<YUMFileListParser>( repodata_r / "filelists.xml" );
- //parseXmlFile<YUMPatchesParser> ( repodata_r / "patches.xml" );
-}
+ void handle( const Product_constPtr & p )
+ {
+ if ( !p )
+ return;
+ }
+};
///////////////////////////////////////////////////////////////////
-
-/**
- * processNode:
- * @reader: the xmlReader
- *
- * Dump information about the current node
- */
-static void
-processNode(xmlTextReaderPtr reader) {
- const xmlChar *name, *value;
-
- name = xmlTextReaderConstName(reader);
- if (name == NULL)
- name = BAD_CAST "--";
-
- value = xmlTextReaderConstValue(reader);
- string t;
- if ( value )
- {
- t = (const char *)value;
- }
- return;
- printf("%d %d %s %d %d",
- xmlTextReaderDepth(reader),
- xmlTextReaderNodeType(reader),
- name,
- xmlTextReaderIsEmptyElement(reader),
- xmlTextReaderHasValue(reader));
- if (value == NULL)
- printf("\n");
- else {
- if (xmlStrlen(value) > 40)
- printf(" %.40s...\n", value);
- else
- printf(" %s\n", value);
- }
-}
-
-
-/**
- * streamFile:
- * @filename: the file name to parse
- *
- * Parse and print information about an XML file.
- */
-//template<class _Parser>
-static void
-streamFile(const char *filename) {
- Measure x( string(" lparse ")+filename );
- xmlTextReaderPtr reader;
- int ret;
-
- reader = xmlReaderForFile(filename, NULL, 0);
- if (reader != NULL) {
- ret = xmlTextReaderRead(reader);
- while (ret == 1) {
- processNode(reader);
- ret = xmlTextReaderRead(reader);
- }
- xmlFreeTextReader(reader);
- if (ret != 0) {
- ZYPP_THROW( Exception( string("Failed to parse ") + filename ) );
- }
- } else {
- ZYPP_THROW( Exception( string("Unable to open ") + filename ) );
- }
-}
-
-void lparse( const Pathname & repodata_r )
-{
- Measure x( "LPARSE" );
- /*
- * this initialize the library and check potential ABI mismatches
- * between the version it was compiled for and the actual shared
- * library used.
- */
- LIBXML_TEST_VERSION
-
- streamFile( (repodata_r / "repomd.xml").asString().c_str() );
- streamFile( (repodata_r / "primary.xml").asString().c_str() );
- streamFile( (repodata_r / "other.xml").asString().c_str() );
- streamFile( (repodata_r / "filelists.xml").asString().c_str() );
- //streamFile( (repodata_r / "patches.xml").asString().c_str() );
-
- /*
- * Cleanup function for the XML library.
- */
- xmlCleanupParser();
-
- /*
- * this is to debug memory for regression tests
- */
- xmlMemoryDump();
-}
-
/******************************************************************
**
** FUNCTION NAME : main
@@ -172,17 +93,77 @@
*/
int main( int argc, char * argv[] )
{
+ //zypp::base::LogControl::instance().logfile( "log.restrict" );
INT << "===[START]==========================================" << endl;
- ti( YUMRepomdParser() );
- ti( YUMRepomdParser::value_type() );
- return 0;
- Pathname repodata( "/Local/PATCHES/repodata" );
- repodata = "/Local/FACTORY/repodata";
- lparse( repodata );
- zparse( repodata );
+ setenv( "ZYPP_CONF", (sysRoot/"zypp.conf").c_str(), 1 );
+
+ RepoManager repoManager( makeRepoManager( sysRoot ) );
+ RepoInfoList repos = repoManager.knownRepositories();
+ SEC << "knownRepositories " << repos << endl;
+
+ if ( repos.empty() )
+ {
+ RepoInfo nrepo;
+ nrepo
+ .setAlias( "factorytest" )
+ .setName( "Test Repo for factory." )
+ .setEnabled( true )
+ .setAutorefresh( false )
+ .addBaseUrl( Url("http://dist.suse.de/install/stable-x86/") );
+
+ repoManager.addRepository( nrepo );
+ repos = repoManager.knownRepositories();
+ }
+ for ( RepoInfoList::iterator it = repos.begin(); it != repos.end(); ++it )
+ {
+ RepoInfo & nrepo( *it );
+ if ( ! nrepo.enabled() )
+ continue;
+
+ SEC << "refreshMetadata" << endl;
+ repoManager.refreshMetadata( nrepo );
+
+ if ( ! repoManager.isCached( nrepo ) || 0 )
+ {
+ if ( repoManager.isCached( nrepo ) )
+ {
+ SEC << "cleanCache" << endl;
+ repoManager.cleanCache( nrepo );
+ }
+ SEC << "refreshMetadata" << endl;
+ repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
+ SEC << "buildCache" << endl;
+ repoManager.buildCache( nrepo );
+ }
+
+ SEC << nrepo << endl;
+ Repository nrep( repoManager.createFromCache( nrepo ) );
+ const zypp::ResStore & store( nrep.resolvables() );
+ dumpPoolStats( SEC << "Store: " << endl,
+ store.begin(), store.end() ) << endl;
+ getZYpp()->addResolvables( store );
+ }
+
+ ResPool pool( getZYpp()->pool() );
+ vdumpPoolStats( USR << "Initial pool:" << endl,
+ pool.begin(),
+ pool.end() ) << endl;
+
+ if ( 0 )
+ {
+ {
+ //zypp::base::LogControl::TmpLineWriter shutUp;
+ getZYpp()->initTarget( sysRoot );
+ }
+ MIL << "Added target: " << pool << endl;
+ }
+
+ std::for_each( pool.begin(), pool.end(), Xprint() );
+
+ ///////////////////////////////////////////////////////////////////
INT << "===[END]============================================" << endl << endl;
+ zypp::base::LogControl::instance().logNothing();
return 0;
}
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/devel/devel.ma/Parse.cc new/libzypp-3.24.0/devel/devel.ma/Parse.cc
--- old/libzypp-3.23.2/devel/devel.ma/Parse.cc 2007-09-13 18:19:38.000000000 +0200
+++ new/libzypp-3.24.0/devel/devel.ma/Parse.cc 2007-09-14 23:14:30.000000000 +0200
@@ -20,6 +20,7 @@
#include "zypp/Language.h"
#include "zypp/Digest.h"
#include "zypp/PackageKeyword.h"
+#include "zypp/ManagedFile.h"
#include "zypp/NameKindProxy.h"
#include "zypp/pool/GetResolvablesToInsDel.h"
@@ -34,6 +35,8 @@
#include "zypp/RepoManager.h"
#include "zypp/RepoInfo.h"
+#include "zypp/repo/PackageProvider.h"
+
#include "zypp/ui/PatchContents.h"
#include "zypp/ResPoolProxy.h"
@@ -48,14 +51,25 @@
static const Pathname sysRoot( "/Local/ROOT" );
///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
bool queryInstalledEditionHelper( const std::string & name_r,
const Edition & ed_r,
- const Arch & arch_r ) const
+ const Arch & arch_r )
{
- INT << name_r << "-" << ed_r <<< "." < arch_r << endl;
+ if ( ed_r == Edition::noedition )
+ return true;
+ if ( name_r == "kernel-default" && ed_r == Edition("2.6.22.5-10") )
+ return true;
+ if ( name_r == "update-test-affects-package-manager" && ed_r == Edition("1.1-6") )
+ return true;
+
return false;
}
+
ManagedFile repoProvidePackage( const PoolItem & pi )
{
ResPool _pool( getZYpp()->pool() );
@@ -70,12 +84,15 @@
// Build a repository list for repos
// contributing to the pool
- std::list<Repository> repos( _pool.knownRepositoriesBegin(), _pool.knownRepositoriesEnd() );
- repo::DeltaCandidates deltas(repos);
+ repo::DeltaCandidates deltas( repo::makeDeltaCandidates( _pool.knownRepositoriesBegin(),
+ _pool.knownRepositoriesEnd() ) );
repo::PackageProvider pkgProvider( _access, p, deltas, packageProviderPolicy );
return pkgProvider.providePackage();
}
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
template<class _Res>
@@ -91,28 +108,38 @@
}
template<class _Res>
-Selectable::Ptr getPi( const std::string & name_r, const Edition & ed_r, const Arch & arch_r )
+PoolItem getPi( const std::string & name_r, const Edition & ed_r, const Arch & arch_r )
{
- ResPoolProxy uipool( getZYpp()->poolProxy() );
- for_(it, uipool.byKindBegin<_Res>(), uipool.byKindEnd<_Res>() )
+ PoolItem ret;
+ ResPool pool( getZYpp()->pool() );
+ for_(it, pool.byNameBegin(name_r), pool.byNameEnd(name_r) )
{
- if ( (*it)->name() == name_r )
- return (*it);
+ if ( !ret && isKind<_Res>( (*it).resolvable() )
+ && ( ed_r == Edition() || ed_r == (*it)->edition() )
+ && ( arch_r == Arch() || arch_r == (*it)->arch() ) )
+ {
+ ret = (*it);
+ MIL << " ->" << *it << endl;
+ }
+ else
+ {
+ DBG << " ?" << *it << endl;
+ }
}
- return 0;
+ return ret;
}
template<class _Res>
-Selectable::Ptr getPi( const std::string & name_r, const Edition & ed_r )
+PoolItem getPi( const std::string & name_r )
{
return getPi<_Res>( name_r, Edition(), Arch() );
}
template<class _Res>
-Selectable::Ptr getPi( const std::string & name_r, const Edition & ed_r )
+PoolItem getPi( const std::string & name_r, const Edition & ed_r )
{
return getPi<_Res>( name_r, ed_r, Arch() );
}
template<class _Res>
-Selectable::Ptr getPi( const std::string & name_r, const Arch & arch_r )
+PoolItem getPi( const std::string & name_r, const Arch & arch_r )
{
return getPi<_Res>( name_r, Edition(), arch_r );
}
@@ -137,7 +164,7 @@
}
///////////////////////////////////////////////////////////////////
-RepoProvidePackage repoProvidePackage( access, pool_r);
+
struct Xprint
{
bool operator()( const PoolItem & obj_r )
@@ -508,7 +535,8 @@
repoManager.cleanCache( nrepo );
}
SEC << "refreshMetadata" << endl;
- repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
+ //repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
+ repoManager.refreshMetadata( nrepo );
SEC << "buildCache" << endl;
repoManager.buildCache( nrepo );
}
@@ -525,7 +553,7 @@
USR << "pool: " << pool << endl;
SEC << pool.knownRepositoriesSize() << endl;
- if ( 1 )
+ if ( 0 )
{
{
zypp::base::LogControl::TmpLineWriter shutUp;
@@ -537,9 +565,20 @@
//std::for_each( pool.begin(), pool.end(), Xprint() );
- PoolItem pi(
+ repo::DeltaCandidates deltas( repo::makeDeltaCandidates( pool.knownRepositoriesBegin(),
+ pool.knownRepositoriesEnd() ) );
+
+ DBG << "patch: " << deltas.patchRpms(0).size() << " " << deltas.patchRpms(0) << endl;
+ DBG << "delta: " << deltas.deltaRpms(0).size() << " " << deltas.deltaRpms(0) << endl;
+
+ PoolItem pi( getPi<Package>( "kernel-default", Edition("2.6.22.5-12") ) );
+ USR << pi << endl;
+ USR << repoProvidePackage( pi ) << endl;
+
+ pi = getPi<Package>( "update-test-affects-package-manager", Edition("99-99") );
+ USR << pi << endl;
+ USR << repoProvidePackage( pi ) << endl;
- ManagedFile
///////////////////////////////////////////////////////////////////
INT << "===[END]============================================" << endl << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/devel/devel.ma/Tools.h new/libzypp-3.24.0/devel/devel.ma/Tools.h
--- old/libzypp-3.23.2/devel/devel.ma/Tools.h 2007-09-13 18:19:38.000000000 +0200
+++ new/libzypp-3.24.0/devel/devel.ma/Tools.h 2007-09-14 23:14:30.000000000 +0200
@@ -109,56 +109,10 @@
RepoManagerOptions mgropt;
mgropt.repoCachePath = mgrdir_r/"cache";
mgropt.repoRawCachePath = mgrdir_r/"raw_cache";
- mgropt.knownReposPath = mgrdir_r/"repos";
+ mgropt.knownReposPath = mgrdir_r;
return RepoManager( mgropt );
}
///////////////////////////////////////////////////////////////////
-
-inline Repository createSource( const Url & url_r, const std::string & alias_r = std::string() )
-{
- Repository ret;
-#if 0
- Measure x( "createSource: " + url_r.asString() );
- try
- {
- std::string alias( alias_r.empty() ? Date::now().asSeconds() : alias_r );
- try
- {
- ret = SourceFactory().createFrom( url_r, "/", alias );
- }
- catch ( const source::SourceUnknownTypeException & )
- {
- ret = SourceFactory().createFrom( "Plaindir", url_r, "/", alias, "", false, true );
- }
- }
- catch ( const Exception & )
- {
- return Repository::noSource;
- }
- x.start( "parseSource: " + url_r.asString() );
- {
- //zypp::base::LogControl::TmpLineWriter shutUp;
- ret.resolvables();
- }
- x.stop();
- MIL << "Content " << ret << "{" << endl;
- rstats( ret.resolvables() );
- MIL << "}" << endl;
-#endif
- return ret;
-}
-inline Repository createSource( const std::string & url_r, const std::string & alias_r = std::string() )
-{
- try
- {
- return createSource( Url(url_r), alias_r );
- }
- catch ( const Exception & )
- {
- return Repository::noRepository;
- }
-}
-
#endif // Tools_h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/package/libzypp.changes new/libzypp-3.24.0/package/libzypp.changes
--- old/libzypp-3.23.2/package/libzypp.changes 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/package/libzypp.changes 2007-09-14 23:14:31.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Sep 14 22:57:54 CEST 2007 - ma@suse.de
+
+- Enable using patch and delta rpms. (#309124)
+- version 3.24.0
+- revision 7253
+
+-------------------------------------------------------------------
Thu Sep 13 17:59:55 CEST 2007 - ma@suse.de
- On update do not delete unmaintained non-SuSE packages.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/tests/cache/CacheStore_test.cc new/libzypp-3.24.0/tests/cache/CacheStore_test.cc
--- old/libzypp-3.23.2/tests/cache/CacheStore_test.cc 2007-09-13 18:19:40.000000000 +0200
+++ new/libzypp-3.24.0/tests/cache/CacheStore_test.cc 2007-09-14 23:14:38.000000000 +0200
@@ -467,7 +467,8 @@
// 22 packages and 6 patches
BOOST_CHECK_EQUAL( repositoryImpl->resolvables().size(), 42 );
// 19 patch rpms
- BOOST_CHECK_EQUAL( repositoryImpl->patchRpms().size(), 19 );
+ // but only 13 are compatible with x86_64_
+ BOOST_CHECK_EQUAL( repositoryImpl->patchRpms().size(), 13 );
//check_tables_clean(tmpdir);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/VERSION.cmake new/libzypp-3.24.0/VERSION.cmake
--- old/libzypp-3.23.2/VERSION.cmake 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/VERSION.cmake 2007-09-14 23:14:31.000000000 +0200
@@ -45,6 +45,6 @@
#
SET(LIBZYPP_MAJOR "3")
-SET(LIBZYPP_MINOR "23")
-SET(LIBZYPP_COMPATMINOR "23")
-SET(LIBZYPP_PATCH "2")
+SET(LIBZYPP_MINOR "24")
+SET(LIBZYPP_COMPATMINOR "24")
+SET(LIBZYPP_PATCH "0")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/cache/CacheStore.cc new/libzypp-3.24.0/zypp/cache/CacheStore.cc
--- old/libzypp-3.23.2/zypp/cache/CacheStore.cc 2007-09-13 18:19:40.000000000 +0200
+++ new/libzypp-3.24.0/zypp/cache/CacheStore.cc 2007-09-14 23:14:36.000000000 +0200
@@ -122,13 +122,13 @@
count_shared_cmd.reset( new sqlite3_command( con, "select count(id) from resolvables where shared_id=:rid;" ));
insert_patchrpm_cmd.reset( new sqlite3_command (con,
- "insert into patch_packages (repository_id, media_nr, location, checksum, checksum_type, download_size, build_time) "
- "values (:repository_id, :media_nr, :location, :checksum, :checksum_type, :download_size, :build_time);" ));
+ "insert into patch_packages (repository_id, name, version, release, epoch, arch, media_nr, location, checksum, checksum_type, download_size, build_time) "
+ "values (:repository_id, :name, :version, :release, :epoch, :arch, :media_nr, :location, :checksum, :checksum_type, :download_size, :build_time);" ));
insert_deltarpm_cmd.reset( new sqlite3_command (con,
- "insert into delta_packages (repository_id, media_nr, location, checksum, checksum_type, download_size, build_time, "
+ "insert into delta_packages (repository_id, name, version, release, epoch, arch, media_nr, location, checksum, checksum_type, download_size, build_time, "
"baseversion_version, baseversion_release, baseversion_epoch, baseversion_checksum, "
"baseversion_build_time, baseversion_sequence_info) "
- "values (:repository_id, :media_nr, :location, :checksum, :checksum_type, :download_size, :build_time, "
+ "values (:repository_id, :name, :version, :release, :epoch, :arch, :media_nr, :location, :checksum, :checksum_type, :download_size, :build_time, "
":baseversion_version, :baseversion_release, :baseversion_epoch, :baseversion_checksum, "
":baseversion_build_time, :baseversion_sequence_info);" ));
append_patch_baseversion_cmd.reset( new sqlite3_command (con,
@@ -743,12 +743,18 @@
{
RecordId id;
- //! \todo what's this? _pimpl->insert_patchrpm_cmd->bind(":media_nr", ???);
_pimpl->insert_patchrpm_cmd->bind(":repository_id", repository_id);
+
+ _pimpl->insert_patchrpm_cmd->bind(":name", prpm->name);
+ _pimpl->insert_patchrpm_cmd->bind(":version", prpm->edition.version());
+ _pimpl->insert_patchrpm_cmd->bind(":release", prpm->edition.release());
+ _pimpl->insert_patchrpm_cmd->bind(":epoch", (int) prpm->edition.epoch());
+ _pimpl->insert_patchrpm_cmd->bind(":arch", lookupOrAppendType("arch", prpm->arch.asString()));
+
+ _pimpl->insert_patchrpm_cmd->bind(":media_nr", (int) prpm->location.medianr());
_pimpl->insert_patchrpm_cmd->bind(":location", prpm->location.filename().asString());
_pimpl->insert_patchrpm_cmd->bind(":checksum", prpm->location.checksum().checksum());
_pimpl->insert_patchrpm_cmd->bind(":checksum_type", prpm->location.checksum().type());
- //! \todo checksum type
_pimpl->insert_patchrpm_cmd->bind(":download_size", static_castByteCount::SizeType(prpm->location.downloadSize()));
_pimpl->insert_patchrpm_cmd->bind(":build_time", prpm->buildTime.asSeconds());
_pimpl->insert_patchrpm_cmd->executenonquery();
@@ -774,13 +780,19 @@
{
RecordId id;
- //! \todo what's this? _pimpl->insert_deltarpm_cmd->bind(":media_nr", ???);
_pimpl->insert_deltarpm_cmd->bind(":repository_id", repository_id);
+
+ _pimpl->insert_deltarpm_cmd->bind(":name", drpm->name);
+ _pimpl->insert_deltarpm_cmd->bind(":version", drpm->edition.version());
+ _pimpl->insert_deltarpm_cmd->bind(":release", drpm->edition.release());
+ _pimpl->insert_deltarpm_cmd->bind(":epoch", (int) drpm->edition.epoch());
+ _pimpl->insert_deltarpm_cmd->bind(":arch", lookupOrAppendType("arch", drpm->arch.asString()));
+
+ _pimpl->insert_deltarpm_cmd->bind(":media_nr", (int) drpm->location.medianr());
_pimpl->insert_deltarpm_cmd->bind(":location", drpm->location.filename().asString());
_pimpl->insert_deltarpm_cmd->bind(":checksum", drpm->location.checksum().checksum());
_pimpl->insert_deltarpm_cmd->bind(":checksum", drpm->location.checksum().checksum());
_pimpl->insert_deltarpm_cmd->bind(":checksum_type", drpm->location.checksum().type());
- //! \todo checksum type
_pimpl->insert_deltarpm_cmd->bind(":download_size", static_castByteCount::SizeType(drpm->location.downloadSize()));
_pimpl->insert_deltarpm_cmd->bind(":build_time", drpm->buildTime.asSeconds());
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/cache/schema/schema.sql new/libzypp-3.24.0/zypp/cache/schema/schema.sql
--- old/libzypp-3.23.2/zypp/cache/schema/schema.sql 2007-09-13 18:19:40.000000000 +0200
+++ new/libzypp-3.24.0/zypp/cache/schema/schema.sql 2007-09-14 23:14:36.000000000 +0200
@@ -166,6 +166,11 @@
CREATE TABLE delta_packages (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
+ , name TEXT
+ , version TEXT
+ , release TEXT
+ , epoch INTEGER
+ , arch INTEGER REFERENCES types(id)
, media_nr INTEGER
, location TEXT
, checksum TEXT
@@ -185,6 +190,11 @@
CREATE TABLE patch_packages (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
+ , name TEXT
+ , version TEXT
+ , release TEXT
+ , epoch INTEGER
+ , arch INTEGER REFERENCES types(id)
, media_nr INTEGER
, location TEXT
, checksum TEXT
@@ -319,7 +329,7 @@
DELETE FROM file_capabilities WHERE resolvable_id = old.id;
DELETE FROM split_capabilities WHERE resolvable_id = old.id;
DELETE FROM other_capabilities WHERE resolvable_id = old.id;
-
+
DELETE FROM text_attributes WHERE weak_resolvable_id = old.id;
DELETE FROM numeric_attributes WHERE weak_resolvable_id = old.id;
DELETE FROM resolvable_disk_usage WHERE resolvable_id = old.id;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/data/ResolvableData.cc new/libzypp-3.24.0/zypp/data/ResolvableData.cc
--- old/libzypp-3.23.2/zypp/data/ResolvableData.cc 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/zypp/data/ResolvableData.cc 2007-09-14 23:14:32.000000000 +0200
@@ -49,5 +49,12 @@
// << " enhances:" << endl << enhances << endl
}
+
+std::ostream & RpmBase::dumpOn( std::ostream & str ) const
+{
+ str << "Patch/Delta[ " << name << " " << edition << " " << arch << " ]";
+ return str;
+}
+
} // namespace cache
} // namespace zypp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/data/ResolvableData.h new/libzypp-3.24.0/zypp/data/ResolvableData.h
--- old/libzypp-3.23.2/zypp/data/ResolvableData.h 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/zypp/data/ResolvableData.h 2007-09-14 23:14:32.000000000 +0200
@@ -368,18 +368,16 @@
{
// Base <patchrpm>/<deltarpm> element attributes
- Arch attr_arch;
- std::string attr_filename;
- std::string attr_md5sum;
- ByteCount attr_downloadSize;
- Date attr_buildTime;
-
- // Shared RPM data
-
+ std::string name; // target rpm name
+ Edition edition; // target rpm edition
+ Arch arch; // target rpm architecture
OnMediaLocation location;
- Date buildTime;
- Date fileTime;
- ByteCount archiveSize; // ??
+ Date buildTime;
+ Date fileTime;
+ ByteCount archiveSize; // ??
+ protected:
+ /** Overload to realize std::ostream & operator\<\<. */
+ virtual std::ostream & dumpOn( std::ostream & str ) const;
};
DEFINE_PTR_TYPE(PatchRpm);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/parser/yum/PatchFileReader.cc new/libzypp-3.24.0/zypp/parser/yum/PatchFileReader.cc
--- old/libzypp-3.23.2/zypp/parser/yum/PatchFileReader.cc 2007-09-13 18:19:40.000000000 +0200
+++ new/libzypp-3.24.0/zypp/parser/yum/PatchFileReader.cc 2007-09-14 23:14:34.000000000 +0200
@@ -16,6 +16,7 @@
#include "zypp/parser/yum/PatchFileReader.h"
#include "zypp/parser/yum/FileReaderBaseImpl.h"
+#include "zypp/ZConfig.h"
#undef ZYPP_BASE_LOGGER_LOGGROUP
#define ZYPP_BASE_LOGGER_LOGGROUP "parser::yum"
@@ -481,8 +482,16 @@
data::PatchRpm_Ptr tmp;
tmp.swap(_patchrpm);
data::PackageAtom_Ptr patom_ptr = zypp::dynamic_pointer_castdata::PackageAtom(_tmpResObj);
- if (patom_ptr)
+ if (patom_ptr && patom_ptr->arch.compatibleWith( ZConfig::instance().systemArchitecture() ))
+ {
+ // Patch and delta rpms are standalone objects.
+ // We must store the target packages NVRA.
+ // We don't store incompatible archs.
+ tmp->name = patom_ptr->name;
+ tmp->edition = patom_ptr->edition;
+ tmp->arch = patom_ptr->arch;
patom_ptr->patchRpms.insert(tmp);
+ }
toParentTag();
return true;
}
@@ -493,8 +502,16 @@
data::DeltaRpm_Ptr tmp;
tmp.swap(_deltarpm);
data::PackageAtom_Ptr patom_ptr = zypp::dynamic_pointer_castdata::PackageAtom(_tmpResObj);
- if (patom_ptr)
+ if (patom_ptr && patom_ptr->arch.compatibleWith( ZConfig::instance().systemArchitecture() ))
+ {
+ // Patch and delta rpms are standalone objects.
+ // We must store the target packages NVRA.
+ // We don't store incompatible archs.
+ tmp->name = patom_ptr->name;
+ tmp->edition = patom_ptr->edition;
+ tmp->arch = patom_ptr->arch;
patom_ptr->deltaRpms.insert(tmp);
+ }
toParentTag();
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/repo/cached/RepoImpl.cc new/libzypp-3.24.0/zypp/repo/cached/RepoImpl.cc
--- old/libzypp-3.23.2/zypp/repo/cached/RepoImpl.cc 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/zypp/repo/cached/RepoImpl.cc 2007-09-14 23:14:32.000000000 +0200
@@ -187,59 +187,62 @@
con.executenonquery("PRAGMA cache_size=8000;");
con.executenonquery("BEGIN;");
- string pp_query =
- // 0 1 2 3 4 5
- "SELECT id, media_nr, location, checksum, checksum_type, download_size, build_time "
- "FROM patch_packages WHERE repository_id=:repository_id;";
-
- string pp_bv_query =
- "SELECT version, release, epoch "
- "FROM patch_packages_baseversions WHERE patch_package_id = :patch_package_id";
-
- string delta_query =
- // 0 1 2 3 4 5 6 7 8 9 10 11
- "SELECT id, media_nr, location, checksum, checksum_type, download_size, build_time, baseversion_version, baseversion_release, baseversion_epoch, baseversion_checksum, baseversion_checksum_type, baseversion_build_time "
- // 11
- ", baseversion_sequence_info "
- "FROM delta_packages WHERE repository_id=:repository_id;";
-
+ // Refer to the enum when retrieving the data from reader.
+
+ enum pp_query_val { pp_id, pp_name, pp_version, pp_release, pp_epoch, pp_arch, pp_media_nr, pp_location, pp_checksum, pp_checksum_type, pp_download_size, pp_build_time };
+ string pp_query = "SELECT id, name, version, release, epoch, arch, media_nr, location, checksum, checksum_type, download_size, build_time "
+
+ "FROM patch_packages WHERE repository_id=:repository_id;";
+
+ enum pp_bv_query_val { pp_bv_version, pp_bv_release, pp_bv_epoch };
+ string pp_bv_query = "SELECT version, release, epoch "
+
+ "FROM patch_packages_baseversions WHERE patch_package_id = :patch_package_id";
+
+ enum dp_query_val { dp_id, dp_name, dp_version, dp_release, dp_epoch, dp_arch, dp_media_nr, dp_location, dp_checksum, dp_checksum_type, dp_download_size, dp_build_time, dp_baseversion_version, dp_baseversion_release, dp_baseversion_epoch, dp_baseversion_checksum, dp_baseversion_checksum_type, dp_baseversion_build_time, dp_baseversion_sequence_info };
+ string dp_query = "SELECT id, name, version, release, epoch, arch, media_nr, location, checksum, checksum_type, download_size, build_time, baseversion_version, baseversion_release, baseversion_epoch, baseversion_checksum, baseversion_checksum_type, baseversion_build_time, baseversion_sequence_info "
+
+ "FROM delta_packages WHERE repository_id=:repository_id;";
+
{
// bind the master repo id to the query
- sqlite3_command deltas_cmd( con, delta_query);
+ sqlite3_command deltas_cmd( con, dp_query);
deltas_cmd.bind(":repository_id", _options.repository_id);
sqlite3_reader reader = deltas_cmd.executereader();
while ( reader.read() )
{
- zypp::OnMediaLocation on_media( reader.getstring(2), reader.getint(1) );
-
- string checksum_string(reader.getstring(3));
- CheckSum checksum(reader.getstring(4), reader.getstring(3));
+ zypp::OnMediaLocation on_media( reader.getstring(dp_location), reader.getint(dp_media_nr) );
+
+ CheckSum checksum(reader.getstring(dp_checksum_type), reader.getstring(dp_checksum));
if ( checksum.empty() )
{
ERR << "Wrong checksum for delta, skipping..." << endl;
continue;
}
on_media.setChecksum(checksum);
- on_media.setDownloadSize(reader.getint(5));
-
+ on_media.setDownloadSize(reader.getint(dp_download_size));
+
packagedelta::DeltaRpm::BaseVersion baseversion;
- baseversion.setEdition( Edition(reader.getstring(7), reader.getstring(8), reader.getstring(9) ) );
-
- checksum = CheckSum(reader.getstring(11), reader.getstring(10));
+ baseversion.setEdition( Edition(reader.getstring(dp_baseversion_version), reader.getstring(dp_baseversion_release), reader.getstring(dp_baseversion_epoch) ) );
+
+ checksum = CheckSum(reader.getstring(dp_baseversion_checksum_type), reader.getstring(dp_baseversion_checksum));
if ( checksum.empty() )
{
ERR << "Wrong checksum for delta, skipping..." << endl;
continue;
}
baseversion.setChecksum(checksum);
- baseversion.setBuildtime(reader.getint(12));
- baseversion.setSequenceinfo(reader.getstring(13));
-
+ baseversion.setBuildtime(reader.getint(dp_baseversion_build_time));
+ baseversion.setSequenceinfo(reader.getstring(dp_baseversion_sequence_info));
+
zypp::packagedelta::DeltaRpm delta;
+ delta.setName ( reader.getstring(dp_name) );
+ delta.setEdition( Edition( reader.getstring(dp_version), reader.getstring(dp_release), reader.getint(dp_epoch) ) );
+ delta.setArch ( _type_cache.archFor( reader.getint(dp_arch) ) );
delta.setLocation( on_media );
delta.setBaseversion( baseversion );
- delta.setBuildtime(reader.getint(6));
-
+ delta.setBuildtime(reader.getint(dp_build_time));
+
_deltaRpms.push_back(delta);
}
reader.close();
@@ -252,40 +255,45 @@
sqlite3_command pp_bv_cmd( con, pp_bv_query);
pp_cmd.bind(":repository_id", _options.repository_id);
sqlite3_reader reader = pp_cmd.executereader();
-
+
while ( reader.read() )
{
//MIL << "Addining patch rpm " << endl;
- long long patch_package_id = reader.getint64(0);
-
- zypp::OnMediaLocation on_media( reader.getstring(2), reader.getint(1) );
-
- CheckSum checksum(reader.getstring(4), reader.getstring(3));
+ long long patch_package_id = reader.getint64(pp_id);
+
+ zypp::OnMediaLocation on_media( reader.getstring(pp_location), reader.getint(pp_media_nr) );
+
+ CheckSum checksum(reader.getstring(pp_checksum_type), reader.getstring(pp_checksum));
if ( checksum.empty() )
{
ERR << "Wrong checksum for delta, skipping..." << endl;
continue;
}
on_media.setChecksum(checksum);
- on_media.setDownloadSize(reader.getint(5));
-
+ on_media.setDownloadSize(reader.getint(pp_download_size));
+
zypp::packagedelta::PatchRpm patch;
+ patch.setName ( reader.getstring(pp_name) );
+ patch.setEdition( Edition( reader.getstring(pp_version), reader.getstring(pp_release), reader.getint(pp_epoch) ) );
+ patch.setArch ( _type_cache.archFor( reader.getint(pp_arch) ) );
patch.setLocation( on_media );
- patch.setBuildtime(reader.getint(6));
-
+ patch.setBuildtime(reader.getint(pp_build_time));
+
pp_bv_cmd.bind( ":patch_package_id", patch_package_id );
-
+
sqlite3_reader bv_reader = pp_bv_cmd.executereader();
while (bv_reader.read())
{
//MIL << " * Adding baseversion " << endl;
- packagedelta::PatchRpm::BaseVersion baseversion = packagedelta::PatchRpm::BaseVersion( bv_reader.getstring(0) , bv_reader.getstring(1), bv_reader.getint(2) );
+ packagedelta::PatchRpm::BaseVersion baseversion = packagedelta::PatchRpm::BaseVersion( bv_reader.getstring(pp_bv_version) ,
+ bv_reader.getstring(pp_bv_release),
+ bv_reader.getint(pp_bv_epoch) );
patch.addBaseversion(baseversion);
}
-
+
bv_reader.close();
-
- _patchRpms.push_back(patch);
+
+ _patchRpms.push_back(patch);
}
reader.close();
MIL << _patchRpms.size() << " patch rpms read." << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/repo/DeltaCandidates.cc new/libzypp-3.24.0/zypp/repo/DeltaCandidates.cc
--- old/libzypp-3.23.2/zypp/repo/DeltaCandidates.cc 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/zypp/repo/DeltaCandidates.cc 2007-09-14 23:14:32.000000000 +0200
@@ -27,18 +27,18 @@
{
public:
-
+
Impl( const std::list<Repository> & repos )
: repos(repos)
{
-
+
}
friend Impl * rwcowClone<Impl>( const Impl * rhs );
/** clone for RWCOW_pointer */
Impl * clone() const
{ return new Impl( *this ); }
-
+
std::list<Repository> repos;
};
///////////////////////////////////////////////////////////////////
@@ -59,7 +59,7 @@
std::list<PatchRpm> DeltaCandidates::patchRpms(const Package::constPtr & package ) const
{
std::list<PatchRpm> candidates;
-
+
// query all repos
for ( std::list<Repository>::const_iterator it = _pimpl->repos.begin();
it != _pimpl->repos.end();
@@ -71,17 +71,22 @@
dit != candidates_in_repo.end();
++dit )
{
- PatchRpm delta(*dit);
- candidates.push_back(delta);
+ if ( ! package
+ || ( package->name() == dit->name()
+ && package->edition() == dit->edition()
+ && package->arch() == dit->arch() ) )
+ {
+ candidates.push_back( *dit );
+ }
}
}
return candidates;
}
-
+
std::list<DeltaRpm> DeltaCandidates::deltaRpms(const Package::constPtr & package) const
{
std::list<DeltaRpm> candidates;
-
+
// query all repos
for ( std::list<Repository>::const_iterator it = _pimpl->repos.begin();
it != _pimpl->repos.end();
@@ -93,13 +98,18 @@
dit != candidates_in_repo.end();
++dit )
{
- DeltaRpm delta(*dit);
- candidates.push_back(delta);
+ if ( ! package
+ || ( package->name() == dit->name()
+ && package->edition() == dit->edition()
+ && package->arch() == dit->arch() ) )
+ {
+ candidates.push_back( *dit );
+ }
}
}
return candidates;
}
-
+
std::ostream & operator<<( std::ostream & str, const DeltaCandidates & obj )
{
return str << *obj._pimpl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/repo/DeltaCandidates.h new/libzypp-3.24.0/zypp/repo/DeltaCandidates.h
--- old/libzypp-3.23.2/zypp/repo/DeltaCandidates.h 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/zypp/repo/DeltaCandidates.h 2007-09-14 23:14:31.000000000 +0200
@@ -42,7 +42,7 @@
class Impl;
public:
- /**
+ /**
* \short Creates a candidate calculator
* \param repos Set of repositories providing patch and delta packages
* \param installed_callback Will be used to ask if a package is installed or not
@@ -51,11 +51,9 @@
/** Dtor */
~DeltaCandidates();
-
+
std::listpackagedelta::PatchRpm patchRpms(const Package::constPtr & package) const;
std::listpackagedelta::DeltaRpm deltaRpms(const Package::constPtr & package) const;
-
- public:
private:
/** Pointer to implementation */
@@ -66,6 +64,19 @@
/** \relates DeltaCandidates Stream output */
std::ostream & operator<<( std::ostream & str, const DeltaCandidates & obj );
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates DeltaCandidates Convenient construction. */
+ template<class RepositoryIter>
+ inline DeltaCandidates makeDeltaCandidates( RepositoryIter begin_r, RepositoryIter end_r )
+ { return DeltaCandidates( std::list<Repository>( begin_r, end_r ) ); }
+
+ /** \relates DeltaCandidates Convenient construction. */
+ template<class RepositoryContainer>
+ inline DeltaCandidates makeDeltaCandidates( const RepositoryContainer & cont_r )
+ { return makeDeltaCandidates( cont_r.begin(), cont_r.end() ); }
+
+
/////////////////////////////////////////////////////////////////
} // namespace repo
///////////////////////////////////////////////////////////////////
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/repo/PackageDelta.cc new/libzypp-3.24.0/zypp/repo/PackageDelta.cc
--- old/libzypp-3.23.2/zypp/repo/PackageDelta.cc 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/zypp/repo/PackageDelta.cc 2007-09-14 23:14:32.000000000 +0200
@@ -28,7 +28,8 @@
std::ostream & operator<<( std::ostream & str, const PatchRpm & obj )
{
str
- << "PatchRpm(" << obj.location()
+ << "PatchRpm[" << obj.name() << "-" << obj.edition() << "." << obj.arch()
+ << "](" << obj.location()
<< '|' << obj.buildtime()
<< '|';
return dumpRangeLine( str, obj.baseversions().begin(), obj.baseversions().end() )
@@ -38,7 +39,8 @@
std::ostream & operator<<( std::ostream & str, const DeltaRpm & obj )
{
return str
- << "DeltaRpm(" << obj.location()
+ << "DeltaRpm[" << obj.name() << "-" << obj.edition() << "." << obj.arch()
+ << "](" << obj.location()
<< '|' << obj.buildtime()
<< '|' << obj.baseversion().edition()
<< ',' << obj.baseversion().buildtime()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.23.2/zypp/repo/PackageDelta.h new/libzypp-3.24.0/zypp/repo/PackageDelta.h
--- old/libzypp-3.23.2/zypp/repo/PackageDelta.h 2007-09-13 18:19:39.000000000 +0200
+++ new/libzypp-3.24.0/zypp/repo/PackageDelta.h 2007-09-14 23:14:32.000000000 +0200
@@ -17,6 +17,7 @@
#include "zypp/OnMediaLocation.h"
#include "zypp/Edition.h"
+#include "zypp/Arch.h"
#include "zypp/Date.h"
///////////////////////////////////////////////////////////////////
@@ -28,6 +29,7 @@
///////////////////////////////////////////////////////////////////
+ /** \todo cheap copy! (switch to RWCOW) */
class PatchRpm
{
public:
@@ -39,17 +41,29 @@
{}
public:
+ /** \name Target package ident. */
+ //@{
+ const std::string & name() const { return _name; }
+ const Edition & edition() const { return _edition; }
+ const Arch & arch() const { return _arch; }
+ //@}
const OnMediaLocation & location() const { return _location; }
const BaseVersions & baseversions() const { return _baseversions; }
const Date & buildtime() const { return _buildtime;}
public:
+ PatchRpm & setName( const std::string & val_r ) { _name = val_r; return *this; }
+ PatchRpm & setEdition( const Edition & val_r ) { _edition = val_r; return *this; }
+ PatchRpm & setArch( const Arch & val_r ) { _arch = val_r; return *this; }
PatchRpm & setLocation( const OnMediaLocation & val_r ) { _location = val_r; return *this; }
PatchRpm & setBaseversions( const BaseVersions & val_r ){ _baseversions = val_r; return *this; }
PatchRpm & addBaseversion( const BaseVersion & val_r ) { _baseversions.push_back( val_r ); return *this; }
PatchRpm & setBuildtime( const Date & val_r ) { _buildtime = val_r; return *this; }
private:
+ std::string _name;
+ Edition _edition;
+ Arch _arch;
OnMediaLocation _location;
BaseVersions _baseversions;
Date _buildtime;
@@ -60,6 +74,7 @@
///////////////////////////////////////////////////////////////////
+ /** \todo cheap copy! (switch to RWCOW) */
class DeltaRpm
{
public:
@@ -95,16 +110,28 @@
{}
public:
+ /** \name Target package ident. */
+ //@{
+ const std::string & name() const { return _name; }
+ const Edition & edition() const { return _edition; }
+ const Arch & arch() const { return _arch; }
+ //@}
const OnMediaLocation & location() const { return _location; }
const BaseVersion & baseversion() const { return _baseversion; }
const Date & buildtime() const { return _buildtime;}
public:
+ DeltaRpm & setName( const std::string & val_r ) { _name = val_r; return *this; }
+ DeltaRpm & setEdition( const Edition & val_r ) { _edition = val_r; return *this; }
+ DeltaRpm & setArch( const Arch & val_r ) { _arch = val_r; return *this; }
DeltaRpm & setLocation( const OnMediaLocation & val_r ) { _location = val_r; return *this; }
DeltaRpm & setBaseversion( const BaseVersion & val_r ) { _baseversion = val_r; return *this; }
DeltaRpm & setBuildtime( const Date & val_r ) { _buildtime = val_r; return *this; }
private:
+ std::string _name;
+ Edition _edition;
+ Arch _arch;
OnMediaLocation _location;
BaseVersion _baseversion;
Date _buildtime;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org