Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules/xbps: fix error message #4438

Merged
merged 1 commit into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/4438-fix-error-message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- xbps - fix error message that is reported when installing packages fails (https://github.com/ansible-collections/community.general/pull/4438).
4 changes: 3 additions & 1 deletion plugins/modules/packaging/os/xbps.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ def install_packages(module, xbps_path, state, packages):
module.params['upgrade_xbps'] = False
install_packages(module, xbps_path, state, packages)
elif rc != 0 and not (state == 'latest' and rc == 17):
module.fail_json(msg="failed to install %s" % (package))
module.fail_json(msg="failed to install %s packages(s)"
% (len(toInstall)),
packages=toInstall)

module.exit_json(changed=True, msg="installed %s package(s)"
% (len(toInstall)),
Expand Down