diff options
Diffstat (limited to 'src/backend/purgeenv.py')
-rw-r--r-- | src/backend/purgeenv.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/purgeenv.py b/src/backend/purgeenv.py index d9b12c9..b2c96f7 100644 --- a/src/backend/purgeenv.py +++ b/src/backend/purgeenv.py @@ -48,6 +48,14 @@ def cache(): shutil.rmtree(os.path.join( sisyphus.getfs.portageCacheDir, files)) + if os.path.isdir(sisyphus.getfs.portageDistDir): + for files in os.listdir(sisyphus.getfs.portageDistDir): + if os.path.isfile(os.path.join(sisyphus.getfs.portageDistDir, files)): + os.remove(os.path.join(sisyphus.getfs.portageDistDir, files)) + else: + shutil.rmtree(os.path.join( + sisyphus.getfs.portageDistDir, files)) + def metadata(): if os.path.isdir(sisyphus.getfs.portageMetadataDir): |