- delete the cache if the repository is removed using the api
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 19 Jun 2007 14:17:16 +0000 (14:17 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 19 Jun 2007 14:17:16 +0000 (14:17 +0000)
zypp/RepoManager.cc

index 71ca998de86fb1936c14e42c73301d349091b7fc..5d6b94efd2c9d66478a84b570eae16e80fbbf934 100644 (file)
@@ -704,7 +704,12 @@ namespace zypp
               (*fit).dumpRepoOn(file);
           }
           
-          
+          cache::CacheStore store(_pimpl->options.repoCachePath);
+    
+          if ( store.isCached( todelete.alias() ) ) {
+            MIL << "repository was cached. cleaning cache" << endl;
+            store.cleanRepository(todelete.alias());
+          }
           
           return;
         }