api: Generate some information about delete_cache
BUG:FIXED:18310
This commit is contained in:
+6
-1
@@ -529,11 +529,16 @@ def delete_cache():
|
|||||||
"""
|
"""
|
||||||
Deletes cached packages, cached archives, build dirs, db caches
|
Deletes cached packages, cached archives, build dirs, db caches
|
||||||
"""
|
"""
|
||||||
|
ctx.ui.info(_("Cleaning package cache %s...") % ctx.config.cached_packages_dir())
|
||||||
pisi.util.clean_dir(ctx.config.cached_packages_dir())
|
pisi.util.clean_dir(ctx.config.cached_packages_dir())
|
||||||
|
ctx.ui.info(_("Cleaning source archive cache %s...") % ctx.config.archives_dir())
|
||||||
pisi.util.clean_dir(ctx.config.archives_dir())
|
pisi.util.clean_dir(ctx.config.archives_dir())
|
||||||
|
ctx.ui.info(_("Cleaning temporary directory %s...") % ctx.config.tmp_dir())
|
||||||
pisi.util.clean_dir(ctx.config.tmp_dir())
|
pisi.util.clean_dir(ctx.config.tmp_dir())
|
||||||
for cache in filter(lambda x: x.endswith(".cache"), os.listdir(ctx.config.cache_root_dir())):
|
for cache in filter(lambda x: x.endswith(".cache"), os.listdir(ctx.config.cache_root_dir())):
|
||||||
os.unlink(pisi.util.join_path(ctx.config.cache_root_dir(), cache))
|
cache_file = pisi.util.join_path(ctx.config.cache_root_dir(), cache)
|
||||||
|
ctx.ui.info(_("Removing cache file %s") % cache_file)
|
||||||
|
os.unlink(cache_file)
|
||||||
|
|
||||||
@locked
|
@locked
|
||||||
def snapshot():
|
def snapshot():
|
||||||
|
|||||||
Reference in New Issue
Block a user