From 3d12d67a7069643c86f10c14ad7994b651f6c697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Mon, 13 Jun 2011 06:27:21 +0000 Subject: [PATCH] api: Generate some information about delete_cache BUG:FIXED:18310 --- pisi/api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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():