Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 258114

Summary: x11-wm/compiz abusing ${ROOT}
Product: Gentoo Linux Reporter: Thilo Bangert (RETIRED) (RETIRED) <bangert>
Component: New packagesAssignee: Desktop-Effects herd <desktop-effects+disabled>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 258096    

Description Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-02-08 12:50:59 UTC
Some notes on ROOT:

* The idea behind ROOT is that one can build a system with ROOT=/somewhere and
then chroot into it or tar up /somewhere as a system image. It is not designed
to allow the user to run /somewhere/usr/bin/foo.

* ROOT can't be used correctly in src_*, since ROOT might be different when
merging a binary package. For example, a binary package might be built with
ROOT=/ and then installed onto a system using ROOT=/somewhere.

* ROOT isn't used for library dependencies. When building, libraries, headers
etc. on / have to be used. Cross-compiling etc is done by configuring the
toolchain correctly, not by hacking ebuilds in a way that breaks binary
packages.

See also the discussion on bug #167285 for more info.
Comment 1 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-03-07 02:40:20 UTC
The only use of ${ROOT} in compiz is for the following:

ln -s "${ROOT}"/usr/share/aclocal/gconf-2.m4 acinclude.m4

The only reason this is being done is because the acinclude.m4 in compiz was causing issues. As we're linking to a macro file, how are we abusing ${ROOT}?
Comment 2 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-03-09 20:22:32 UTC
ROOT is used to influence where stuff is being installed (into a different root), but has no relation to where stuff is, when the package is being built. all build time dependencies have to be (and are) met by whatever is installed in /.

in the case of x11-wm/compiz, you would simply remove the ROOT variable.

you would for example use the ROOT variable, if you want to warn the user of an old and obsoleted config file, which you find to be present (in pkg_postinst()).
Comment 3 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-03-09 23:44:28 UTC
Thilo,

thanks for the explanation. I've removed ${ROOT} from the ebuild.
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-04-03 11:32:06 UTC
I've fixed this on compiz-0.8.2 that I just added to the tree.