Compare commits

...

4 commits

Author SHA1 Message Date
Adam Miller
d42434e673
Merge 1228e58b6c into 719f7dfebf 2023-11-23 16:21:09 +00:00
softwarefactory-project-zuul[bot]
719f7dfebf
Merge pull request #510 from saito-hideki/issue/509
[CI] Replace Fedora 38 with 39 for devel branch container test

SUMMARY
Replace Fedora 38 container test with 39 for devel branch.

Fixed /#509

ISSUE TYPE

CI test Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None
2023-11-23 15:56:55 +00:00
Hideki Saito
5cae7aa946 Replace Fedora 38 with 39 for devel branch container test 2023-11-22 17:09:41 +09:00
Adam Miller
1228e58b6c Honor rpm aliases with whatprovides
Fixes #494

When using an rpm-ostree based system, the rhel_rpm_ostree module needs
to honor rpm aliases. Using whatprovides in the query honors that.

Fix error output formatting for rhel_rpm_ostree

Signed-off-by: Adam Miller <admiller@redhat.com>
2023-10-05 16:31:54 -05:00
3 changed files with 8 additions and 5 deletions

View file

@ -51,8 +51,8 @@ stages:
parameters:
testFormat: devel/linux/{0}/1
targets:
- name: Fedora 38
test: fedora38
- name: Fedora 39
test: fedora39
- name: Ubuntu 20.04
test: ubuntu2004
- name: Ubuntu 22.04

View file

@ -0,0 +1,3 @@
---
trivial:
- "Replace Fedora 38 with 39 for container test(https://github.com/ansible-collections/ansible.posix/issues/509)."

View file

@ -77,7 +77,7 @@ from ansible.module_utils._text import to_text
def locally_installed(module, pkgname):
(rc, out, err) = module.run_command('{0} -q {1}'.format(module.get_bin_path("rpm"), pkgname).split())
(rc, _, _) = module.run_command('{0} -q --whatprovides {1}'.format(module.get_bin_path("rpm"), pkgname).split())
return (rc == 0)
@ -97,9 +97,9 @@ def rpm_ostree_transaction(module):
module.exit_json(msg="No changes made.")
else:
if module.params['state'] in ['present', 'installed', 'latest']:
module.fail_json(msg="The following packages are absent in the currently booted rpm-ostree commit: %s" ' '.join(pkgs))
module.fail_json(msg="The following packages are absent in the currently booted rpm-ostree commit: {}".format(' '.join(pkgs)))
else:
module.fail_json(msg="The following packages are present in the currently booted rpm-ostree commit: %s" ' '.join(pkgs))
module.fail_json(msg="The following packages are present in the currently booted rpm-ostree commit: {}".format(' '.join(pkgs)))
def main():