diff --git a/pisi/api.py b/pisi/api.py index 15b91e8f..1142c9a5 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -423,6 +423,15 @@ def get_takeback_plan(operation): beinstalled, beremoved, configs = pisi.operations.history.plan_takeback(operation) return beinstalled, beremoved +@locked +def delete_cache(): + """ + Deletes cached packages, cached archives, build dirs + """ + pisi.util.clean_dir(ctx.config.cached_packages_dir()) + pisi.util.clean_dir(ctx.config.archives_dir()) + pisi.util.clean_dir(ctx.config.tmp_dir()) + @locked def snapshot(): """ @@ -690,12 +699,6 @@ def __update_repo(repo, force=False): else: raise pisi.Error(_('No repository named %s found.') % repo) -@locked -def delete_cache(): - pisi.util.clean_dir(ctx.config.cached_packages_dir()) - pisi.util.clean_dir(ctx.config.archives_dir()) - pisi.util.clean_dir(ctx.config.tmp_dir()) - # FIXME: rebuild_db is only here for filesdb and it really is ugly. we should not need any rebuild. @locked def rebuild_db(files=False):