mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
* pacman: Fix removing locally installed packages
Without this, using `absent` state for a locally installed package (for example from AUR, or from a package that was dropped from repositories) would return that package is already removed, despite remaining installed
* Undo unwanted whitespace removal
* Add changelog fragment
* Update changelogs/fragments/4464-pacman-fix-local-remove.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add test.
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3c515dd221)
Co-authored-by: Martin <spleefer90@gmail.com>
This commit is contained in:
@@ -610,8 +610,9 @@ class Pacman(object):
|
||||
# Expand group members
|
||||
for group_member in self.inventory["available_groups"][pkg]:
|
||||
pkg_list.append(Package(name=group_member, source=group_member))
|
||||
elif pkg in self.inventory["available_pkgs"]:
|
||||
# just a regular pkg
|
||||
elif pkg in self.inventory["available_pkgs"] or pkg in self.inventory["installed_pkgs"]:
|
||||
# Just a regular pkg, either available in the repositories,
|
||||
# or locally installed, which we need to know for absent state
|
||||
pkg_list.append(Package(name=pkg, source=pkg))
|
||||
else:
|
||||
# Last resort, call out to pacman to extract the info,
|
||||
|
||||
Reference in New Issue
Block a user