aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sos_tests.py
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2022-06-21 14:43:30 -0400
committerJake Hunsaker <jhunsake@redhat.com>2022-06-28 17:08:52 -0400
commitdea4a481ea25e446272b8220f866aaa8ede1dcb8 (patch)
tree1d615a636d54ec21f50735de9d09b78ea343367b /tests/sos_tests.py
parent8c0f54c5c2b9f6b8315a8330e00c7e8b612e3d5f (diff)
downloadsos-dea4a481ea25e446272b8220f866aaa8ede1dcb8.tar.gz
[PackageManager] Make pkg_by_name() more predictable
As highlighted in #1817, `pkg_by_name()` could provide unpredictable results, when using wildcards. As such, limited this method to only returning package info for exact package name matches. In turn, change `Plugin.is_installed()` to leverage `PackageManager.all_pkgs_by_name()` which does explicitly support wildcards and returns information on _all_ matching packages, not just the last one found. In so doing, clean up the `PackageManager` design to use a new `packages` property for these lookups, and update the former usage of `all_pkgs()` accordingly. Similarly, signal `get_pkg_list()` should be private (in any sense that a python method can be) by renaming to `_get_pkg_list()` and update the single Plugin (`etcd`) referencing this method. Closes: #1817 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/sos_tests.py')
0 files changed, 0 insertions, 0 deletions