zypp: remove cache data while initializing zypp
authorZhang Qiang <qiang.z.zhang@intel.com>
Fri, 23 Sep 2011 09:50:33 +0000 (17:50 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Fri, 23 Sep 2011 09:54:05 +0000 (17:54 +0800)
This is a cache management issue in zypp, and we just clean up all the
cache data before initializing zypp.

plugins/backend/zypppkgmgr.py

index 48c4c9b87bd9eb508c33ef9c86a8266708dd5270..ba61d66a31d67e1eed96cd44adc145acb57471f6 100644 (file)
@@ -341,6 +341,8 @@ class Zypp(BackendPlugin):
 
         """ Clean up repo metadata """
         shutil.rmtree(self.creator.cachedir + "/etc", ignore_errors = True)
+        shutil.rmtree(self.creator.cachedir + "/solv", ignore_errors = True)
+        shutil.rmtree(self.creator.cachedir + "/raw", ignore_errors = True)
 
         zypp.KeyRing.setDefaultAccept( zypp.KeyRing.ACCEPT_UNSIGNED_FILE
                                      | zypp.KeyRing.ACCEPT_VERIFICATION_FAILED