mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 22:24:14 +02:00
[fix][arch] upgrading progress when conflicting files are detected
This commit is contained in:
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
### Fixes
|
### Fixes
|
||||||
- Arch
|
- Arch
|
||||||
- 'clean cache' operation was not working in some scenarios
|
- 'clean cache' operation was not working in some scenarios
|
||||||
|
- upgrading progress when conflicting files are detected
|
||||||
|
|
||||||
- upgrade: crashing for scenarios when there are packages that cannot upgrade to be displayed on the summary window
|
- upgrade: crashing for scenarios when there are packages that cannot upgrade to be displayed on the summary window
|
||||||
- settings: crashing when an empty Qt style is defined [#104](https://github.com/vinifmor/bauh/issues/104)
|
- settings: crashing when an empty Qt style is defined [#104](https://github.com/vinifmor/bauh/issues/104)
|
||||||
|
|||||||
@@ -710,9 +710,10 @@ class ArchManager(SoftwareManager):
|
|||||||
|
|
||||||
return files
|
return files
|
||||||
|
|
||||||
def _upgrade_repo_pkgs(self, pkgs: List[str], handler: ProcessHandler, root_password: str, overwrite_files: bool = False) -> bool:
|
def _upgrade_repo_pkgs(self, pkgs: List[str], handler: ProcessHandler, root_password: str, overwrite_files: bool = False,
|
||||||
|
status_handler: TransactionStatusHandler = None) -> bool:
|
||||||
try:
|
try:
|
||||||
output_handler = TransactionStatusHandler(handler.watcher, self.i18n, len(pkgs), self.logger)
|
output_handler = TransactionStatusHandler(handler.watcher, self.i18n, len(pkgs), self.logger) if not status_handler else status_handler
|
||||||
output_handler.start()
|
output_handler.start()
|
||||||
success, upgrade_output = handler.handle_simple(pacman.upgrade_several(pkgnames=pkgs,
|
success, upgrade_output = handler.handle_simple(pacman.upgrade_several(pkgnames=pkgs,
|
||||||
root_password=root_password,
|
root_password=root_password,
|
||||||
@@ -737,7 +738,11 @@ class ArchManager(SoftwareManager):
|
|||||||
confirmation_label=self.i18n['arch.upgrade.conflicting_files.stop'],
|
confirmation_label=self.i18n['arch.upgrade.conflicting_files.stop'],
|
||||||
components=files):
|
components=files):
|
||||||
|
|
||||||
return self._upgrade_repo_pkgs(pkgs=pkgs, handler=handler, root_password=root_password, overwrite_files=True)
|
return self._upgrade_repo_pkgs(pkgs=pkgs,
|
||||||
|
handler=handler,
|
||||||
|
root_password=root_password,
|
||||||
|
overwrite_files=True,
|
||||||
|
status_handler=output_handler)
|
||||||
else:
|
else:
|
||||||
handler.watcher.print("Aborted by the user")
|
handler.watcher.print("Aborted by the user")
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user