[arch] fix: not updating the view (GUI) status correctly after uninstalling a package whose PKGBUILD file was edited

This commit is contained in:
Vinicius Moreira
2021-12-09 13:37:09 -03:00
parent d4446e1c81
commit 34d5234977
2 changed files with 9 additions and 1 deletions

View File

@@ -1457,7 +1457,14 @@ class ArchManager(SoftwareManager):
names={pkg.name},
disk_loader=disk_loader) # to be able to return all uninstalled packages
if success:
return TransactionResult(success=True, installed=None, removed=[*removed.values()] if removed else [])
removed_list = []
if pkg.name in removed:
pkg.installed = False
removed_list.append(pkg)
removed_list.extend((inst for name, inst in removed.items() if name != pkg.name))
return TransactionResult(success=not pkg.installed, installed=None, removed=removed_list)
else:
return TransactionResult.fail()