[zypp-commit] r5646 - in /trunk/libzypp: ./ zypp/ zypp2/ zypp2/cache/ zypp2/cache/sqlite_detail/ zypp2/repository/cached/
Author: dmacvicar
Date: Wed May 30 15:20:25 2007
New Revision: 5646
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5646&view=rev
Log:
- add some ResObject doc
- install a ResolvableQuery inside the cached Package Impl. to
get the attributes on the fly.
- remove some old cache classes I hate.
- Fix a bug in filechecker found by the testsuite.
- Make the Digest callbacks return FALSE by default.
Removed:
trunk/libzypp/zypp2/cache/CachedResolvableDataProvider.cc
trunk/libzypp/zypp2/cache/CachedResolvableDataProvider.h
trunk/libzypp/zypp2/cache/CapabilityQuery.cc
trunk/libzypp/zypp2/cache/CapabilityQuery.h
trunk/libzypp/zypp2/cache/QueryFactory.cc
trunk/libzypp/zypp2/cache/QueryFactory.h
trunk/libzypp/zypp2/cache/sqlite_detail/
Modified:
trunk/libzypp/CMakeLists.txt
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/Digest.cc
trunk/libzypp/zypp/FileChecker.cc
trunk/libzypp/zypp/ResObject.h
trunk/libzypp/zypp2/CMakeLists.txt
trunk/libzypp/zypp2/cache/CacheStore.cpp
trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.h
trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.cc
trunk/libzypp/zypp2/repository/cached/CachedRepositoryPackageImpl.h
trunk/libzypp/zypp2/repository/cached/CachedSourcePackageImpl.cc
Modified: trunk/libzypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/CMakeLists.txt?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/CMakeLists.txt (original)
+++ trunk/libzypp/CMakeLists.txt Wed May 30 15:20:25 2007
@@ -183,7 +183,8 @@
# INCLUDES #
####################################################################
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+SET (CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} SYSTEM )
####################################################################
# OTHERS #
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Wed May 30 15:20:25 2007
@@ -2,7 +2,7 @@
# INCLUDES #
####################################################################
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
####################################################################
# SOURCES #
Modified: trunk/libzypp/zypp/Digest.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Digest.cc?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/zypp/Digest.cc (original)
+++ trunk/libzypp/zypp/Digest.cc Wed May 30 15:20:25 2007
@@ -27,13 +27,13 @@
namespace zypp {
bool DigestReport::askUserToAcceptNoDigest( const zypp::Pathname &file )
- { return true; }
+ { return false; }
bool DigestReport::askUserToAccepUnknownDigest( const Pathname &file, const std::string &name )
- { return true; }
+ { return false; }
bool DigestReport::askUserToAcceptWrongDigest( const Pathname &file, const std::string &requested, const std::string &found )
- { return true; }
+ { return false; }
// private data
Modified: trunk/libzypp/zypp/FileChecker.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/FileChecker.cc?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/zypp/FileChecker.cc (original)
+++ trunk/libzypp/zypp/FileChecker.cc Wed May 30 15:20:25 2007
@@ -47,7 +47,7 @@
}
else
{
- if ( (real_checksum == _checksum) )
+ if ( (real_checksum != _checksum) )
{
if ( report->askUserToAcceptWrongDigest( file, _checksum.checksum(), real_checksum.checksum() ) )
{
Modified: trunk/libzypp/zypp/ResObject.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.h?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResObject.h (original)
+++ trunk/libzypp/zypp/ResObject.h Wed May 30 15:20:25 2007
@@ -33,7 +33,10 @@
//
// CLASS NAME : ResObject
//
- /** Interface base for resolvable objects (common data).
+ /**
+ * Interface base for resolvable objects (common data).
+ * That is, all data not needed for solving, but common
+ * across al Resolvable kinds.
*/
class ResObject : public Resolvable
{
@@ -45,22 +48,46 @@
typedef TraitsType::constPtrType constPtr;
public:
- /** */
+ /**
+ * \short Short text describing the resolvable.
+ * This attribute is usually displayed in columns.
+ */
Text summary() const;
- /** */
+ /**
+ * \short Long text describing the resolvable.
+ */
Text description() const;
- /** */
+ /**
+ * \short Installation Notification
+ *
+ * This text can be used to tell the user some notes
+ * When he selects the resovable for installation.
+ */
Text insnotify() const;
- /** */
+ /**
+ * \short De-Installation Notification
+ *
+ * This text can be used to tell the user some notes
+ * When he selects the resovable for deinstall.
+ */
Text delnotify() const;
- /** */
+ /**
+ * \short License or agreement to accept
+ *
+ * Agreement, warning or license the user should
+ * accept before installing the resolvable.
+ */
Text licenseToConfirm() const;
- /** */
+ /**
+ * \short Vendor
+ *
+ * For Example "Novell Inc."
+ */
Vendor vendor() const;
/** Installed size. */
@@ -69,30 +96,43 @@
/** Size of the rpm package. */
ByteCount archivesize() const;
- /** Backlink to the source providing this. */
+ /**
+ * Source providing this resolvable
+ */
Source_Ref source() const;
- /** Number of the source media that provides the data
- * required for installation. Zero, if no media access
- * is required.
+ /**
+ * Media number where the resolvable is located
+ * 0 if no media access is required.
*/
unsigned sourceMediaNr() const;
- /** Use sourceMediaNr */
+ /**
+ * \deprecated Use sourceMediaNr
+ */
ZYPP_DEPRECATED unsigned mediaId() const
{ return sourceMediaNr(); }
- /** */
+ /**
+ * \TODO FIXME what is this?
+ */
bool installOnly() const;
- /** */
+ /**
+ * \short build time of the resolvable
+ */
Date buildtime() const;
- /** Time of installation, or \c 0 */
+ /**
+ * \short Installation time
+ * 0 if the resolvable is not installed.
+ */
Date installtime() const;
- /** */
- ZmdId zmdid () const;
+ /**
+ * \deprecated No replacement.
+ */
+ ZYPP_DEPRECATED ZmdId zmdid () const;
protected:
/** Ctor */
Modified: trunk/libzypp/zypp2/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/zypp2/CMakeLists.txt (original)
+++ trunk/libzypp/zypp2/CMakeLists.txt Wed May 30 15:20:25 2007
@@ -38,12 +38,7 @@
${CMAKE_BINARY_DIR}/zypp2/schema.h
cache/CacheInitializer.cpp
cache/CacheTypes.cc
-# cache/QueryFactory.cc
-# cache/CapabilityQuery.cc
cache/ResolvableQuery.cc
-# cache/CachedResolvableDataProvider.cc
-# cache/sqlite_detail/CapabilityQueryImpl.cc
-# cache/sqlite_detail/QueryFactoryImpl.cc
cache/CacheStore.cpp
cache/CacheFSCK.cc
cache/Utils.cpp
@@ -56,10 +51,7 @@
cache/CacheStore.h
cache/CacheFSCK.h
cache/ResolvableQuery.h
-# cache/CapablityQuery.h
-# cache/QueryFactory.h
cache/Utils.h
-# cache/CachedResolvableDataProvider.h
)
#INSTALL( FILES
Modified: trunk/libzypp/zypp2/cache/CacheStore.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/CacheStore.cpp?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/zypp2/cache/CacheStore.cpp (original)
+++ trunk/libzypp/zypp2/cache/CacheStore.cpp Wed May 30 15:20:25 2007
@@ -184,6 +184,14 @@
_pimpl->con.executenonquery("COMMIT;");
}
+void CacheStore::consumeResObject( const data::RecordId &rid, data::ResObject_Ptr res )
+{
+ appendTranslatedStringAttribute( rid, "ResObject", "description", res->description );
+ appendTranslatedStringAttribute( rid, "ResObject", "summary", res->summary );
+ appendNumericAttribute( rid, "ResObject", "installedSize", res->installedSize );
+ appendNumericAttribute( rid, "ResObject", "buildTime", res->buildTime );
+}
+
void CacheStore::consumePackage( const RecordId &repository_id, data::Package_Ptr package )
{
RecordId pkgid = appendResolvable( repository_id, ResTraits<Package>::kind, NVRA( package->name, package->edition, package->arch ), package->deps );
@@ -298,15 +306,6 @@
// be needed
}
-
-void CacheStore::consumeResObject( const data::RecordId &rid, data::ResObject_Ptr res )
-{
- appendTranslatedStringAttribute( rid, "ResObject", "description", res->description );
- appendTranslatedStringAttribute( rid, "ResObject", "summary", res->summary );
- appendNumericAttribute( rid, "ResObject", "installedSize", res->installedSize );
- appendNumericAttribute( rid, "ResObject", "buildTime", res->buildTime );
-}
-
RecordId CacheStore::appendResolvable( const RecordId &repository_id,
const Resolvable::Kind &kind,
const NVRA &nvra,
Modified: trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc?rev=5646&r1=5645&r2=5646&view=diff
==============================================================================
--- trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc (original)
+++ trunk/libzypp/zypp2/repository/cached/CachedRepositoryImpl.cc Wed May 30 15:20:25 2007
@@ -12,12 +12,9 @@
#include "zypp/base/Logger.h"
#include "zypp/base/Measure.h"
-
-#include "zypp2/cache/QueryFactory.h"
-#include "zypp2/cache/CapabilityQuery.h"
-#include "zypp2/cache/sqlite_detail/CacheSqlite.h"
+#include "zypp/capability/Capabilities.h"
+#include "zypp2/cache/ResolvableQuery.h"
#include "zypp2/cache/CacheCommon.h"
-#include "zypp2/cache/sqlite_detail/QueryFactoryImpl.h"
#include "zypp/detail/ResImplTraits.h"
#include "zypp/CapFactory.h"
@@ -43,7 +40,8 @@
CachedRepositoryImpl::CachedRepositoryImpl( const Pathname &dbdir, const data::RecordId &repository_id )
: _dbdir(dbdir),
_type_cache(dbdir),
- _repository_id(repository_id)
+ _repository_id(repository_id),
+ _rquery(dbdir)
{
}
@@ -96,7 +94,7 @@
for ( map
participants (1)
-
dmacvicar@svn.opensuse.org