feat: release v2.0.0 with tab completion, package filtering, db health checks, flatpak and logrotate
Build and Publish Release / Build Packages and Publish (push) Successful in 27s
Build and Publish Release / Build Packages and Publish (push) Successful in 27s
This commit is contained in:
1 parent
8d4157b42d
commit
8bec4ed932
27 files changed
+1053
-69
No files matched your search
@@ -14,7 +14,7 @@ class RemediationEngine:
|
||||
def can_remediate(self, check: CheckResult) -> bool:
|
||||
if not check.can_remediate:
|
||||
return False
|
||||
return check.remediation_id in {"clean_cache", "remove_stale_lock"}
|
||||
return check.remediation_id in {"clean_cache", "remove_stale_lock", "repair_package_db"}
|
||||
|
||||
def remediate(self, check: CheckResult) -> bool:
|
||||
if not self.can_remediate(check):
|
||||
@@ -24,9 +24,20 @@ class RemediationEngine:
|
||||
return self.clean_cache()
|
||||
elif check.remediation_id == "remove_stale_lock":
|
||||
return self.remove_stale_lock(check.message)
|
||||
elif check.remediation_id == "repair_package_db":
|
||||
return self.repair_package_db()
|
||||
|
||||
return False
|
||||
|
||||
def repair_package_db(self) -> bool:
|
||||
try:
|
||||
res = self.manager.repair_db()
|
||||
if hasattr(res, "success"):
|
||||
return bool(res.success)
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
def clean_cache(self) -> bool:
|
||||
try:
|
||||
res = self.manager.clean_cache()
|
||||
|
||||
Reference in new issue
Block a user