diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-06 19:32:48 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-06 19:32:48 +0100 |
commit | 2d86cd9ddc5d9442e4a8e8fb50d72480a8293a4a (patch) | |
tree | 59cecf3bc71168b7a32b449aac436b0474147525 /src/backend/cache.py | |
parent | 1ec0c210ca2cbdb729a416e37a50d4b9a6a0dfa0 (diff) |
minor fixes, make the gui client work with the new backend
Diffstat (limited to 'src/backend/cache.py')
-rw-r--r-- | src/backend/cache.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/cache.py b/src/backend/cache.py new file mode 100644 index 0000000..aaa0a32 --- /dev/null +++ b/src/backend/cache.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 + +import os +import shutil + +portageCacheDir = '/var/cache/packages' + +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)) + else: + shutil.rmtree(os.path.join(portageCacheDir, files)) |