Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641422 - =sci-physics/root-6.12.04 does not set ROOTPATH in environment file
Summary: =sci-physics/root-6.12.04 does not set ROOTPATH in environment file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Guilherme Amadio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-17 01:43 UTC by Oliver Freyermuth
Modified: 2018-01-19 16:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2017-12-17 01:43:26 UTC
/etc/env.d/99root contains:
PATH=/opt/root/6.12/bin
LDPATH=/opt/root/6.12/lib64
PYTHONPATH=/opt/root/6.12/lib

This means the PATH will not be set for the root user, and hence not used by portage, causing packages such as sci-physics/vgm, sci-physics/genfit, sci-physics/geant-vmc from the science overlay to fail to find the installed root. 

In FindROOT.cmake, these packages look for the root-config binary in PATH. 

To fix this, changing /etc/env.d/99root to contain:
PATH=/opt/root/6.12/bin
ROOTPATH=/opt/root/6.12/bin
LDPATH=/opt/root/6.12/lib64
PYTHONPATH=/opt/root/6.12/lib
helps. 

This issue was "hidden" in previous packaging, since if root is installed to usual /usr/bin, this is already present in both PATH and ROOTPATH.
Comment 1 Larry the Git Cow gentoo-dev 2017-12-18 13:13:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4ae38c1b1982e8ff1812c639c785f1835e46d04

commit b4ae38c1b1982e8ff1812c639c785f1835e46d04
Author:     Guilherme Amadio <amadio@gentoo.org>
AuthorDate: 2017-12-18 09:08:55 +0000
Commit:     Guilherme Amadio <amadio@gentoo.org>
CommitDate: 2017-12-18 13:11:57 +0000

    sci-physics/root: set ROOTPATH so that portage finds ROOT, bug 641422
    
    As mentioned in the bug, this is needed for building packages that
    depend on ROOT, like sci-physics/{geant-vmc,gentfit,vgm}.
    
    Closes: https://bugs.gentoo.org/641422
    Package-Manager: Portage-2.3.18, Repoman-2.3.6

 sci-physics/root/root-6.12.04.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 2 Oliver Freyermuth 2017-12-31 04:50:48 UTC
Sorry it took me so long to notice - but the fix is faulty, now PATH is not set anymore in the environment file. 

From the ebuild code:
 	echo "PATH=${EPREFIX}/${MY_PREFIX}/bin" > 99root || die
	echo "ROOTPATH=${EPREFIX}/${MY_PREFIX}/bin" > 99root || die
 	echo "LDPATH=${EPREFIX}/${MY_PREFIX}/$(get_libdir)" >> 99root || die
The second "echo" recreates the file, hence the "PATH" setting.
Comment 3 Oliver Freyermuth 2017-12-31 04:54:41 UTC
... hence the path setting is lost (sorry, submitted too early). 

Likely, the best would be another revision bump after this to roll out the fix.
Comment 4 Benda Xu gentoo-dev 2018-01-02 06:49:01 UTC
Re-opening this bug.
Comment 5 Larry the Git Cow gentoo-dev 2018-01-19 16:38:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24372ea7f292da93a8da1fff33f6b4b1e98b6b1d

commit 24372ea7f292da93a8da1fff33f6b4b1e98b6b1d
Author:     Guilherme Amadio <amadio@gentoo.org>
AuthorDate: 2018-01-16 14:07:05 +0000
Commit:     Guilherme Amadio <amadio@gentoo.org>
CommitDate: 2018-01-19 16:35:12 +0000

    sci-physics/root: set PATH and ROOTPATH, bug 641422
    
    The previous commit had a bug that overwrote the file with
    PATH setting. Now both PATH and ROOTPATH are properly set.
    
    Closes: https://bugs.gentoo.org/641422
    
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sci-physics/root/{root-6.12.04-r1.ebuild => root-6.12.04-r2.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)