Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1346456

Summary: RFE: Allow alternatives to de-reference target links when setting
Product: Red Hat Enterprise Linux 7 Reporter: Deepak Bhole <dbhole>
Component: chkconfigAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: btotty, cww, jscotka, jvanek
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 12:19:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1203710    
Attachments:
Description Flags
Patch that adds support for symlink targets to alternatives --set none

Description Deepak Bhole 2016-06-14 21:06:02 UTC
Created attachment 1167969 [details]
Patch that adds support for symlink targets to alternatives --set

Currently, alternatives --set only works if the target is the target that was specified during creation.

In instances where we may want to support multiple versions of something (that require unique install locations), scripting via alternatives becomes convoluted as it requires link resolution before-hand (or knowledge of unique location).

This proposed patch makes it to that alternatives --set can take a symlink target argument as well as an actual file target.

Would it be possible to add this to RHEL-7?

The genesis of this request is an OpenJDK bug, bug#1344059

Comment 2 jiri vanek 2016-06-15 09:07:23 UTC
Deepak, I think the main patch to alternatives is missing.

Comment 3 Deepak Bhole 2016-06-15 12:51:46 UTC
(In reply to jiri vanek from comment #2)
> Deepak, I think the main patch to alternatives is missing.

The posted patch is against our git 7.3 branch of chkconfig. If contains 0007-alternatives-allow-symlink-target.patch which the RPM patches in at build time.

Comment 4 Lukáš Nykrýn 2016-06-15 12:54:03 UTC
Thanks for the patch I will review it as soon as possible.

Comment 5 jiri vanek 2016-06-15 13:00:22 UTC
You see, it is not visible form https://bugzilla.redhat.com/attachment.cgi?id=1167969&action=diff

But indeed it is visible from  https://bugzilla.redhat.com/attachment.cgi?id=1167969

Sorry for noise

Comment 6 Lukáš Nykrýn 2016-06-18 07:28:01 UTC
Ok, devel_ack for this change, although I must say that I am not happy with amount of symlinks we are dealing with.

This is more a question suited for memo-list, but have you though how you will package java in distant future? I was even thinking about introducing some namespacing features to alternatives, so you could use different alternatives with different programs at the same time, but maybe a different new tool would be more appropriate.

Comment 7 jiri vanek 2016-06-20 09:23:06 UTC
Please see 

https://bugzilla.redhat.com/show_bug.cgi?id=1344059#c20 and https://bugzilla.redhat.com/show_bug.cgi?id=1344059#c22 for different possibel fix.

Comment 10 Lukáš Nykrýn 2016-06-29 12:19:52 UTC
SO I guess we have agreed to use --family for --set and --config, so this bug can be closed.