mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[aur] initial implementation to determine the best update order
This commit is contained in:
@@ -12,6 +12,7 @@ from bauh.api.abstract.disk import DiskCacheLoader
|
||||
from bauh.api.abstract.handler import ProcessWatcher
|
||||
from bauh.api.abstract.model import SoftwarePackage, PackageUpdate, PackageHistory, PackageSuggestion, PackageAction
|
||||
from bauh.api.abstract.view import FormComponent, ViewComponent
|
||||
from build.lib.bauh.api.abstract.controller import SoftwareManager
|
||||
|
||||
|
||||
class SearchResult:
|
||||
@@ -82,6 +83,14 @@ class SoftwareManager(ABC):
|
||||
if pkg.supports_disk_cache() and os.path.exists(pkg.get_disk_cache_path()):
|
||||
shutil.rmtree(pkg.get_disk_cache_path())
|
||||
|
||||
def sort_update_order(self, pkgs: List[SoftwarePackage]) -> List[SoftwarePackage]:
|
||||
"""
|
||||
sorts the best order to perform the update of some packages
|
||||
:param pkgs:
|
||||
:return:
|
||||
"""
|
||||
return pkgs
|
||||
|
||||
@abstractmethod
|
||||
def update(self, pkg: SoftwarePackage, root_password: str, watcher: ProcessWatcher) -> bool:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user