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
@@ -340,6 +340,37 @@ class HealthChecker:
|
||||
)
|
||||
return results
|
||||
|
||||
def check_package_db(self) -> List[CheckResult]:
|
||||
results: List[CheckResult] = []
|
||||
try:
|
||||
res = self.manager.verify_db_consistency()
|
||||
if isinstance(res, (tuple, list)) and len(res) == 2:
|
||||
is_ok, msg = res
|
||||
else:
|
||||
is_ok, msg = True, "Package database is consistent."
|
||||
except Exception as e:
|
||||
is_ok, msg = False, f"Package database check failed: {e}"
|
||||
|
||||
if is_ok:
|
||||
results.append(
|
||||
CheckResult(
|
||||
name="package_db",
|
||||
status=CheckStatus.PASS,
|
||||
message=msg,
|
||||
)
|
||||
)
|
||||
else:
|
||||
results.append(
|
||||
CheckResult(
|
||||
name="package_db",
|
||||
status=CheckStatus.FAIL,
|
||||
message=msg,
|
||||
can_remediate=True,
|
||||
remediation_id="repair_package_db",
|
||||
)
|
||||
)
|
||||
return results
|
||||
|
||||
def run_all_checks(self) -> PreflightReport:
|
||||
all_results: List[CheckResult] = []
|
||||
all_results.extend(self.check_disk_space())
|
||||
@@ -347,6 +378,7 @@ class HealthChecker:
|
||||
all_results.extend(self.check_memory_and_oom())
|
||||
all_results.extend(self.check_power())
|
||||
all_results.extend(self.check_pending_reboot())
|
||||
all_results.extend(self.check_package_db())
|
||||
|
||||
has_failure = any(r.status == CheckStatus.FAIL for r in all_results)
|
||||
return PreflightReport(passed=not has_failure, results=all_results)
|
||||
Reference in new issue
Block a user