diff --git a/pisi/api.py b/pisi/api.py index 326e8955..ac675632 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -529,11 +529,16 @@ def delete_cache(): """ 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()) + ctx.ui.info(_("Cleaning source archive cache %s...") % 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()) 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 def snapshot():