From: Duncan Mac-Vicar P Date: Fri, 10 Feb 2006 14:39:29 +0000 (+0000) Subject: enable storage always X-Git-Tag: 6.6.0~5009 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=400087bdb94968b67a5d74455531e9d374d03bad;p=platform%2Fupstream%2Flibzypp.git enable storage always --- diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc index 62e4bce5e..022a686e2 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 5988f2401..edb035105 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 6cd792d86..7748be151 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 228bbc310..6d87e585e 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.