summaryrefslogtreecommitdiff
path: root/src/frontend/cli
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-12 22:27:04 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-12 22:27:04 +0000
commitdef1fa5301790963e7e7ae214a2df1c692f97005 (patch)
tree47be1c85884facf0bbed4d22a8a9e2fee904eb71 /src/frontend/cli
parente07a1e4959c34d70631b693f76af8163702c306a (diff)
bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=132 && add manual cache cleaning optionv5.2301.0
Diffstat (limited to 'src/frontend/cli')
-rw-r--r--src/frontend/cli/README.md16
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py8
2 files changed, 24 insertions, 0 deletions
diff --git a/src/frontend/cli/README.md b/src/frontend/cli/README.md
index c831afc..edaf9cd 100644
--- a/src/frontend/cli/README.md
+++ b/src/frontend/cli/README.md
@@ -21,6 +21,7 @@ $ sisyphus [OPTIONS] COMMAND [ARGS]...
**Commands**:
* `autoremove`: Uninstall packages that are no longer needed.
+* `autoclean` : Clean the binary package cache...
* `branch`: Pull the selected branch of the Portage tree,...
* `install`: Install binary and/or ebuild(source)...
* `mirror`: List/Set the active binhost (binary repository) mirror.
@@ -49,6 +50,21 @@ $ sisyphus autoremove [OPTIONS]
* `--help`: Show this message and exit.
+
+## `sisyphus autoclean`
+
+Clean the binary package cache and the source tarball cache
+
+**Usage**:
+
+```console
+$ sisyphus autoclean [OPTIONS]
+```
+
+**Options**:
+
+* `--help`: Show this message and exit.
+
## `sisyphus branch`
Pull the selected branch of the Portage tree, Redcore overlay and Portage configs.
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
index 93963dd..ff918b8 100755
--- a/src/frontend/cli/sisyphus-cli.py
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -174,6 +174,14 @@ def autoremove():
"""
sisyphus.autoremove.start()
+@app.command("autoclean")
+def autoclean():
+ """Clean the binary package cache and the source tarball cache"""
+ if sisyphus.checkenv.root():
+ sisyphus.purgeenv.cache()
+ else:
+ sys.exit("\nYou need root permissions to do this, exiting!\n")
+
@app.command("update")
def update():
"""Update the Portage tree, the Redcore Overlay(s), Portage configs and Sisyphus's package database."""