[improvement][ui] not performing a full table refresh after installing a new package

This commit is contained in:
Vinicius Moreira
2020-06-11 16:51:55 -03:00
parent cc5c89a350
commit a43e640437
11 changed files with 183 additions and 70 deletions

View File

@@ -60,6 +60,17 @@ class UpgradeRequirements:
self.cannot_upgrade = cannot_upgrade
class TransactionResult:
"""
The result of a given operation
"""
def __init__(self, success: bool, installed: List[SoftwarePackage], removed: List[SoftwarePackage]):
self.success = success
self.installed = installed
self.removed = removed
class SoftwareManager(ABC):
"""
@@ -169,12 +180,13 @@ class SoftwareManager(ABC):
pass
@abstractmethod
def install(self, pkg: SoftwarePackage, root_password: str, watcher: ProcessWatcher) -> bool:
def install(self, pkg: SoftwarePackage, root_password: str, disk_loader: DiskCacheLoader, watcher: ProcessWatcher) -> TransactionResult:
"""
:param pkg:
:param root_password: the root user password (if required)
:param disk_loader
:param watcher:
:return: if the installation succeeded
:return:
"""
pass