1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Pacman: Fix name of URL packages (#4959)

* Strip downloading... of unseen URLs

* Added changelog fragment

* Added integration tests for reason and reason_for

Inspired by the integration tests for url packages

* Revert "Added integration tests for reason and reason_for"

This reverts commit f60d92f0d7.

Accidentally commited to the wrong branch.
This commit is contained in:
Minei3oat 2022-07-21 13:58:03 +02:00 committed by GitHub
parent c57204f9a9
commit 788cfb624a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- pacman - fixed name resolution of URL packages (https://github.com/ansible-collections/community.general/pull/4959).

View file

@ -613,8 +613,9 @@ class Pacman(object):
stderr=stderr,
rc=rc,
)
# With Pacman v6.0.1 - libalpm v13.0.1, --upgrade outputs "loading packages..." on stdout. strip that
stdout = stdout.replace("loading packages...\n", "")
# With Pacman v6.0.1 - libalpm v13.0.1, --upgrade outputs " filename_without_extension downloading..." if the URL is unseen.
# In all cases, pacman outputs "loading packages..." on stdout. strip both
stdout = stdout.splitlines()[-1]
is_URL = True
pkg_name = stdout.strip()
pkg_list.append(Package(name=pkg_name, source=pkg, source_is_URL=is_URL))