Skip to content

Conversation

@t0fik
Copy link
Contributor

@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?

No

@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 force-pushed the fix_pkgrepo_copr_in_dnf branch from b995639 to 5ff1f6d Compare December 29, 2020 22:19
@t0fik t0fik force-pushed the fix_pkgrepo_copr_in_dnf branch from c68a7eb to d3288f6 Compare December 30, 2020 11:39
@t0fik t0fik force-pushed the fix_pkgrepo_copr_in_dnf branch from 5bc2f45 to 02dbe45 Compare December 30, 2020 22:31
@t0fik t0fik marked this pull request as ready for review January 2, 2021 18:31
@krionbsd
Copy link
Contributor

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

Labels

Aluminium Release Post Mg and Pre Si

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants