From 400087bdb94968b67a5d74455531e9d374d03bad Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Fri, 10 Feb 2006 14:39:29 +0000 Subject: [PATCH] enable storage always --- zypp/target/TargetImpl.cc | 6 ------ zypp/target/TargetImpl.h | 4 ---- zypp/target/store/PersistentStorage.cc | 2 +- zypp/target/store/PersistentStorage.h | 2 +- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc index 62e4bce..022a686 100644 --- a/zypp/target/TargetImpl.cc +++ b/zypp/target/TargetImpl.cc @@ -73,7 +73,6 @@ namespace zypp MIL << "Targets closed" << endl; } -#ifndef STORAGE_DISABLED bool TargetImpl::isStorageEnabled() const { return _storage.isInitialized(); @@ -85,7 +84,6 @@ namespace zypp _storage.init(root_r); } -#endif const ResStore & TargetImpl::resolvables() { @@ -99,7 +97,6 @@ namespace zypp _store.insert(*it); } -#ifndef STORAGE_DISABLED if ( isStorageEnabled() ) { // resolvables stored in the zypp storage database @@ -115,7 +112,6 @@ namespace zypp { WAR << "storage target not enabled" << std::endl; } -#endif return _store; } @@ -274,7 +270,6 @@ namespace zypp it->status().setStatus( ResStatus::uninstalled ); } } -#ifndef STORAGE_DISABLED else // other resolvables { if ( isStorageEnabled() ) @@ -317,7 +312,6 @@ namespace zypp WAR << "storage target disabled" << std::endl; } } - #endif } return remaining; } diff --git a/zypp/target/TargetImpl.h b/zypp/target/TargetImpl.h index 5988f24..edb0351 100644 --- a/zypp/target/TargetImpl.h +++ b/zypp/target/TargetImpl.h @@ -26,8 +26,6 @@ #include "zypp/target/store/PersistentStorage.h" #include "zypp/solver/detail/Types.h" -#define STORAGE_DISABLED - /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// @@ -77,11 +75,9 @@ namespace zypp media > 0 means limit commits to this media */ void commit( ResPool pool_r, unsigned int medianr, PoolItemList & errors_r, PoolItemList & remaining_r, PoolItemList & srcremaining_r ); -#ifndef STORAGE_DISABLED /** enables the storage target */ bool isStorageEnabled() const; void enableStorage(const Pathname &root_r); -#endif /** Commit ordered changes return uncommitted ones (due to error) */ diff --git a/zypp/target/store/PersistentStorage.cc b/zypp/target/store/PersistentStorage.cc index 6cd792d..7748be1 100644 --- a/zypp/target/store/PersistentStorage.cc +++ b/zypp/target/store/PersistentStorage.cc @@ -58,7 +58,7 @@ void PersistentStorage::init(const Pathname &root) d->backend = new XMLFilesBackend(root); } -bool PersistentStorage::isInitalized() +bool PersistentStorage::isInitialized() const { return ! (d->backend == 0L); } diff --git a/zypp/target/store/PersistentStorage.h b/zypp/target/store/PersistentStorage.h index 228bbc3..6d87e58 100644 --- a/zypp/target/store/PersistentStorage.h +++ b/zypp/target/store/PersistentStorage.h @@ -69,7 +69,7 @@ namespace zypp /** * true is backend was already initialized */ - bool isInitalized(); + bool isInitialized() const; /** * Stores a Resolvable in the active backend. -- 2.7.4