mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 02:54:16 +02:00
fix: arch -> not cleaning cached disk data when there is a conflict
This commit is contained in:
@@ -195,7 +195,17 @@ class ArchManager(SoftwareManager):
|
|||||||
return self.install(pkg=pkg, root_password=root_password, watcher=watcher, skip_optdeps=True)
|
return self.install(pkg=pkg, root_password=root_password, watcher=watcher, skip_optdeps=True)
|
||||||
|
|
||||||
def _uninstall(self, pkg_name: str, root_password: str, handler: ProcessHandler) -> bool:
|
def _uninstall(self, pkg_name: str, root_password: str, handler: ProcessHandler) -> bool:
|
||||||
return handler.handle(SystemProcess(new_root_subprocess(['pacman', '-R', pkg_name, '--noconfirm'], root_password)))
|
res = handler.handle(SystemProcess(new_root_subprocess(['pacman', '-R', pkg_name, '--noconfirm'], root_password)))
|
||||||
|
|
||||||
|
if res:
|
||||||
|
cached_paths = [ArchPackage.disk_cache_path(pkg_name, 'aur'), ArchPackage.disk_cache_path(pkg_name, 'mirror')]
|
||||||
|
|
||||||
|
for path in cached_paths:
|
||||||
|
if os.path.exists(path):
|
||||||
|
shutil.rmtree(path)
|
||||||
|
break
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
def uninstall(self, pkg: ArchPackage, root_password: str, watcher: ProcessWatcher) -> bool:
|
def uninstall(self, pkg: ArchPackage, root_password: str, watcher: ProcessWatcher) -> bool:
|
||||||
handler = ProcessHandler(watcher)
|
handler = ProcessHandler(watcher)
|
||||||
|
|||||||
@@ -692,7 +692,7 @@ class ManageWindow(QWidget):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self._handle_console_option(True)
|
self._handle_console_option(True)
|
||||||
self.progress_controll_enabled = len(to_update) == 1
|
self.progress_controll_enabled = len(to_update) == 1
|
||||||
self._begin_action(self.i18n['manage_window.status.upgrading'])
|
self._begin_action(self.i18n['manage_window.status.upgrading'])
|
||||||
self.thread_update.apps_to_update = to_update
|
self.thread_update.apps_to_update = to_update
|
||||||
self.thread_update.root_password = pwd
|
self.thread_update.root_password = pwd
|
||||||
|
|||||||
Reference in New Issue
Block a user