<p>The variables <ttclass="literal"><spanclass="pre">ELIBC</span></tt>, <ttclass="literal"><spanclass="pre">KERNEL</span></tt> and <ttclass="literal"><spanclass="pre">ARCH</span></tt> are currently set in

<p>The entries in the <ttclass="literal"><spanclass="pre">env-map</span></tt> file will be evaluated in a forward

239

linear full scan. A side-effect of this exhaustive search is that the

240

variables can be re-assigned if multiple entries match the given

241

<ttclass="literal"><spanclass="pre">CHOST</span></tt>. Because of this, the order of the entries does matter.

242

Because the <ttclass="literal"><spanclass="pre">env-map</span></tt> file size is assumed not to exceed the block

243

size of the file system, the performance penalty of a full scan versus

244

'first-hit-stop technique' is assumed to be minimal.</p>

245

<p>It should be noted, however, that the above bash script is a proof of

246

concept implementation. Since Portage is largerly written in Python, it

247

will be more efficient to write an equivalent of this code in Python

248

also. Coding wise, this is considered to be a non-issue, but the format

249

of the <ttclass="literal"><spanclass="pre">env-map</span></tt> file, and especially its wildcard characters, might

250

not be the best match with Python. For this purpose, the format

251

specification of the <ttclass="literal"><spanclass="pre">env-map</span></tt> file is deferred to the Python

252

implementation, and only the requirements are given here.</p>

253

<p>The <ttclass="literal"><spanclass="pre">env-map</span></tt> file should be capable of encoding a <ttclass="literal"><spanclass="pre">key</span></tt>, <ttclass="literal"><spanclass="pre">value</span></tt>

254

pair, where <ttclass="literal"><spanclass="pre">key</span></tt> is a (regular) expression that matches a