summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/libsisyphus.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py
index e64bd11..8993af0 100644
--- a/src/backend/libsisyphus.py
+++ b/src/backend/libsisyphus.py
@@ -181,9 +181,18 @@ def syncPortageCfg():
os.chdir(portageConfigDir)
subprocess.call(['git', 'pull', '--quiet'])
+def cleanCacheDir():
+ if os.path.isdir(portageCacheDir):
+ for files in os.listdir(portageCacheDir):
+ if os.path.isfile(os.path.join(portageCacheDir, files)):
+ os.remove(os.path.join(portageCacheDir, files))
+ else:
+ shutil.rmtree(os.path.join(portageCacheDir, files))
+
@animation.wait('syncing remote database')
def startUpdate():
checkRoot()
+ cleanCacheDir()
syncPortageTree()
syncPortageCfg()
syncRemoteDatabase()