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

[PR #3976/a675afcb backport][stable-4] fix alternatives parsing when they are part of a group #4021

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jan 10, 2022

This is a backport of PR #3976 as merged into main (a675afc).

SUMMARY

Fixes 'alternatives --display' output parsing when an alternative is part of a group.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

alternatives

ADDITIONAL INFORMATION

When an alternative is a part of a family (a group with master and slave links), an additional piece of information is present in 'alternatives --display' output , such as:

java - status is auto.
 link currently points to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64/jre/bin/java
/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-3.el8_5.x86_64/bin/java - family java-11-openjdk.x86_64 priority 1
 slave alt-java: /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-3.el8_5.x86_64/bin/alt-java
...
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64/jre/bin/java - family java-1.8.0-openjdk.x86_64 priority 1800312
 slave alt-java: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64/jre/bin/alt-java
...
Current `best' version is /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64/jre/bin/java.

Without this fix, ansible never find an existing alternative, and always installs a new one before activating it, breaking the group at the same time.

* fix alternatives parsing when they are part of a group

* add changelog fragment

Co-authored-by: Guillaume Rousse <guillaume.rousse@renater.fr>
(cherry picked from commit a675afc)
@ansibullbot
Copy link
Collaborator

cc @mulby
click here for bot help

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) system labels Jan 10, 2022
@felixfontein felixfontein merged commit c734e7c into stable-4 Jan 10, 2022
@felixfontein felixfontein deleted the patchback/backports/stable-4/a675afcba9ab167832a6d273eb272e6a3d5ac216/pr-3976 branch January 10, 2022 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants