Repository navigation
Description
Description
On CentOS 7 or 8 machines, we configure 'excludes=kernel*' in /etc/yum.conf or /etc/dnf/dnf.conf to avoid unintentional upgrade of kernel related RPMs.
With such configuration when calling pkg.list_repo_pkgs with disableexcludes=main fails to list kernel RPMs.
E.g.
salt-call pkg.list_repo_pkgs kernel-modules-extra # fails correctly because kernel* is excluded
salt-call pkg.list_repo_pkgs kernel-modules-extra disableexcludes=main # fails incorrectly (due to unused repo_arg)
salt-call pkg.list_repo_pkgs kernel-modules-extra -- --disableexcludes=main # works however 2nd form above is used by pkg.installed and pkg.install state and execution methods, so those fail to install kernel-modules-extra until the bug is fixed.
Line 863 in 8df03c1
| repo_arg = _get_options(fromrepo=fromrepo, **kwargs) |
Setup
# Start a CentOS:8.1.1911 container
curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
./bootstrap-salt.sh -P -M git v3002.1
echo 'excludes=kernel*' >> /etc/dnf/dnf.conf
Steps to Reproduce the behavior
salt-call pkg.list_repo_pkgs kernel-modules-extra disableexcludes=main
Expected behavior
The command under steps to reproduce should list kernel-modules-extra RPMs, however it returns empty.
Due to this issue, pkg.install and pkg.installed also fail when trying to get this RPM installed with disableexcludes=main option
Versions Report
salt --versions-report
``` Salt Version: Salt: 3002.1Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: 2.6.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.2
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 1.0.0
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: 3.9.9
pygit2: Not Installed
Python: 3.6.8 (default, Nov 21 2019, 19:31:34)
python-gnupg: Not Installed
PyYAML: 5.3.1
PyZMQ: 20.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.3
System Versions:
dist: centos 8 Core
locale: UTF-8
machine: x86_64
release: 4.18.0-147.el8.x86_64
system: Linux
version: CentOS Linux 8 Core
</details>
Activity