Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1102741

Summary: broken MANPATH
Product: Red Hat Developer Toolset Reporter: Miroslav Franc <mfranc>
Component: devtoolset-metaAssignee: Mat Booth <mat.booth>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: medium Docs Contact:
Priority: medium    
Version: DTS 3.0 RHEL 7CC: akurtako, jakub, mat.booth, mfranc, mnewsome, mpolacek, ohudlick
Target Milestone: alpha   
Target Release: 3.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: devtoolset-3-3.0-12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-30 09:26:28 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:
Attachments:
Description Flags
Revert MANPATH change none

Description Miroslav Franc 2014-05-29 13:17:28 UTC
In /opt/rh/devtoolset-3/enable there is a line that reads

export MANPATH=/opt/rh/devtoolset-3/root/usr/share/man${MANPATH:+:${MANPATH}}

which is a change from /opt/rh/devtoolset-2/enable:

export MANPATH=/opt/rh/devtoolset-2/root/usr/share/man:$MANPATH

My guess that it's modeled after PATH:

export PATH=/opt/rh/devtoolset-3/root/usr/bin${PATH:+:${PATH}}


The problem is that the meaning of those two variables is quite different.  In case of PATH you want to prevent trailing colon at all costs since it would mean including cwd in the path where executables and scripts are searched, at the very end.  You do not want that.  It makes sense.  In case of MANPATH, however, trailing colon means that the paths determined by the configuration files are appended to the search path contained in the variable and you DO want that.  Otherwise it's not possible to display non-dts3 man pages by default.


# scl enable devtoolset-3 bash
# echo $MANPATH
/opt/rh/devtoolset-3/root/usr/share/man
# man -w gcc
/opt/rh/devtoolset-3/root/usr/share/man/man1/gcc.1.gz
# man -w man
No manual entry for man
# export MANPATH=/opt/rh/devtoolset-3/root/usr/share/man:
# man -w gcc
/opt/rh/devtoolset-3/root/usr/share/man/man1/gcc.1.gz
# man -w man
/usr/share/man/en/man1/man.1.gz


That's why I think this change should be reverted for both RHEL 6 and 7.

Comment 1 Marek Polacek 2014-05-29 13:27:42 UTC
Introduced in
commit 32d9afbf766888bdf69a259dea1ef007b69d892b
Author: Mat Booth <mat.booth>
Date:   Thu May 15 15:45:43 2014 +0100

    Add collection-specific maven, java, ivy configuration

Comment 2 Marek Polacek 2014-06-02 10:08:14 UTC
INFOPATH and similar vars may need fixing as well.

Comment 3 Mat Booth 2014-06-03 09:07:03 UTC
The INFOPATH variable seems to work correctly as is for viewing non-dts3 info documents:

[mbooth@mabooth-rhel7 ~]$ scl enable devtoolset-3 bash
[mbooth@mabooth-rhel7 ~]$ info -w tar
/usr/share/info/tar.info.gz

(I do not believe this has changed since dts-2)

Comment 4 Mat Booth 2014-06-03 09:09:37 UTC
Created attachment 901689 [details]
Revert MANPATH change

Please see attached patch for the change I plan to make to fix MANPATH.

Comment 5 Marek Polacek 2014-06-03 10:25:36 UTC
Ok if the MANPATH is the same now as it was in DTS2.1 and if you can confirm that PATH envvar doesn't need fixing.  Thanks.

Comment 6 Marek Polacek 2014-06-03 10:41:02 UTC
(Modulo 2->3 changes, that is.)

Comment 7 Mat Booth 2014-06-03 11:08:43 UTC
Sure, the PATH also appears to be correct:

[mbooth@mabooth-rhel7 ~]$ env | grep ^PATH
PATH=/opt/rh/devtoolset-3/root/usr/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/mbooth/.local/bin:/home/mbooth/bin

Comment 8 Mat Booth 2014-06-03 11:29:17 UTC
Fix should be available in devtoolset-3-3.0-12 for both rhel6 and rhel7.

Comment 14 errata-xmlrpc 2014-10-30 09:26:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2014-1753.html