Skip to content
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

Changed package manager detection #59201

merged 13 commits into from
Jan 6, 2021


Copy link

@t0fik t0fik commented Dec 28, 2020

What does this PR do?

Changes detection of which package manager is used yum or dnf.

What issues does this PR fix or reference?

Fixed wrong package manager detection (YUM detected instead DNF) in Centos Stream,
issue manifests after resolving #59161

Previous Behavior

Detection was based on comparing os grain with fixed os name list.

New Behavior

  1. Package manager is searched in directories listed in os.environ['PATH'] or os.defpath, first found is set.
    Priority: dnf, yum
  2. __virtual__ function returns false if DNF nor YUM could be found.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?


@t0fik t0fik requested a review from a team as a code owner December 28, 2020 13:30
@t0fik t0fik requested review from krionbsd and removed request for a team December 28, 2020 13:30
@t0fik t0fik marked this pull request as draft December 29, 2020 20:10
@t0fik t0fik force-pushed the fix_pkgrepo_copr_in_dnf branch 2 times, most recently from 2e5c8c9 to b995639 Compare December 29, 2020 20:54
@t0fik t0fik marked this pull request as ready for review January 2, 2021 18:31
Copy link

krionbsd commented Jan 5, 2021

re-run freebsd122

@dwoz dwoz merged commit 3c28048 into saltstack:master Jan 6, 2021
garethgreenaway pushed a commit to garethgreenaway/salt that referenced this pull request Jan 14, 2021
* Changed package manager detection

* Added os import inside _yum function

* Added changelog

* Added patching __context__ dict

* Added condition for DNF installed on CentOS7

* Added _versionlock_pkg function

* Changed ret variable name

* Added second test install

* Conditional package change check
@sagetherage sagetherage added the Aluminium Release Post Mg and Pre Si label Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Aluminium Release Post Mg and Pre Si
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants