add pamac-cache-clean and save cache options

This commit is contained in:
2017-10-15 17:04:01 -03:00
parent a605886d80
commit 082f63603a
17 changed files with 246 additions and 15 deletions

View File

@@ -427,12 +427,12 @@ namespace Pamac {
});
}
public void clean_cache (uint keep_nb, bool only_uninstalled, GLib.BusName sender) {
public void clean_cache (uint64 keep_nb, bool only_uninstalled, GLib.BusName sender) {
check_authorization.begin (sender, (obj, res) => {
bool authorized = check_authorization.end (res);
if (authorized) {
string[] commands = {"paccache", "-rq"};
commands += "-k%u".printf (keep_nb);
string[] commands = {"paccache", "--nocolor", "-rq"};
commands += "-k%llu".printf (keep_nb);
if (only_uninstalled) {
commands += "-u";
}