Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 514974 - sci-physics/geant-data needs to be rebuilt if sci-physics/geant changes version (subslotting needed?)
Summary: sci-physics/geant-data needs to be rebuilt if sci-physics/geant changes versi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Physics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-24 23:45 UTC by Oliver Freyermuth
Modified: 2019-06-28 13:17 UTC (History)
0 users

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 2014-06-24 23:45:44 UTC
If updating from e.g. =sci-physics/geant-4.10.00 to =sci-physics/geant-4.10.00_p01, as outlined in https://bugs.gentoo.org/show_bug.cgi?id=510692 , we do not need new datafiles, but: 

In 
=sci-physics/geant-data-4.10.00
the content of the file 
"${EROOT}/usr/bin/geant4.sh"
which belongs to "sci-physics/geant"
are used to determine the install path for the data-files. This means the data-files are installed to a different location if a different version of Geant is installed at time of sci-physics/geant-data emerge! 
The problem is that this path contains the FULL version string of this installed Geant, i.e. there are lines like
export G4LEDATA="`cd $geant4_envbindir/../share/Geant4-10.0.1/data/G4EMLOW6.35 > /dev/null ; pwd`"
in "${EROOT}/usr/bin/geant4.sh". 

Result: If sci-physics/geant changes version (i.e. due to update), geant4.sh is recreated with the new version string and geant will look for the datafiles there (if geant4.sh is used for env-setup, as e.g. some build-systems of physics-software do). The datafiles, however, are still in the "old" version folder (which matches the paths given in /etc/env.d/99geant-data ), unless the user also re-emerges sci-physics/geant-data to fix this situation. 

I see two possible solutions to this issue: 
1) The complicated fix: Patch out the hardcoded paths to datafiles from all "/usr/bin/geant4.*sh" files. This needs to be done in sci-physics/geant. It should not rely on data-files-install location, as sci-physics/geant-data provides /etc/env.d/99geant-data with correct path-setup. This change of course also requires a modification of sci-physics/geant-data to *not* use "${EROOT}/usr/bin/geant4.sh" anymore. 
2) The easy fix: sci-physics/geant-data needs to be rebuilt each time sci-physics/geant changes subslot. This requires subslotting for sci-physics/geant and a subslot-dep in sci-physics/geant-data. 

Having subslotting for sci-physics/geant would be nice anyways to also be able to trigger a rebuilt of related packages (might be needed for geant-vmc, VGM) if geant changes subslot. 

Should I split this issue into separate bugs? Which route is preferred? 

Reproducible: Always

Steps to Reproduce:
1. emerge =sci-physics/geant-4.10.00[data]
2. emerge =sci-physics/geant-4.10.00_p01
3. Observe invalid data-file paths in "${EROOT}/usr/bin/geant4.*sh"
Comment 1 Benda Xu gentoo-dev 2019-06-28 13:17:38 UTC
Fixed in the recent ebuilds.