Home Files
Adminer
Execute Command
PHP Eval
Symlink
File Upload
Owner :
www-data
PHP Version
5.6.40-0+deb8u12
Disk Space
40.94 GB
Server Addr
19-www4
Your IP
10.10.10.40
Edit File
File:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Immediate dependency resolution</title><link rel="stylesheet" type="text/css" href="aptitude.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="aptitude user's manual"><link rel="up" href="ch02s03.html" title="Resolving package dependencies"><link rel="prev" href="ch02s03s01.html" title="Dependency resolution in aptitude"><link rel="next" href="ch02s03s03.html" title="Resolving Dependencies Interactively"><link rel="preface" href="pr01.html" title="Introduction"><link rel="chapter" href="ch01.html" title="Chapter 1. Getting started"><link rel="chapter" href="ch02.html" title="Chapter 2. aptitude reference guide"><link rel="chapter" href="ch03.html" title="Chapter 3. aptitude frequently asked questions"><link rel="chapter" href="ch04.html" title="Chapter 4. Credits"><link rel="reference" href="rn01.html" title="Command-line reference"><link rel="refentry" href="rn01re01.html" title="aptitude"><link rel="refentry" href="rn01re02.html" title="aptitude-create-state-bundle"><link rel="refentry" href="rn01re03.html" title="aptitude-run-state-bundle"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Immediate dependency resolution</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s03s01.html"><img src="images/prev.gif" alt="Prev"></a> </td><th width="60%" align="center">Resolving package dependencies</th><td width="20%" align="right"> <a accesskey="n" href="ch02s03s03.html"><img src="images/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="secImmediateResolution"></a>Immediate dependency resolution</h3></div></div></div><p> Whenever you choose to install or upgrade a package in <span class="command"><strong>aptitude</strong></span>, <span class="command"><strong>aptitude</strong></span> makes an immediate attempt to resolve any of its dependencies that are not fulfilled. For each unsatisfied dependency (either a <span class="quote">“<span class="quote">Depends</span>”</span>, a <span class="quote">“<span class="quote">Recommends</span>”</span>, or a <span class="quote">“<span class="quote">Conflicts</span>”</span>), it performs the following steps: </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> If the dependency is a recommendation, <span class="command"><strong>aptitude</strong></span> tries to guess whether it is a <span class="quote">“<span class="quote">new</span>”</span> recommendation or a <span class="quote">“<span class="quote">previously satisfied</span>”</span> recommendation. <span class="command"><strong>aptitude</strong></span> considers a recommendation to be <span class="quote">“<span class="quote">new</span>”</span> if the package declaring the recommendation is not currently installed, or if its installed version does not recommend a package of the same name. On the other hand, a recommendation is <span class="quote">“<span class="quote">previously satisfied</span>”</span> if the package declaring the recommendation is installed, the currently installed version recommends a package of the same name, and that recommendation is currently fulfilled. </p><p> For example: suppose that version <code class="literal">1.0</code> of <code class="literal">prog</code> recommends version <code class="literal">4.0</code> of <code class="literal">libcool1</code>, but version <code class="literal">2.0</code> of <code class="literal">prog</code> recommends version <code class="literal">5.0</code> of <code class="literal">libcool1</code>, and also recommends <code class="literal">apache</code>. If you choose to upgrade <code class="literal">prog</code> from version <code class="literal">1.0</code> to version <code class="literal">2.0</code>, the recommendation of <code class="literal">apache</code> will be considered to be <span class="quote">“<span class="quote">new</span>”</span> because version <code class="literal">1.0</code> of <code class="literal">prog</code> did not recommend <code class="literal">apache</code>. On the other hand, the recommendation of <code class="literal">libcool1</code> is <span class="emphasis"><em>not</em></span> <span class="quote">“<span class="quote">new</span>”</span>, because version <code class="literal">1.0</code> of <code class="literal">prog</code> recommended <code class="literal">libcool1</code>, even though it recommended a different version. However, if <code class="literal">libcool1</code> is installed, then that recommendation will be considered to be <span class="quote">“<span class="quote">previously satisfied</span>”</span>. </p><p> If the configuration option <a class="link" href="ch02s05s05.html#configAptInstall-Recommends"><code class="literal">Apt::Install-Recommends</code></a> is <code class="literal">true</code>, <span class="command"><strong>aptitude</strong></span> will always attempt to fulfill <span class="quote">“<span class="quote">new</span>”</span> and <span class="quote">“<span class="quote">previously satisfied</span>”</span> recommendations; all others will be ignored by immediate resolution. If that option is <code class="literal">false</code>, immediate dependency resolution will ignore <span class="emphasis"><em>all</em></span> recommendations. </p></li><li class="listitem"><p> If the dependency is on several packages combined with OR, examine each of the alternatives in the order that they are given. For instance, if a package depends on <span class="quote">“<span class="quote"><code class="literal">exim | mail-transport-agent</code></span>”</span>, <span class="command"><strong>aptitude</strong></span> will first process <code class="literal">exim</code>, then <code class="literal">mail-transport-agent</code>. </p></li><li class="listitem"><p> For each alternative, attempt to resolve it. If the dependency is a conflict, remove the current alternative if it is installed (and for an unversioned conflict, also remove any package providing the target of the conflict). Otherwise, install the candidate version of the current alternative if it satisfies the dependency. If not, or if there is no candidate version (for instance, because the current alternative is a virtual package), and if the dependency is unversioned, attempt to install the highest-priority package<a href="#ftn.idp57440688" class="footnote" name="idp57440688"><sup class="footnote">[12]</sup></a> whose candidate version provides the target of the current alternative. </p><p> For instance, say we are attempting to resolve <span class="quote">“<span class="quote"><code class="literal">Depends: exim | mail-transport-agent</code></span>”</span>. <span class="command"><strong>aptitude</strong></span> will first attempt to install the package <code class="literal">exim</code>. If <code class="literal">exim</code> is not available, <span class="command"><strong>aptitude</strong></span> will then attempt to install the highest-priority package whose candidate version provides <code class="literal">exim</code>. If there is no such package, <span class="command"><strong>aptitude</strong></span> will install the highest-priority package whose candidate version provides the virtual package <code class="literal">mail-transport-agent</code>. On the other hand, suppose that the dependency is <span class="quote">“<span class="quote"><code class="literal">Depends: exim (>= 2.0.0) | mail-transport-agent</code></span>”</span>, but only version <code class="literal">1.0</code> of <code class="literal">exim</code> is available. In this case, <span class="command"><strong>aptitude</strong></span> will not install <code class="literal">exim</code> (because the version does not match), nor will it attempt to install packages providing <code class="literal">exim</code> (because virtual packages cannot match a dependency with a version restriction). Thus, <span class="command"><strong>aptitude</strong></span> will fall back to installing the highest-priority package whose candidate version provides <code class="literal">mail-transport-agent</code>. </p></li><li class="listitem"><p> If a package was installed by the previous step, resolve its dependencies using this algorithm, then stop. </p></li></ol></div><p> While this technique very often solves all the outstanding package dependencies, it can fail in a number of common circumstances. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Conflicts are resolved by removing the package that is the target of the conflict. But now other packages that depend on this package have unresolved dependencies; the immediate resolver makes no attempt to fix them. </p></li><li class="listitem"><p> A dependency might not be satisfiable due to version restrictions and due to the limitation that only candidate versions are considered. For instance, say that versions <code class="literal">1.0</code> and <code class="literal">2.0</code> of <code class="literal">fileutils</code> are available, that the candidate version is <code class="literal">1.0</code>, and that the package <code class="literal">octopus</code> declares a dependency <span class="quote">“<span class="quote"><code class="literal">Depends: fileutils (>= 2.0)</code></span>”</span>. Immediate resolution is unable to resolve this dependency: it will never consider version <code class="literal">2.0</code> of the package, since that is not the candidate version. </p></li></ul></div><p> The interactive dependency resolver can solve these situations and more. When there are broken dependencies left over, or when immediate dependency resolution is disabled, the interactive resolver will automatically start searching for a solution. The next section describes how to use the interactive dependency resolver. </p><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idp57440688" class="footnote"><p><a href="#idp57440688" class="para"><sup class="para">[12] </sup></a>The package with the highest <span class="command"><strong>dpkg</strong></span> priority, not the package with the highest <code class="systemitem">apt</code> pin priority.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s03s01.html"><img src="images/prev.gif" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="ch02s03.html"><img src="images/up.gif" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s03s03.html"><img src="images/next.gif" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Dependency resolution in <span class="command"><strong>aptitude</strong></span> </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.gif" alt="Home"></a></td><td width="40%" align="right" valign="top"> Resolving Dependencies Interactively</td></tr></table></div></body></html>