summaryrefslogtreecommitdiff
path: root/src/backend/cache.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
commited88746cd33c0f861e9c45bf05bf9e44d86089ba (patch)
treee6656f3d54bd738383d048c744d330dca2c15e4c /src/backend/cache.py
parent2d86cd9ddc5d9442e4a8e8fb50d72480a8293a4a (diff)
filesystem module : gather all the folder and file paths used by sisyphus under one module, and expose them to other modules from there
Diffstat (limited to 'src/backend/cache.py')
-rw-r--r--src/backend/cache.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/cache.py b/src/backend/cache.py
index aaa0a32..b040323 100644
--- a/src/backend/cache.py
+++ b/src/backend/cache.py
@@ -2,13 +2,12 @@
import os
import shutil
-
-portageCacheDir = '/var/cache/packages'
+import sisyphus.filesystem
def clean():
- 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))
+ if os.path.isdir(sisyphus.filesystem.portageCacheDir):
+ for files in os.listdir(sisyphus.filesystem.portageCacheDir):
+ if os.path.isfile(os.path.join(sisyphus.filesystem.portageCacheDir, files)):
+ os.remove(os.path.join(sisyphus.filesystem.portageCacheDir, files))
else:
- shutil.rmtree(os.path.join(portageCacheDir, files))
+ shutil.rmtree(os.path.join(sisyphus.filesystem.portageCacheDir, files))