dont depend enabled on is initialized
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 15 Feb 2006 16:43:49 +0000 (16:43 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 15 Feb 2006 16:43:49 +0000 (16:43 +0000)
zypp/target/TargetImpl.cc
zypp/target/TargetImpl.h

index b10f923..7721787 100644 (file)
@@ -58,6 +58,7 @@ namespace zypp
     : _root(root_r)
     {
       _rpm.initDatabase(_root);
+      _storage_enabled = false;
       MIL << "Initialized target on " << _root << endl;
     }
 
@@ -74,14 +75,14 @@ namespace zypp
 
     bool TargetImpl::isStorageEnabled() const
     {
-      return _storage.isInitialized();
+      return _storage_enabled;
     }
 
     
     void TargetImpl::enableStorage(const Pathname &root_r)
     {
-      
       _storage.init(root_r);
+      _storage_enabled = true;
     }
   
     const ResStore & TargetImpl::resolvables()
index a5e4e29..bd90b2b 100644 (file)
@@ -117,6 +117,7 @@ namespace zypp
       rpm::RpmDb _rpm;
 #ifndef STORAGE_DISABLED
       zypp::storage::PersistentStorage _storage;
+      bool _storage_enabled;
 #endif
     private:
       /** Null implementation */