* implement a command called delete-cache
This commit is contained in:
@@ -641,3 +641,8 @@ def build_until(pspecfile, state, authInfo=None):
|
||||
return
|
||||
|
||||
__buildState_buildpackages(pb, last)
|
||||
|
||||
def delete_cache():
|
||||
util.clean_dir(ctx.config.packages_dir())
|
||||
util.clean_dir(ctx.config.archives_dir())
|
||||
util.clean_dir(ctx.config.tmp_dir())
|
||||
|
||||
@@ -214,6 +214,19 @@ class Clean(Command):
|
||||
pisi.util.clean_locks()
|
||||
self.finalize()
|
||||
|
||||
class DeleteCache(Command):
|
||||
"""Clean stale locks."""
|
||||
|
||||
__metaclass__ = autocommand
|
||||
|
||||
def __init__(self):
|
||||
super(DeleteCache, self).__init__()
|
||||
|
||||
name = ("delete-cache", None)
|
||||
|
||||
def run(self):
|
||||
self.init(database=False)
|
||||
pisi.api.delete_cache()
|
||||
|
||||
class Graph(Command):
|
||||
"""Graph package relations.
|
||||
|
||||
Reference in New Issue
Block a user