- 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 71ca998..5d6b94e 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;
         }