Author: dmacvicar
Date: Mon Apr 30 01:01:54 2007
New Revision: 5461
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5461&view=rev
Log:
r5186@piscolita: duncan | 2007-04-30 00:59:32 +0200
fix uncimplete commit
Added:
trunk/libzypp/zypp2/repository/RepositoryImpl.cc
trunk/libzypp/zypp2/repository/RepositoryImpl.h
Modified:
trunk/ (props changed)
trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc
trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc
trunk/libzypp/devel/devel.dmacvicar/testbed.cc
trunk/libzypp/zypp2/CMakeLists.txt
trunk/libzypp/zypp2/RepositoryInfo.cc
trunk/libzypp/zypp2/RepositoryInfo.h
Modified: trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc?rev=5461&r1=5460&r2=5461&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc (original)
+++ trunk/libzypp/devel/devel.dmacvicar/CachedSource_tp.cc Mon Apr 30 01:01:54 2007
@@ -10,14 +10,14 @@
#include "zypp/Product.h"
#include "zypp/detail/PackageImplIf.h"
#include "zypp/Package.h"
-#include "zypp/SourceFactory.h"
-#include "zypp2/source/cached/CachedSourceImpl.h"
+#include "zypp2/RepositoryFactory.h"
+#include "zypp2/repository/cached/CachedRepositoryImpl.h"
#include "zypp/data/ResolvableData.h"
using namespace std;
using namespace zypp;
-using namespace zypp::source;
-using namespace zypp::source::cached;
+using namespace zypp::repository;
+using namespace zypp::repository::cached;
int main(int argc, char **argv)
@@ -28,12 +28,12 @@
Pathname dbpath = Pathname(getenv("PWD"));
- SourceImpl_Ptr sourceImpl(new CachedSourceImpl(dbpath));
- SourceFactory factory;
- Source_Ref source = factory.createFrom(sourceImpl);
- ResStore dbres = source.resolvables();
+ //RepositoryImpl_Ptr repositoryImpl(new CachedRepositoryImpl(dbpath));
+ //RepositoryFactory factory;
+ //Repository_Ref repository = factory.createFrom(repositoryImpl);
+ //ResStore dbres = repository.resolvables();
- MIL << dbres.size() << " resolvables" << endl;
+ //MIL << dbres.size() << " resolvables" << endl;
}
catch ( const Exception &e )
Modified: trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc?rev=5461&r1=5460&r2=5461&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc (original)
+++ trunk/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc Mon Apr 30 01:01:54 2007
@@ -11,12 +11,15 @@
#include "zypp/Product.h"
#include "zypp/detail/PackageImplIf.h"
#include "zypp/Package.h"
-#include "zypp/SourceFactory.h"
+#include "zypp2/RepositoryFactory.h"
+#include "zypp2/RepositoryInfo.h"
-#include "zypp2/source/cached/CachedSourceImpl.h"
+#include "zypp2/repository/cached/CachedRepositoryImpl.h"
#include "zypp/data/ResolvableData.h"
-#include "RepositoryManager.h"
+#include "zypp2/RepositoryManager.h"
+#include "zypp2/RepositoryInfo.h"
+
using namespace std;
using namespace zypp;
@@ -32,7 +35,12 @@
Pathname dbpath = Pathname(getenv("PWD"));
RepositoryManager manager;
- list<SourceInfo> sources = manager.knownRepositories();
+ RepositoryInfoList repos = manager.knownRepositories();
+
+ for ( RepositoryInfoList::const_iterator it = repos.begin(); it != repos.end(); ++it )
+ {
+ cout << *it << endl;
+ }
}
catch ( const Exception &e )
{
Modified: trunk/libzypp/devel/devel.dmacvicar/testbed.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.dmacvicar/testbed.cc?rev=5461&r1=5460&r2=5461&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.dmacvicar/testbed.cc (original)
+++ trunk/libzypp/devel/devel.dmacvicar/testbed.cc Mon Apr 30 01:01:54 2007
@@ -10,14 +10,14 @@
#include "zypp/Product.h"
#include "zypp/detail/PackageImplIf.h"
#include "zypp/Package.h"
-#include "zypp/SourceFactory.h"
-#include "zypp2/source/cached/CachedSourceImpl.h"
+#include "zypp2/RepositoryFactory.h"
+#include "zypp2/repository/cached/CachedRepositoryImpl.h"
#include "zypp/data/ResolvableData.h"
using namespace std;
using namespace zypp;
-using namespace zypp::source;
-using namespace zypp::source::cached;
+using namespace zypp::repository;
+using namespace zypp::repository::cached;
int main(int argc, char **argv)
@@ -28,12 +28,12 @@
Pathname dbpath = Pathname(getenv("PWD"));
- SourceImpl_Ptr sourceImpl(new CachedSourceImpl(dbpath));
- SourceFactory factory;
- Source_Ref source = factory.createFrom(sourceImpl);
- ResStore dbres = source.resolvables();
+ //RepositoryImpl_Ptr repositoryImpl(new CachedRepositoryImpl(dbpath));
+ //RepositoryFactory factory;
+ //Repository_Ref repository = factory.createFrom(repositoryImpl);
+ //ResStore dbres = repository.resolvables();
- MIL << dbres.size() << " resolvables" << endl;
+ //MIL << dbres.size() << " resolvables" << endl;
}
catch ( const Exception &e )
Modified: trunk/libzypp/zypp2/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev=5461&r1=5460&r2=5461&view=diff
==============================================================================
--- trunk/libzypp/zypp2/CMakeLists.txt (original)
+++ trunk/libzypp/zypp2/CMakeLists.txt Mon Apr 30 01:01:54 2007
@@ -10,19 +10,19 @@
SET( zypp2_SRCS
-# Repository.cc
-# RepositoryInfo.cc
-# RepositoryManager.cc
-# RepositoryFactory.cc
+ Repository.cc
+ RepositoryInfo.cc
+ RepositoryManager.cc
+ RepositoryFactory.cc
Lazy.cc
dummy.cc
)
SET( zypp2_HEADERS
-# Repository.h
-# RepositoryInfo.h
-# RepositoryManager.h
-# RepositoryFactory.h
+ Repository.h
+ RepositoryInfo.h
+ RepositoryManager.h
+ RepositoryFactory.h
CommiterIface.h
Lazy.h
)
@@ -78,25 +78,25 @@
# DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp2/cache/sqlite3x
#)
-#SET( zypp2_repository_SRCS
-# repository/dummy.cc
-# repository/RepositoryImpl.cc
-#)
+SET( zypp2_repository_SRCS
+ repository/dummy.cc
+ repository/RepositoryImpl.cc
+)
-#SET( zypp2_repository_HEADERS
-# repository/dummy.h
-# repository/RepositoryImpl.h
-#)
+SET( zypp2_repository_HEADERS
+ repository/dummy.h
+ repository/RepositoryImpl.h
+)
-#SET( zypp2_repository_cached_SRCS
-# repository/cached/CachedRepositoryImpl.cc
-# repository/cached/CachedRepositoryPackageImpl.cc
-#)
+SET( zypp2_repository_cached_SRCS
+ repository/cached/CachedRepositoryImpl.cc
+ repository/cached/CachedRepositoryPackageImpl.cc
+)
-#SET( zypp2_repository_cached_HEADERS
-# repository/cached/CachedRepositoryImpl.h
-# repository/cached/CachedRepositoryPackageImpl.h
-#)
+SET( zypp2_repository_cached_HEADERS
+ repository/cached/CachedRepositoryImpl.h
+ repository/cached/CachedRepositoryPackageImpl.h
+)
#INSTALL( FILES
# ${zypp2_repository_sqlite-repository_HEADERS}
Modified: trunk/libzypp/zypp2/RepositoryInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepositoryInfo.cc?rev=5461&r1=5460&r2=5461&view=diff
==============================================================================
--- trunk/libzypp/zypp2/RepositoryInfo.cc (original)
+++ trunk/libzypp/zypp2/RepositoryInfo.cc Mon Apr 30 01:01:54 2007
@@ -31,13 +31,11 @@
RepositoryInfo::RepositoryInfo( const Url & url,
const Pathname & path,
const std::string & alias,
- const Pathname & cache_dir,
tribool autorefresh)
: _enabled (true),
_autorefresh(autorefresh),
_base_repository( indeterminate ),
_url(url),
- _cache_dir(cache_dir),
_path(path),
_alias(alias)
{
@@ -86,12 +84,6 @@
return *this;
}
- RepositoryInfo & RepositoryInfo::setCacheDir( const Pathname &p )
- {
- _cache_dir = p;
- return *this;
- }
-
RepositoryInfo & RepositoryInfo::setDescription( const std::string &description )
{
_description = description;
@@ -119,9 +111,6 @@
boost::tribool RepositoryInfo::baseRepository() const
{ return _base_repository; }
- Pathname RepositoryInfo::cacheDir() const
- { return _cache_dir; }
-
Pathname RepositoryInfo::path() const
{ return _path; }
@@ -153,7 +142,6 @@
str << "- enabled : " << enabled() << std::endl;
str << "- autorefresh : " << autorefresh() << std::endl;
str << "- path : " << path() << std::endl;
- str << "- cache_dir : " << cacheDir() << std::endl;
return str;
}
Modified: trunk/libzypp/zypp2/RepositoryInfo.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/RepositoryInfo.h?rev=5461&r1=5460&r2=5461&view=diff
==============================================================================
--- trunk/libzypp/zypp2/RepositoryInfo.h (original)
+++ trunk/libzypp/zypp2/RepositoryInfo.h Mon Apr 30 01:01:54 2007
@@ -28,7 +28,7 @@
RepositoryInfo();
- RepositoryInfo( const Url & url, const Pathname & path, const std::string & alias = "", const Pathname & cache_dir = "", boost::tribool autorefresh = boost::indeterminate );
+ RepositoryInfo( const Url & url, const Pathname & path, const std::string & alias = "", boost::tribool autorefresh = boost::indeterminate );
RepositoryInfo & setEnabled( boost::tribool enabled );
RepositoryInfo & setAutorefresh( boost::tribool autorefresh );
@@ -44,7 +44,6 @@
boost::tribool enabled() const;
boost::tribool autorefresh() const;
boost::tribool baseRepository() const;
- Pathname cacheDir() const;
Pathname path() const;
std::string alias() const;
std::string type() const;
Added: trunk/libzypp/zypp2/repository/RepositoryImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/RepositoryImpl.cc?rev=5461&view=auto
==============================================================================
--- trunk/libzypp/zypp2/repository/RepositoryImpl.cc (added)
+++ trunk/libzypp/zypp2/repository/RepositoryImpl.cc Mon Apr 30 01:01:54 2007
@@ -0,0 +1,23 @@
+
+#include "repository/RepositoryImpl.h"
+
+namespace zypp { namespace repository {
+
+IMPL_PTR_TYPE(RepositoryImpl)
+
+RepositoryImpl::RepositoryImpl()
+{
+
+}
+
+RepositoryImpl::~RepositoryImpl()
+{
+
+}
+
+RepositoryImpl::RepositoryImpl( const null & )
+ : base::ProvideNumericId