community.general
community.general copied to clipboard
pkgng: fix error-handling when upgrading all
SUMMARY
The return code of the command was being ignored when upgrading all packages.
Fixes #5363
ISSUE TYPE
- Bugfix Pull Request
COMPONENT NAME
pkgng
cc @JoergFiedler @MacLemon @bcoca @dch @jasperla @mekanix @opoplawski @overhacked @tuxillo click here for bot help
Docs Build 📝
Thank you for contribution!✨
This PR has been merged and your docs changes will be incorporated when they are next published.
@felixfontein still trying to make it work, I tried testing on a FreeBSD vm locally but I am screwing something up, so I will have to rely on the CI for every single test run
hey @russoz ! I'm the original bug reporter, thank you so much for making a PR against my report!
I just now saw your comment here above that you had trouble testing and had to rely on the CI so I wanted to help test. I took the diff of your patch and applied it to my local copy of the pkgng.py module and ran it against my original server.
My test is kind of run "in a vacuum" because I certainly don't know the details and context of the implementation, but at least I can confirm that your changeset does fix the issue in my original report! ✅ -vvv output now correctly shows that the task reports red/failed with an Insufficient Privileges message in the msg, stderr, and stderr_lines output portions. Cheers! ✌️
I continued to try and run the tests inside a VM, but I am having some "funny" situations where vagrant/virtualbox half of the time do not mount the current directory on the vm. I have not figured out what is going on.
Anyway, glad to hear that your test has worked. As a matter of fact, I added a test case to ensure that ;)
Backport to stable-4: 💚 backport PR created
✅ Backport PR branch: patchback/backports/stable-4/baa8bd52ab7fd08b3b0b05880a43d8b45e6c7dc6/pr-5369
Backported as https://github.com/ansible-collections/community.general/pull/5410
🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.
Backport to stable-5: 💚 backport PR created
✅ Backport PR branch: patchback/backports/stable-5/baa8bd52ab7fd08b3b0b05880a43d8b45e6c7dc6/pr-5369
Backported as https://github.com/ansible-collections/community.general/pull/5411
🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.
@russoz thanks for testing this! @alexanderdegre thanks for testing this!