Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 184040 Details for
Bug 144332
devmanual: add documentation for the $ROOT variable
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add_section_about_root.patch
add_section_about_root.patch (text/plain), 1.77 KB, created by
Thilo Bangert (RETIRED) (RETIRED)
on 2009-03-05 19:33:05 UTC
(
hide
)
Description:
add_section_about_root.patch
Filename:
MIME Type:
Creator:
Thilo Bangert (RETIRED) (RETIRED)
Created:
2009-03-05 19:33:05 UTC
Size:
1.77 KB
patch
obsolete
>Index: ebuild-writing/variables/text.xml >=================================================================== >--- ebuild-writing/variables/text.xml (revision 141) >+++ ebuild-writing/variables/text.xml (working copy) >@@ -93,7 +93,8 @@ > <ti><c>ROOT</c></ti> > <ti> > Path to the root directory. When not using <c>${D}</c>, >- always prepend <c>${ROOT}</c> to the path. >+ always prepend <c>${ROOT}</c> to the path, see >+ <uri link="::ebuild-writing/variables#ROOT"/>. > </ti> > </tr> > <tr> >@@ -351,6 +352,48 @@ > </section> > > <section> >+<title>ROOT</title> >+<body> >+ >+<p> >+The idea behind <c>ROOT</c> is that one can build a system with >+<c>ROOT=/somewhere</c> and then chroot into it or tar up <c>/somewhere</c> >+as a system image. It is not designed to allow the user to run >+<c>/somewhere/usr/bin/foo</c>. >+</p> >+ >+<p> >+An ebuild could use <c>ROOT</c> in <c>pkg_postinst()</c> to conditionally print >+an error message if an old and obsolete configuration file still exists. >+ >+<codesample lang="ebuild"> >+pkg_postinst() { >+ if [ -e "${ROOT}/etc/oldconfig" ]; then >+ ewarn "You still have the obsolete config file " >+ ewarn " ${ROOT}/etc/oldconfig." >+ ewarn "Please migrate your settings to ${ROOT}/etc/newconfig" >+ ewarn "and remove ${ROOT}/etc/oldconfig." >+ fi >+} >+</codesample> >+</p> >+ >+<p> >+<c>ROOT</c> can't be used correctly in <c>src_*</c>, since <c>ROOT</c> might be >+different when merging a binary package. For example, a binary package might be >+built with <c>ROOT=/</c> and then installed onto a system using >+<c>ROOT=/somewhere</c>. >+</p> >+ >+<p> >+<c>ROOT</c> isn't used for library dependencies. When building, libraries, >+headers etc. on <c>/</c> have to be used. >+</p> >+ >+</body> >+</section> >+ >+<section> > <title>Version Formatting Issues</title> > <body> >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 144332
: 184040