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
@@ -1,6 +1,6 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
from typing import List, Optional, Tuple
|
||||
from linux_updater.models import PackageUpdate, CommandResult, RebootStatus
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ class PackageManager(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def check_updates(self) -> List[PackageUpdate]:
|
||||
def check_updates(
|
||||
self,
|
||||
exclude: Optional[List[str]] = None,
|
||||
security_only: bool = False,
|
||||
) -> List[PackageUpdate]:
|
||||
"""Lists available package updates."""
|
||||
pass
|
||||
|
||||
@@ -25,6 +29,8 @@ class PackageManager(ABC):
|
||||
def apply_updates(
|
||||
self,
|
||||
packages: Optional[List[str]] = None,
|
||||
exclude: Optional[List[str]] = None,
|
||||
security_only: bool = False,
|
||||
dry_run: bool = False,
|
||||
non_interactive: bool = False,
|
||||
) -> CommandResult:
|
||||
@@ -60,3 +66,11 @@ class PackageManager(ABC):
|
||||
def get_lock_files(self) -> List[Path]:
|
||||
"""Returns paths of lockfiles used by this manager."""
|
||||
pass
|
||||
|
||||
def verify_db_consistency(self) -> "Tuple[bool, str]":
|
||||
"""Checks whether the package manager database has broken/interrupted transactions."""
|
||||
return True, "Package database is consistent."
|
||||
|
||||
def repair_db(self) -> CommandResult:
|
||||
"""Attempts automated repair of interrupted/broken package transactions."""
|
||||
return CommandResult(0, "No repair needed.", "", True)
|
||||
Reference in new issue
Block a user