-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Handle pkg_info(1) error message "Can't find" #6785
Handle pkg_info(1) error message "Can't find" #6785
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
ace72aa
to
eb779ac
Compare
This comment was marked as outdated.
This comment was marked as outdated.
eb779ac
to
8ebe266
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Could you please add a changelog fragment? Thanks.
1f92877
to
7ff7826
Compare
This comment was marked as outdated.
This comment was marked as outdated.
7ff7826
to
f0232e7
Compare
f0232e7
to
8286fd1
Compare
Looks good to me, as far as I can tell. Will merge by the end of this week if nobody objects. |
9e5df47
to
8286fd1
Compare
Hello @sizeofvoid, Thanks for a solid bug report and patch, this looks good to me :). The only thing I am thinking about is that in most cases in the module we use fairly strict regexes for matching output as in Do you think it would be a good idea to go for a stricter regex match for this as well? I personally have preferred to be as strict as possible and have things fail rather than mistakenly work as things evolve, if that makes sense. |
Thanks @eest, I like the idea. I'll chance the current pull-request. |
8286fd1
to
d3c0cf8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
d3c0cf8
to
0eef9c1
Compare
This looks in line with what I had in mind, thanks! One more thing: since we are using the |
Co-authored-by: Felix Fontein <felix@fontein.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for your work on this @sizeofvoid! Also thanks to @felixfontein for the ever present support work for things like writing changelog fragments etc :) LGTM |
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #6892 🤖 @patchback |
* Handle pkg_info(1) error message "Can't find" * Update plugins/modules/openbsd_pkg.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 704a301)
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #6893 🤖 @patchback |
* Handle pkg_info(1) error message "Can't find" * Update plugins/modules/openbsd_pkg.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 704a301)
@sizeofvoid thanks for your contribution! |
…ge "Can't find" (#6892) Handle pkg_info(1) error message "Can't find" (#6785) * Handle pkg_info(1) error message "Can't find" * Update plugins/modules/openbsd_pkg.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 704a301) Co-authored-by: Rafael Sadowski <rafael@sizeofvoid.org>
…ge "Can't find" (#6893) Handle pkg_info(1) error message "Can't find" (#6785) * Handle pkg_info(1) error message "Can't find" * Update plugins/modules/openbsd_pkg.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 704a301) Co-authored-by: Rafael Sadowski <rafael@sizeofvoid.org>
* Handle pkg_info(1) error message "Can't find" * Update plugins/modules/openbsd_pkg.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
SUMMARY
OpenBSD pkg_info(1) behavior change.
As we can see pkg_info behaves different between OpenBSD -current (>7.3) and OpenBSD <= 7.3.
It prints "Can't find inst:PKGNAME" if the package is not present. This has to be handled in the module otherwise we see
Example pkg_info(1) call on OpenBSD 7.3 -stable
Example pkg_info(1) call on OpenBSD -current
ISSUE TYPE
COMPONENT NAME
openbsd_pkg