diff --git a/changelog/62032.fixed b/changelog/62032.fixed new file mode 100644 index 00000000000..ceb3cc89b95 --- /dev/null +++ b/changelog/62032.fixed @@ -0,0 +1 @@ +Fix attr=all handling in pkg.list_pkgs() (yum/zypper). diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index 3f855d255fb..c613d658660 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -735,7 +735,7 @@ def list_pkgs(versions_as_list=False, **kwargs): return {} attr = kwargs.get("attr") - if attr is not None: + if attr is not None and attr != "all": attr = salt.utils.args.split_input(attr) contextkey = "pkg.list_pkgs" diff --git a/salt/modules/zypperpkg.py b/salt/modules/zypperpkg.py index c5215100856..77f1e323676 100644 --- a/salt/modules/zypperpkg.py +++ b/salt/modules/zypperpkg.py @@ -914,7 +914,7 @@ def list_pkgs(versions_as_list=False, root=None, includes=None, **kwargs): return {} attr = kwargs.get("attr") - if attr is not None: + if attr is not None and attr != "all": attr = salt.utils.args.split_input(attr) includes = includes if includes else []