/[gentoo]/xml/htdocs/proj/en/glep/glep-0047.html
Gentoo

Diff of /xml/htdocs/proj/en/glep/glep-0047.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.4
31<tbody valign="top"> 31<tbody valign="top">
32<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">47</td> 32<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">47</td>
33</tr> 33</tr>
34<tr class="field"><th class="field-name">Title:</th><td class="field-body">Creating 'safe' environment variables</td> 34<tr class="field"><th class="field-name">Title:</th><td class="field-body">Creating 'safe' environment variables</td>
35</tr> 35</tr>
36<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.1</td> 36<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.3</td>
37</tr> 37</tr>
38<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs/xml/htdocs/proj/en/glep/glep-0047.txt?cvsroot=gentoo">2006/02/09 21:42:57</a></td> 38<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs/xml/htdocs/proj/en/glep/glep-0047.txt?cvsroot=gentoo">2006/02/12 19:57:57</a></td>
39</tr> 39</tr>
40<tr class="field"><th class="field-name">Author:</th><td class="field-body">Diego Pettenò, Fabian Groffen</td> 40<tr class="field"><th class="field-name">Author:</th><td class="field-body">Diego Pettenò, Fabian Groffen</td>
41</tr> 41</tr>
42<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> 42<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
43</tr> 43</tr>
136suffices, can keep that keyword. Since this doesn't change anything to 136suffices, can keep that keyword. Since this doesn't change anything to
137the current situation in the tree, it is considered to be a big 137the current situation in the tree, it is considered to be a big
138advantage over the 4-tuple keyword from GLEP 22. This GLEP is an 138advantage over the 4-tuple keyword from GLEP 22. This GLEP is an
139official specification of the syntax of the keyword.</p> 139official specification of the syntax of the keyword.</p>
140<p>Keywords will consist out of two parts separated by a hyphen ('-'). The 140<p>Keywords will consist out of two parts separated by a hyphen ('-'). The
141left hand part of the keyword 2-tuple is the architecture, such as 141part up to the first hyphen from the left of the keyword 2-tuple is the
142ppc64, sparc and x86. The right hand part indicates the operating 142architecture, such as ppc64, sparc and x86. Allowed characters for the
143architecture name are in <tt class="literal"><span class="pre">a-z0-9</span></tt>. The remaining part on the right of
144the first hyphen from the left indicates the operating system or
143system or distribution, such as linux, macos, darwin, obsd, etc. If the 145distribution, such as linux, macos, darwin, obsd, et-cetera. If the
144right hand part is omitted, it implies the operating system/distribution 146right hand part is omitted, it implies the operating system/distribution
145type is Gentoo GNU/Linux. In such case the hyphen is also omitted. 147type is Gentoo GNU/Linux. In such case the hyphen is also omitted, and
146Examples of such keywords are ppc-darwin and x86. This is fully 148the keyword consists of solely the architecture. The operating system
147compatible with the current use of keywords in the tree.</p> 149or distribution name can consist out of characters in <tt class="literal"><span class="pre">a-zA-Z0-9_+:-</span></tt>.
150Please note that the hyphen is an allowed character, and therefore the
151separation of the two fields in the keyword is only determinable by
152scanning for the first hyphen character from the start of the keyword
153string. Examples of keywords following this specification are
154ppc-darwin and x86. This is fully compatible with the current use of
155keywords in the tree.</p>
148<p>The variables <tt class="literal"><span class="pre">ELIBC</span></tt>, <tt class="literal"><span class="pre">KERNEL</span></tt> and <tt class="literal"><span class="pre">ARCH</span></tt> are currently set in 156<p>The variables <tt class="literal"><span class="pre">ELIBC</span></tt>, <tt class="literal"><span class="pre">KERNEL</span></tt> and <tt class="literal"><span class="pre">ARCH</span></tt> are currently set in
149the profiles when other than their defaults for a GNU/Linux system. 157the profiles when other than their defaults for a GNU/Linux system.
150They can as such easily be overridden and defined by the user. To 158They can as such easily be overridden and defined by the user. To
151prevent this from happening, the variables should be auto filled by 159prevent this from happening, the variables should be auto filled by
152Portage itself, based on the <tt class="literal"><span class="pre">CHOST</span></tt> variable. While the <tt class="literal"><span class="pre">CHOST</span></tt> 160Portage itself, based on the <tt class="literal"><span class="pre">CHOST</span></tt> variable. While the <tt class="literal"><span class="pre">CHOST</span></tt>
201*-*-darwin* -&gt; KERNEL=&quot;Darwin&quot; ELIBC=&quot;Darwin&quot; 209*-*-darwin* -&gt; KERNEL=&quot;Darwin&quot; ELIBC=&quot;Darwin&quot;
202*-*-netbsd* -&gt; KERNEL=&quot;NetBSD&quot; ELIBC=&quot;NetBSD&quot; 210*-*-netbsd* -&gt; KERNEL=&quot;NetBSD&quot; ELIBC=&quot;NetBSD&quot;
203*-*-solaris* -&gt; KERNEL=&quot;Solaris&quot; ELIBC=&quot;Solaris&quot; 211*-*-solaris* -&gt; KERNEL=&quot;Solaris&quot; ELIBC=&quot;Solaris&quot;
204</pre> 212</pre>
205<p>A way to achieve this is proposed by Mike Frysinger, which 213<p>A way to achieve this is proposed by Mike Frysinger, which
206suggests to have a env-map file, for instance filled with:</p> 214suggests to have an env-map file, for instance filled with:</p>
207<pre class="literal-block"> 215<pre class="literal-block">
208% cat env-map 216% cat env-map
209*-linux-* KERNEL=linux 217*-linux-* KERNEL=linux
210*-gnu ELIBC=glibc 218*-gnu ELIBC=glibc
211x86_64-* ARCH=amd64 219x86_64-* ARCH=amd64
288</div> 296</div>
289 297
290<hr class="footer" /> 298<hr class="footer" />
291<div class="footer"> 299<div class="footer">
292<a class="reference" href="glep-0047.txt">View document source</a>. 300<a class="reference" href="glep-0047.txt">View document source</a>.
293Generated on: 2006-02-11 21:38 UTC. 301Generated on: 2006-02-12 19:59 UTC.
294Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. 302Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
295</div> 303</div>
296</body> 304</body>
297</html> 305</html>
298 306

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20