49 lines
2.9 KiB
HTML
49 lines
2.9 KiB
HTML
|
<html>
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|||
|
<title>7.3.<2E>Alternatives - update-alternatives.bbclass</title>
|
|||
|
<link rel="stylesheet" type="text/css" href="../book.css">
|
|||
|
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
|||
|
<link rel="home" href="index.html" title="The Yocto Project Reference Manual">
|
|||
|
<link rel="up" href="ref-classes.html" title="Chapter<65>7.<2E>Classes">
|
|||
|
<link rel="prev" href="ref-classes-autotools.html" title="7.2.<2E>Autotooled Packages - autotools.bbclass">
|
|||
|
<link rel="next" href="ref-classes-update-rc.d.html" title="7.4.<2E>Initscripts - update-rc.d.bbclass">
|
|||
|
</head>
|
|||
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="7.3.<2E>Alternatives - update-alternatives.bbclass">
|
|||
|
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
|||
|
<a name="ref-classes-update-alternatives"></a>7.3.<2E>Alternatives - <code class="filename">update-alternatives.bbclass</code>
|
|||
|
</h2></div></div></div>
|
|||
|
<p>
|
|||
|
Several programs can fulfill the same or similar function and be installed with the same name.
|
|||
|
For example, the <code class="filename">ar</code> command is available from the
|
|||
|
<code class="filename">busybox</code>, <code class="filename">binutils</code> and
|
|||
|
<code class="filename">elfutils</code> packages.
|
|||
|
The <code class="filename">update-alternatives.bbclass</code> class handles renaming the
|
|||
|
binaries so that multiple packages can be installed without conflicts.
|
|||
|
The <code class="filename">ar</code> command still works regardless of which packages are installed
|
|||
|
or subsequently removed.
|
|||
|
The class renames the conflicting binary in each package and symlinks the highest
|
|||
|
priority binary during installation or removal of packages.
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
Four variables control this class:
|
|||
|
</p>
|
|||
|
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
|||
|
<li class="listitem"><p><code class="filename">ALTERNATIVE_NAME</code> ‐ The name of the
|
|||
|
binary that is replaced (<code class="filename">ar</code> in this example).</p></li>
|
|||
|
<li class="listitem"><p><code class="filename">ALTERNATIVE_LINK</code> ‐ The path to
|
|||
|
the resulting binary (<code class="filename">/bin/ar</code> in this example).</p></li>
|
|||
|
<li class="listitem"><p><code class="filename">ALTERNATIVE_PATH</code> ‐ The path to the
|
|||
|
real binary (<code class="filename">/usr/bin/ar.binutils</code> in this example).</p></li>
|
|||
|
<li class="listitem"><p><code class="filename">ALTERNATIVE_PRIORITY</code> ‐ The priority of
|
|||
|
the binary.
|
|||
|
The version with the most features should have the highest priority.</p></li>
|
|||
|
</ul></div>
|
|||
|
<p>
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
Currently, the OpenEmbedded build system supports only one binary per package.
|
|||
|
</p>
|
|||
|
</div></body>
|
|||
|
</html>
|