| 1 | <?xml version="1.0" encoding="utf-8" standalone="no"?> |
| 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
| 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ |
| 4 | |
| 5 | <!ENTITY % aptent SYSTEM "apt.ent.ja"> |
| 6 | %aptent; |
| 7 | |
| 8 | ]> |
| 9 | |
| 10 | <refentry> |
| 11 | |
| 12 | <refentryinfo> |
| 13 | &apt-author.team; |
| 14 | &apt-email; |
| 15 | &apt-product; |
| 16 | <!-- The last update date --> |
| 17 | <date>29 February 2004</date> |
| 18 | </refentryinfo> |
| 19 | |
| 20 | <refmeta> |
| 21 | <refentrytitle>apt_preferences</refentrytitle> |
| 22 | <manvolnum>5</manvolnum> |
| 23 | </refmeta> |
| 24 | |
| 25 | <!-- Man page title --> |
| 26 | <refnamediv> |
| 27 | <refname>apt_preferences</refname> |
| 28 | <!-- |
| 29 | <refpurpose>Preference control file for APT</refpurpose> |
| 30 | --> |
| 31 | <refpurpose>APT 設定制御ファイル</refpurpose> |
| 32 | </refnamediv> |
| 33 | |
| 34 | <refsect1> |
| 35 | <!-- |
| 36 | <title>Description</title> |
| 37 | --> |
| 38 | <title>説明</title> |
| 39 | <!-- |
| 40 | <para>The APT preferences file <filename>/etc/apt/preferences</filename> |
| 41 | can be used to control which versions of packages will be selected |
| 42 | for installation.</para> |
| 43 | --> |
| 44 | <para>APT 設定ファイル <filename>/etc/apt/preferences</filename> は、 |
| 45 | インストールするパッケージのバージョン選択を制御するのに使用します。</para> |
| 46 | |
| 47 | <!-- |
| 48 | <para>Several versions of a package may be available for installation when |
| 49 | the &sources-list; file contains references to more than one distribution |
| 50 | (for example, <literal>stable</literal> and <literal>testing</literal>). |
| 51 | APT assigns a priority to each version that is available. |
| 52 | Subject to dependency constraints, <command>apt-get</command> selects the |
| 53 | version with the highest priority for installation. |
| 54 | The APT preferences file overrides the priorities that APT assigns to |
| 55 | package versions by default, thus giving the user control over which |
| 56 | one is selected for installation.</para> |
| 57 | --> |
| 58 | <para>&sources-list; ファイルに複数のディストリビューション |
| 59 | (<literal>stable</literal> と <literal>testing</literal> など) |
| 60 | が指定されていて、 |
| 61 | パッケージに対し複数のバージョンがインストールできることがあります。 |
| 62 | このとき APT は、利用できるバージョンごとに優先度を割り当てます。 |
| 63 | 依存関係規則を条件として、<command>apt-get</command> は、 |
| 64 | 最も高い優先度を持つバージョンをインストールするよう選択します。 |
| 65 | APT 設定ファイルは、APT がデフォルトで割り当てた、 |
| 66 | パッケージのバージョンの優先度を上書きします。 |
| 67 | その結果、インストールするものの選択を、ユーザが選択できるようになります。</para> |
| 68 | |
| 69 | <!-- |
| 70 | <para>Several instances of the same version of a package may be available when |
| 71 | the &sources-list; file contains references to more than one source. |
| 72 | In this case <command>apt-get</command> downloads the instance listed |
| 73 | earliest in the &sources-list; file. |
| 74 | The APT preferences file does not affect the choice of instance, only |
| 75 | the choice of version.</para> |
| 76 | --> |
| 77 | <para>&sources-list; ファイルに複数の参照が書かれている場合、 |
| 78 | パッケージの同じバージョンのインスタンスが複数利用できる可能性があります。 |
| 79 | この場合、<command>apt-get</command> は &sources-list; |
| 80 | ファイルの初めの方に指定されているところからダウンロードします。 |
| 81 | APT 設定ファイルは、バージョンの選択にのみ影響し、 |
| 82 | インスタンスの選択には影響しません。</para> |
| 83 | |
| 84 | <!-- |
| 85 | <refsect2><title>APT's Default Priority Assignments</title> |
| 86 | --> |
| 87 | <refsect2><title>APT のデフォルト優先度の割り当て</title> |
| 88 | |
| 89 | <!-- |
| 90 | <para>If there is no preferences file or if there is no entry in the file |
| 91 | that applies to a particular version then the priority assigned to that |
| 92 | version is the priority of the distribution to which that version |
| 93 | belongs. It is possible to single out a distribution, "the target release", |
| 94 | which receives a higher priority than other distributions do by default. |
| 95 | The target release can be set on the <command>apt-get</command> command |
| 96 | line or in the APT configuration file <filename>/etc/apt/apt.conf</filename>. |
| 97 | For example, |
| 98 | --> |
| 99 | <para>設定ファイルがなかったり、 |
| 100 | 設定ファイルに、特定のパッケージを割り当てるエントリがない場合、 |
| 101 | そのバージョンの優先度は、 |
| 102 | そのバージョンが属しているディストリビューションの優先度となります。 |
| 103 | デフォルトで他のディストリビューションより高い優先度を持つ、 |
| 104 | 特定のディストリビューションを「ターゲットリリース」としておくのは可能です。 |
| 105 | ターゲットリリースは、<command>apt-get</command> のコマンドラインで設定したり、 |
| 106 | APT 設定ファイル <filename>/etc/apt/apt.conf</filename> で設定したりできます。 |
| 107 | 例えば以下のようになります。 |
| 108 | |
| 109 | <programlisting> |
| 110 | <command>apt-get install -t testing <replaceable>some-package</replaceable></command> |
| 111 | </programlisting> |
| 112 | <programlisting> |
| 113 | APT::Default-Release "stable"; |
| 114 | </programlisting> |
| 115 | </para> |
| 116 | |
| 117 | <!-- |
| 118 | <para>If the target release has been specified then APT uses the following |
| 119 | algorithm to set the priorities of the versions of a package. Assign: |
| 120 | --> |
| 121 | <para>ターゲットリリースが指定されると、APT は以下のアルゴリズムで、 |
| 122 | パッケージのバージョンの優先度を設定します。このように割り当てます。 |
| 123 | |
| 124 | <variablelist> |
| 125 | <varlistentry> |
| 126 | <!-- |
| 127 | <term>priority 100</term> |
| 128 | --> |
| 129 | <term>優先度 100</term> |
| 130 | <!-- |
| 131 | <listitem><simpara>to the version that is already installed (if any).</simpara></listitem> |
| 132 | --> |
| 133 | <listitem><simpara>(あるならば) 既にインストールされているバージョン。</simpara></listitem> |
| 134 | </varlistentry> |
| 135 | |
| 136 | <varlistentry> |
| 137 | <!-- |
| 138 | <term>priority 500</term> |
| 139 | --> |
| 140 | <term>優先度 500</term> |
| 141 | <!-- |
| 142 | <listitem><simpara>to the versions that are not installed and do not belong to the target release.</simpara></listitem> |
| 143 | --> |
| 144 | <listitem><simpara>インストールされておらず、ターゲットリリースに含まれないバージョン。</simpara></listitem> |
| 145 | </varlistentry> |
| 146 | |
| 147 | <varlistentry> |
| 148 | <!-- |
| 149 | <term>priority 990</term> |
| 150 | --> |
| 151 | <term>優先度 990</term> |
| 152 | <!-- |
| 153 | <listitem><simpara>to the versions that are not installed and belong to the target release.</simpara></listitem> |
| 154 | --> |
| 155 | <listitem><simpara>インストールされておらず、ターゲットリリースに含まれるバージョン。</simpara></listitem> |
| 156 | </varlistentry> |
| 157 | </variablelist> |
| 158 | </para> |
| 159 | |
| 160 | <!-- |
| 161 | <para>If the target release has not been specified then APT simply assigns |
| 162 | priority 100 to all installed package versions and priority 500 to all |
| 163 | uninstalled package versions.</para> |
| 164 | --> |
| 165 | <para>ターゲットリリースが指定されていなければ、 |
| 166 | APT は単純にインストールしているパッケージのバージョンには 100 を、 |
| 167 | インストールしていないパッケージのバージョンには 500 を割り当てます。</para> |
| 168 | |
| 169 | <!-- |
| 170 | <para>APT then applies the following rules, listed in order of precedence, |
| 171 | to determine which version of a package to install. |
| 172 | --> |
| 173 | <para>APT は、インストールするパッケージのバージョンを決定するために、 |
| 174 | 以下のルールを上から順番に適用します。 |
| 175 | <itemizedlist> |
| 176 | <!-- |
| 177 | <listitem><simpara>Never downgrade unless the priority of an available |
| 178 | version exceeds 1000. ("Downgrading" is installing a less recent version |
| 179 | of a package in place of a more recent version. Note that none of APT's |
| 180 | default priorities exceeds 1000; such high priorities can only be set in |
| 181 | the preferences file. Note also that downgrading a package |
| 182 | can be risky.)</simpara></listitem> |
| 183 | --> |
| 184 | <listitem><simpara>有効なバージョンの優先度が 1000 を越えない場合、 |
| 185 | 決してダウングレードしません。 |
| 186 | (「ダウングレード」は、現在のパッケージのバージョンよりも、 |
| 187 | 小さいバージョンのものをインストールします。 |
| 188 | APT のデフォルト優先度が 1000 を越えないことに注意してください。 |
| 189 | そのような優先度は設定ファイルでのみ設定できます。 |
| 190 | また、パッケージのダウングレードは危険であることにも注意してください)</simpara></listitem> |
| 191 | <!-- |
| 192 | <listitem><simpara>Install the highest priority version.</simpara></listitem> |
| 193 | --> |
| 194 | <listitem><simpara>最も高い優先度のバージョンをインストールします。</simpara></listitem> |
| 195 | <!-- |
| 196 | <listitem><simpara>If two or more versions have the same priority, |
| 197 | install the most recent one (that is, the one with the higher version |
| 198 | number).</simpara></listitem> |
| 199 | --> |
| 200 | <listitem><simpara>同じ優先度のバージョンが複数存在する場合、 |
| 201 | 最も新しいもの (最もバージョン番号が高いもの) をインストールします。</simpara></listitem> |
| 202 | <!-- |
| 203 | <listitem><simpara>If two or more versions have the same priority and |
| 204 | version number but either the packages differ in some of their metadata or the |
| 205 | <literal>-\-reinstall</literal> option is given, install the uninstalled one.</simpara></listitem> |
| 206 | --> |
| 207 | <listitem><simpara>優先度・バージョン番号が同じものが複数存在し、 |
| 208 | そのパッケージのメタデータが異なるか <literal>--reinstall</literal> |
| 209 | オプションが与えられている場合、 |
| 210 | インストールされていないものをインストールします。</simpara></listitem> |
| 211 | </itemizedlist> |
| 212 | </para> |
| 213 | |
| 214 | <!-- |
| 215 | <para>In a typical situation, the installed version of a package (priority 100) |
| 216 | is not as recent as one of the versions available from the sources listed in |
| 217 | the &sources-list; file (priority 500 or 990). Then the package will be upgraded |
| 218 | when <command>apt-get install <replaceable>some-package</replaceable></command> |
| 219 | or <command>apt-get upgrade</command> is executed. |
| 220 | --> |
| 221 | <para>よくある状況として、 |
| 222 | あるインストールされているパッケージのバージョン (優先度 100) が、 |
| 223 | &sources-list; ファイルのリストから得られるバージョン (優先度 500 か 990) |
| 224 | よりも新しくないということがあります。この場合、 |
| 225 | <command>apt-get install <replaceable>some-package</replaceable></command> |
| 226 | や <command>apt-get upgrade</command> を実行するとパッケージが更新されます。 |
| 227 | </para> |
| 228 | |
| 229 | <!-- |
| 230 | <para>More rarely, the installed version of a package is <emphasis>more</emphasis> recent |
| 231 | than any of the other available versions. The package will not be downgraded |
| 232 | when <command>apt-get install <replaceable>some-package</replaceable></command> |
| 233 | or <command>apt-get upgrade</command> is executed.</para> |
| 234 | --> |
| 235 | <para>まれに、インストールされているパッケージのバージョンが、 |
| 236 | <emphasis>他の有効なバージョンよりも</emphasis>新しい場合があります。 |
| 237 | この時 |
| 238 | <command>apt-get install <replaceable>some-package</replaceable></command> |
| 239 | や <command>apt-get upgrade</command> を実行しても、 |
| 240 | ダウングレードしません。</para> |
| 241 | |
| 242 | <!-- |
| 243 | <para>Sometimes the installed version of a package is more recent than the |
| 244 | version belonging to the target release, but not as recent as a version |
| 245 | belonging to some other distribution. Such a package will indeed be upgraded |
| 246 | when <command>apt-get install <replaceable>some-package</replaceable></command> |
| 247 | or <command>apt-get upgrade</command> is executed, |
| 248 | because at least <emphasis>one</emphasis> of the available versions has a higher |
| 249 | priority than the installed version.</para> |
| 250 | --> |
| 251 | <para>時々、インストールしているパッケージのバージョンが、 |
| 252 | ターゲットリリースに属するバージョンよりも新しく、 |
| 253 | 他のディストリビューションよりも古い場合があります。 |
| 254 | そのようなパッケージに対して |
| 255 | <command>apt-get install <replaceable>some-package</replaceable></command> |
| 256 | や <command>apt-get upgrade</command> を実行すると、 |
| 257 | パッケージは更新されます。 |
| 258 | この場合、インストールされているバージョンよりも、 |
| 259 | 少なくとも<emphasis>ひとつ</emphasis>は、 |
| 260 | 高い優先度を持つ有効なパッケージがあるからです。</para> |
| 261 | </refsect2> |
| 262 | |
| 263 | <!-- |
| 264 | <refsect2><title>The Effect of APT Preferences</title> |
| 265 | --> |
| 266 | <refsect2><title>APT 設定の効果</title> |
| 267 | |
| 268 | <!-- |
| 269 | <para>The APT preferences file allows the system administrator to control the |
| 270 | assignment of priorities. The file consists of one or more multi-line records |
| 271 | separated by blank lines. Records can have one of two forms, a specific form |
| 272 | and a general form. |
| 273 | --> |
| 274 | <para>APT 設定ファイルを使うと、 |
| 275 | システム管理者が優先度を割り当てられるようになります。 |
| 276 | ファイルは、空白行で区切られた、複数行からなるレコードで構成されています。 |
| 277 | レコードは特定形式か、汎用形式のどちらかの形式をとります。 |
| 278 | <itemizedlist> |
| 279 | <listitem> |
| 280 | <!-- |
| 281 | <simpara>The specific form assigns a priority (a "Pin-Priority") to a |
| 282 | specified package and specified version or version range. For example, |
| 283 | the following record assigns a high priority to all versions of |
| 284 | the <filename>perl</filename> package whose version number begins with "<literal>5.8</literal>".</simpara> |
| 285 | --> |
| 286 | <simpara>特定形式は、優先度 ("Pin-Priority") を、 |
| 287 | 指定したパッケージの指定したバージョン (範囲) について割り当てます。 |
| 288 | 例えば以下のレコードは、 |
| 289 | "<literal>5.8</literal>" で始まる <filename>perl</filename> パッケージを、 |
| 290 | 高い優先度に設定します。</simpara> |
| 291 | |
| 292 | <programlisting> |
| 293 | Package: perl |
| 294 | Pin: version 5.8* |
| 295 | Pin-Priority: 1001 |
| 296 | </programlisting> |
| 297 | </listitem> |
| 298 | |
| 299 | <!-- |
| 300 | <listitem><simpara>The general form assigns a priority to all of the package versions in a |
| 301 | given distribution (that is, to all the versions of packages that are |
| 302 | listed in a certain <filename>Release</filename> file) or to all of the package |
| 303 | versions coming from a particular Internet site, as identified by the |
| 304 | site's fully qualified domain name.</simpara> |
| 305 | --> |
| 306 | <listitem><simpara>汎用形式は、与えられたディストリビューションにある、 |
| 307 | すべてのパッケージ (<filename>Release</filename> ファイルに列挙したパッケージ) |
| 308 | の優先度や、FQDNで指定した、 |
| 309 | 特定のインターネットサイトから取得するパッケージの優先度を割り当てます。</simpara> |
| 310 | |
| 311 | <!-- |
| 312 | <simpara>This general-form entry in the APT preferences file applies only |
| 313 | to groups of packages. For example, the following record assigns a high |
| 314 | priority to all package versions available from the local site.</simpara> |
| 315 | --> |
| 316 | <simpara>APT 設定ファイルに書かれている汎用形式のエントリは、 |
| 317 | パッケージのグループについてのみ適用されます。 |
| 318 | 例えば以下のレコードは、ローカルサイトにある全パッケージについて、 |
| 319 | 高い優先度を割り当てます。</simpara> |
| 320 | |
| 321 | <programlisting> |
| 322 | Package: * |
| 323 | Pin: origin "" |
| 324 | Pin-Priority: 999 |
| 325 | </programlisting> |
| 326 | |
| 327 | <!-- |
| 328 | <simpara>A note of caution: the keyword used here is "<literal>origin</literal>". |
| 329 | This should not be confused with the Origin of a distribution as |
| 330 | specified in a <filename>Release</filename> file. What follows the "Origin:" tag |
| 331 | in a <filename>Release</filename> file is not an Internet address |
| 332 | but an author or vendor name, such as "Debian" or "Ximian".</simpara> |
| 333 | --> |
| 334 | <simpara>注: ここで使用しているキーワードは "<literal>origin</literal>" です。 |
| 335 | <filename>Release</filename> ファイルに指定されたような、 |
| 336 | ディストリビューションの Origin と混同しないようにしてください。 |
| 337 | <filename>Release</filename> ファイルにある "Origin:" タグは、 |
| 338 | インターネットアドレスではなく、 |
| 339 | "Debian" や "Ximian" といった作者やベンダ名です。</simpara> |
| 340 | |
| 341 | <!-- |
| 342 | <simpara>The following record assigns a low priority to all package versions |
| 343 | belonging to any distribution whose Archive name is "<literal>unstable</literal>".</simpara> |
| 344 | --> |
| 345 | <simpara>以下のレコードは、アーカイブ名が "<literal>unstable</literal>" |
| 346 | となっているディストリビューションに属するパッケージを、 |
| 347 | すべて低い優先度に割り当てます。</simpara> |
| 348 | |
| 349 | <programlisting> |
| 350 | Package: * |
| 351 | Pin: release a=unstable |
| 352 | Pin-Priority: 50 |
| 353 | </programlisting> |
| 354 | |
| 355 | <!-- |
| 356 | <simpara>The following record assigns a high priority to all package versions |
| 357 | belonging to any release whose Archive name is "<literal>stable</literal>" |
| 358 | and whose release Version number is "<literal>3.0</literal>".</simpara> |
| 359 | --> |
| 360 | <simpara>以下のレコードは、アーカイブ名が "<literal>stable</literal>" で、 |
| 361 | リリースバージョン番号が "<literal>3.0</literal>" |
| 362 | となっているリリースに属するパッケージを、 |
| 363 | すべて高い優先度に割り当てます。</simpara> |
| 364 | |
| 365 | <programlisting> |
| 366 | Package: * |
| 367 | Pin: release a=stable, v=3.0 |
| 368 | Pin-Priority: 500 |
| 369 | </programlisting> |
| 370 | </listitem> |
| 371 | </itemizedlist> |
| 372 | </para> |
| 373 | |
| 374 | </refsect2> |
| 375 | |
| 376 | <refsect2> |
| 377 | <!-- |
| 378 | <title>How APT Interprets Priorities</title> |
| 379 | --> |
| 380 | <title>APT が優先度に割り込む方法</title> |
| 381 | |
| 382 | <para> |
| 383 | <!-- |
| 384 | Priorities (P) assigned in the APT preferences file must be positive |
| 385 | or negative integers. They are interpreted as follows (roughly speaking): |
| 386 | --> |
| 387 | APT 設定ファイルで割り当てた優先度 (P) は、正負の整数でなくてはなりません。 |
| 388 | これは (おおざっぱにいうと) 以下のように解釈されます。 |
| 389 | |
| 390 | <variablelist> |
| 391 | <varlistentry> |
| 392 | <term>P > 1000</term> |
| 393 | <!-- |
| 394 | <listitem><simpara>causes a version to be installed even if this |
| 395 | constitutes a downgrade of the package</simpara></listitem> |
| 396 | --> |
| 397 | <listitem><simpara>パッケージがダウングレードしても、このバージョンのパッケージをインストールします。</simpara></listitem> |
| 398 | </varlistentry> |
| 399 | <varlistentry> |
| 400 | <term>990 < P <=1000</term> |
| 401 | <!-- |
| 402 | <listitem><simpara>causes a version to be installed |
| 403 | even if it does not come from the target release, |
| 404 | unless the installed version is more recent</simpara></listitem> |
| 405 | --> |
| 406 | <listitem><simpara>インストールされているバージョンの方が新しいことを除き、 |
| 407 | ターゲットリリースに含まれなくても、 |
| 408 | このバージョンのパッケージをインストールします。</simpara></listitem> |
| 409 | </varlistentry> |
| 410 | <varlistentry> |
| 411 | <term>500 < P <=990</term> |
| 412 | <!-- |
| 413 | <listitem><simpara>causes a version to be installed |
| 414 | unless there is a version available belonging to the target release |
| 415 | or the installed version is more recent</simpara></listitem> |
| 416 | --> |
| 417 | <listitem><simpara>ターゲットリリースに属するバージョンがあったり、 |
| 418 | インストールされているバージョンの方が新しいのでなければ、 |
| 419 | このバージョンのパッケージをインストールします。</simpara></listitem> |
| 420 | </varlistentry> |
| 421 | <varlistentry> |
| 422 | <term>100 < P <=500</term> |
| 423 | <!-- |
| 424 | <listitem><simpara>causes a version to be installed |
| 425 | unless there is a version available belonging to some other |
| 426 | distribution or the installed version is more recent</simpara></listitem> |
| 427 | --> |
| 428 | <listitem><simpara>他のディストリビューションに属するバージョンがあったり、 |
| 429 | インストールされているバージョンの方が新しいのでなければ、 |
| 430 | このバージョンのパッケージをインストールします。</simpara></listitem> |
| 431 | </varlistentry> |
| 432 | <varlistentry> |
| 433 | <term>0 < P <=100</term> |
| 434 | <!-- |
| 435 | <listitem><simpara>causes a version to be installed |
| 436 | only if there is no installed version of the package</simpara></listitem> |
| 437 | --> |
| 438 | <listitem><simpara>このパッケージがインストールされていない場合、 |
| 439 | このバージョンのパッケージをインストールします。</simpara></listitem> |
| 440 | </varlistentry> |
| 441 | <varlistentry> |
| 442 | <term>P < 0</term> |
| 443 | <!-- |
| 444 | <listitem><simpara>prevents the version from being installed</simpara></listitem> |
| 445 | --> |
| 446 | <listitem><simpara>このバージョンがインストールされないようにします。</simpara></listitem> |
| 447 | </varlistentry> |
| 448 | </variablelist> |
| 449 | </para> |
| 450 | |
| 451 | <!-- |
| 452 | <para>If any specific-form records match an available package version then the |
| 453 | first such record determines the priority of the package version. |
| 454 | Failing that, |
| 455 | if any general-form records match an available package version then the |
| 456 | first such record determines the priority of the package version.</para> |
| 457 | --> |
| 458 | <para>特定形式のレコードが利用可能パッケージバージョンに一致した場合、 |
| 459 | 最初のレコードが、パッケージバージョンの優先度を決定します。 |
| 460 | 失敗して、汎用形式のレコードが利用可能パッケージバージョンに一致した場合、 |
| 461 | 最初のレコードが、パッケージバージョンの優先度を決定します。</para> |
| 462 | |
| 463 | <!-- |
| 464 | <para>For example, suppose the APT preferences file contains the three |
| 465 | records presented earlier:</para> |
| 466 | --> |
| 467 | <para>例えば、APT 設定ファイルの上の方に、 |
| 468 | 以下のレコードが書かれていると仮定してください。</para> |
| 469 | |
| 470 | <programlisting> |
| 471 | Package: perl |
| 472 | Pin: version 5.8* |
| 473 | Pin-Priority: 1001 |
| 474 | |
| 475 | Package: * |
| 476 | Pin: origin "" |
| 477 | Pin-Priority: 999 |
| 478 | |
| 479 | Package: * |
| 480 | Pin: release unstable |
| 481 | Pin-Priority: 50 |
| 482 | </programlisting> |
| 483 | |
| 484 | <!-- |
| 485 | <para>Then: |
| 486 | --> |
| 487 | <para>すると、 |
| 488 | <itemizedlist> |
| 489 | <!-- |
| 490 | <listitem><simpara>The most recent available version of the <literal>perl</literal> |
| 491 | package will be installed, so long as that version's version number begins |
| 492 | with "<literal>5.8</literal>". If <emphasis>any</emphasis> 5.8* version of <literal>perl</literal> is |
| 493 | available and the installed version is 5.9*, then <literal>perl</literal> will be |
| 494 | downgraded.</simpara></listitem> |
| 495 | --> |
| 496 | <listitem><simpara>バージョン番号が "<literal>5.8</literal>" で始まっていれば、 |
| 497 | <literal>perl</literal> の最新の利用可能パッケージがインストールされます。 |
| 498 | バージョン 5.8* が利用可能で、バージョン 5.9* がインストールされている場合、 |
| 499 | <literal>perl</literal> はダウングレードされます。</simpara></listitem> |
| 500 | <!-- |
| 501 | <listitem><simpara>A version of any package other than <literal>perl</literal> |
| 502 | that is available from the local system has priority over other versions, |
| 503 | even versions belonging to the target release. |
| 504 | </simpara></listitem> |
| 505 | --> |
| 506 | <listitem><simpara>ローカルシステムで有効な、 |
| 507 | <literal>perl</literal> 以外のどんなパッケージでも、 |
| 508 | 他のバージョンより (たとえターゲットリリースに属していても) 優先度が高くなります。 |
| 509 | </simpara></listitem> |
| 510 | <!-- |
| 511 | <listitem><simpara>A version of a package whose origin is not the local |
| 512 | system but some other site listed in &sources-list; and which belongs to |
| 513 | an <literal>unstable</literal> distribution is only installed if it is selected |
| 514 | for installation and no version of the package is already installed. |
| 515 | </simpara></listitem> |
| 516 | --> |
| 517 | <listitem><simpara>ローカルシステムにはなくても &sources-list; |
| 518 | に列挙されたサイトにあるバージョンで、 |
| 519 | <literal>unstable</literal> ディストリビューションに属しているパッケージは、 |
| 520 | インストールするよう選択され、 |
| 521 | 既にインストールされているバージョンがない場合にのみインストールされます。 |
| 522 | </simpara></listitem> |
| 523 | </itemizedlist> |
| 524 | </para> |
| 525 | </refsect2> |
| 526 | |
| 527 | <refsect2> |
| 528 | <!-- |
| 529 | <title>Determination of Package Version and Distribution Properties</title> |
| 530 | --> |
| 531 | <title>パッケージのバージョンとディストリビューションプロパティの決定</title> |
| 532 | |
| 533 | <!-- |
| 534 | <para>The locations listed in the &sources-list; file should provide |
| 535 | <filename>Packages</filename> and <filename>Release</filename> files |
| 536 | to describe the packages available at that location. </para> |
| 537 | --> |
| 538 | <para>&sources-list; ファイルに列挙した場所では、 |
| 539 | その場所で利用できるパッケージを記述した、 |
| 540 | <filename>Packages</filename> ファイルや |
| 541 | <filename>Release</filename> ファイルを提供します。</para> |
| 542 | |
| 543 | <!-- |
| 544 | <para>The <filename>Packages</filename> file is normally found in the directory |
| 545 | <filename>.../dists/<replaceable>dist-name</replaceable>/<replaceable>component</replaceable>/<replaceable>arch</replaceable></filename>: |
| 546 | for example, <filename>.../dists/stable/main/binary-i386/Packages</filename>. |
| 547 | It consists of a series of multi-line records, one for each package available |
| 548 | in that directory. Only two lines in each record are relevant for setting |
| 549 | APT priorities: |
| 550 | --> |
| 551 | <para><filename>Packages</filename> ファイルは通常 |
| 552 | <filename>.../dists/<replaceable>dist-name</replaceable>/<replaceable>component</replaceable>/<replaceable>arch</replaceable></filename> |
| 553 | ディレクトリにあります。 |
| 554 | 例えば、<filename>.../dists/stable/main/binary-i386/Packages</filename> です。 |
| 555 | これは、ディレクトリにある利用可能パッケージごとに、 |
| 556 | 複数行のレコードからできています。 |
| 557 | APT 優先度の設定は、レコードごとに以下の 2 行だけです。 |
| 558 | <variablelist> |
| 559 | <varlistentry> |
| 560 | <!-- |
| 561 | <term>the <literal>Package:</literal> line</term> |
| 562 | <listitem><simpara>gives the package name</simpara></listitem> |
| 563 | --> |
| 564 | <term><literal>Package:</literal> 行</term> |
| 565 | <listitem><simpara>パッケージ名を与えます。</simpara></listitem> |
| 566 | </varlistentry> |
| 567 | <varlistentry> |
| 568 | <!-- |
| 569 | <term>the <literal>Version:</literal> line</term> |
| 570 | <listitem><simpara>gives the version number for the named package</simpara></listitem> |
| 571 | --> |
| 572 | <term><literal>Version:</literal> 行</term> |
| 573 | <listitem><simpara>その名前のパッケージのバージョン番号を与えます。</simpara></listitem> |
| 574 | </varlistentry> |
| 575 | </variablelist> |
| 576 | </para> |
| 577 | |
| 578 | <!-- |
| 579 | <para>The <filename>Release</filename> file is normally found in the directory |
| 580 | <filename>.../dists/<replaceable>dist-name</replaceable></filename>: |
| 581 | for example, <filename>.../dists/stable/Release</filename>, |
| 582 | or <filename>.../dists/woody/Release</filename>. |
| 583 | It consists of a single multi-line record which applies to <emphasis>all</emphasis> of |
| 584 | the packages in the directory tree below its parent. Unlike the |
| 585 | <filename>Packages</filename> file, nearly all of the lines in a <filename>Release</filename> |
| 586 | file are relevant for setting APT priorities: |
| 587 | --> |
| 588 | <para><filename>Release</filename> ファイルは、通常 |
| 589 | <filename>.../dists/<replaceable>dist-name</replaceable></filename> |
| 590 | にあります。例えば、 |
| 591 | <filename>.../dists/stable/Release</filename>, |
| 592 | <filename>.../dists/woody/Release</filename> です。 |
| 593 | これは、このディレクトリ以下にある<emphasis>全</emphasis>パッケージに適用する、 |
| 594 | 複数行のレコード 1 つから成っています。 |
| 595 | <filename>Packages</filename> と違い <filename>Release</filename> ファイルは、 |
| 596 | ほとんどの行が APT 優先度の設定に関連します。 |
| 597 | |
| 598 | <variablelist> |
| 599 | <varlistentry> |
| 600 | <!-- |
| 601 | <term>the <literal>Archive:</literal> line</term> |
| 602 | --> |
| 603 | <term><literal>Archive:</literal> 行</term> |
| 604 | <!-- |
| 605 | <listitem><simpara>names the archive to which all the packages |
| 606 | in the directory tree belong. For example, the line |
| 607 | "Archive: stable" |
| 608 | specifies that all of the packages in the directory |
| 609 | tree below the parent of the <filename>Release</filename> file are in a |
| 610 | <literal>stable</literal> archive. Specifying this value in the APT preferences file |
| 611 | would require the line: |
| 612 | --> |
| 613 | <listitem><simpara>このディレクトリツリーに属する全パッケージのアーカイブ名。 |
| 614 | 例えば、 |
| 615 | "Archive: stable" |
| 616 | という行は、<filename>Release</filename> ファイルの親ディレクトリツリー以下にある全パッケージが、 |
| 617 | <literal>stable</literal> アーカイブだと指定します。 |
| 618 | APT 設定ファイルでこの値を指定するには、以下の行が必要になります。 |
| 619 | </simpara> |
| 620 | <programlisting> |
| 621 | Pin: release a=stable |
| 622 | </programlisting> |
| 623 | </listitem> |
| 624 | </varlistentry> |
| 625 | |
| 626 | <varlistentry> |
| 627 | <!-- |
| 628 | <term>the <literal>Version:</literal> line</term> |
| 629 | --> |
| 630 | <term><literal>Version:</literal> 行</term> |
| 631 | <!-- |
| 632 | <listitem><simpara>names the release version. For example, the |
| 633 | packages in the tree might belong to Debian GNU/Linux release |
| 634 | version 3.0. Note that there is normally no version number for the |
| 635 | <literal>testing</literal> and <literal>unstable</literal> distributions because they |
| 636 | have not been released yet. Specifying this in the APT preferences |
| 637 | file would require one of the following lines. |
| 638 | --> |
| 639 | <listitem><simpara>リリースバージョン名。 |
| 640 | 例えば、このツリーのパッケージが、 |
| 641 | GNU/Linux リリースバージョン 3.0 に属するとします。 |
| 642 | 通常 <literal>testing</literal> ディストリビューションや |
| 643 | <literal>unstable</literal> ディストリビューションには、 |
| 644 | まだリリースされていないので、バージョン番号が付きません。 |
| 645 | APT 設定ファイルでこれを指定するには、以下の行のいずれかが必要になります。 |
| 646 | </simpara> |
| 647 | |
| 648 | <programlisting> |
| 649 | Pin: release v=3.0 |
| 650 | Pin: release a=stable, v=3.0 |
| 651 | Pin: release 3.0 |
| 652 | </programlisting> |
| 653 | |
| 654 | </listitem> |
| 655 | </varlistentry> |
| 656 | |
| 657 | <varlistentry> |
| 658 | <!-- |
| 659 | <term>the <literal>Component:</literal> line</term> |
| 660 | --> |
| 661 | <term><literal>Component:</literal> 行</term> |
| 662 | <!-- |
| 663 | <listitem><simpara>names the licensing component associated with the |
| 664 | packages in the directory tree of the <filename>Release</filename> file. |
| 665 | For example, the line "Component: main" specifies that |
| 666 | all the packages in the directory tree are from the <literal>main</literal> |
| 667 | component, which entails that they are licensed under terms listed |
| 668 | in the Debian Free Software Guidelines. Specifying this component |
| 669 | in the APT preferences file would require the line: |
| 670 | --> |
| 671 | <listitem><simpara><filename>Release</filename> ファイルの、 |
| 672 | ディレクトリツリーにあるパッケージのライセンスコンポーネント名。 |
| 673 | 例えば、"Component: main" という行は、このディレクトリ以下の全ファイルが、 |
| 674 | <literal>main</literal> コンポーネント |
| 675 | (Debian フリーソフトウェアガイドラインの元でライセンスされている) |
| 676 | であることを表します。 |
| 677 | APT 設定ファイルでこのコンポーネントを指定するには、以下の行が必要になります。 |
| 678 | </simpara> |
| 679 | <programlisting> |
| 680 | Pin: release c=main |
| 681 | </programlisting> |
| 682 | </listitem> |
| 683 | </varlistentry> |
| 684 | |
| 685 | <varlistentry> |
| 686 | <!-- |
| 687 | <term>the <literal>Origin:</literal> line</term> |
| 688 | --> |
| 689 | <term><literal>Origin:</literal> 行</term> |
| 690 | <!-- |
| 691 | <listitem><simpara>names the originator of the packages in the |
| 692 | directory tree of the <filename>Release</filename> file. Most commonly, this is |
| 693 | <literal>Debian</literal>. Specifying this origin in the APT preferences file |
| 694 | would require the line: |
| 695 | --> |
| 696 | <listitem><simpara><filename>Release</filename> ファイルのディレクトリツリーにあるパッケージの提供者名。 |
| 697 | ほとんど共通で、<literal>Debian</literal> です。 |
| 698 | APT 設定ファイルでこの提供者を指定するには、以下の行が必要になります。 |
| 699 | </simpara> |
| 700 | <programlisting> |
| 701 | Pin: release o=Debian |
| 702 | </programlisting> |
| 703 | </listitem> |
| 704 | </varlistentry> |
| 705 | |
| 706 | <varlistentry> |
| 707 | <!-- |
| 708 | <term>the <literal>Label:</literal> line</term> |
| 709 | --> |
| 710 | <term><literal>Label:</literal> 行</term> |
| 711 | <!-- |
| 712 | <listitem><simpara>names the label of the packages in the directory tree |
| 713 | of the <filename>Release</filename> file. Most commonly, this is |
| 714 | <literal>Debian</literal>. Specifying this label in the APT preferences file |
| 715 | would require the line: |
| 716 | --> |
| 717 | <listitem><simpara><filename>Release</filename> ファイルのディレクトリツリーにあるパッケージのラベル名。 |
| 718 | ほとんど共通で <literal>Debian</literal> です。 |
| 719 | APT 設定ファイルでこのラベルを指定するには、以下の行が必要になります。 |
| 720 | </simpara> |
| 721 | <programlisting> |
| 722 | Pin: release l=Debian |
| 723 | </programlisting> |
| 724 | </listitem> |
| 725 | </varlistentry> |
| 726 | </variablelist> |
| 727 | </para> |
| 728 | |
| 729 | <!-- |
| 730 | <para>All of the <filename>Packages</filename> and <filename>Release</filename> |
| 731 | files retrieved from locations listed in the &sources-list; file are stored |
| 732 | in the directory <filename>/var/lib/apt/lists</filename>, or in the file named |
| 733 | by the variable <literal>Dir::State::Lists</literal> in the <filename>apt.conf</filename> file. |
| 734 | For example, the file |
| 735 | <filename>debian.lcs.mit.edu_debian_dists_unstable_contrib_binary-i386_Release</filename> |
| 736 | contains the <filename>Release</filename> file retrieved from the site |
| 737 | <literal>debian.lcs.mit.edu</literal> for <literal>binary-i386</literal> architecture |
| 738 | files from the <literal>contrib</literal> component of the <literal>unstable</literal> |
| 739 | distribution.</para> |
| 740 | --> |
| 741 | <para>&sources-list; ファイルに列挙された場所から取得した |
| 742 | <filename>Packages</filename> ファイルや |
| 743 | <filename>Release</filename> ファイルはすべて、 |
| 744 | <filename>/var/lib/apt/lists</filename> ディレクトリや、 |
| 745 | <filename>apt.conf</filename> ファイルの |
| 746 | <literal>Dir::State::Lists</literal> 変数で指定した場所に取得されます。例えば、 |
| 747 | <filename>debian.lcs.mit.edu_debian_dists_unstable_contrib_binary-i386_Release</filename> ファイルは、 |
| 748 | <literal>debian.lcs.mit.edu</literal> から取得した、 |
| 749 | <literal>unstable</literal> ディストリビューションで、 |
| 750 | <literal>contrib</literal> コンポーネントな、 |
| 751 | <literal>binary-i386</literal> アーキテクチャ用の |
| 752 | <filename>Release</filename> ファイルを含んでいます。</para> |
| 753 | </refsect2> |
| 754 | |
| 755 | <refsect2> |
| 756 | <!-- |
| 757 | <title>Optional Lines in an APT Preferences Record</title> |
| 758 | --> |
| 759 | <title>APT 設定レコードのオプション行</title> |
| 760 | |
| 761 | <!-- |
| 762 | <para>Each record in the APT preferences file can optionally begin with |
| 763 | one or more lines beginning with the word <literal>Explanation:</literal>. |
| 764 | This provides a place for comments.</para> |
| 765 | --> |
| 766 | <para>APT 設定ファイルのレコードごとに、 |
| 767 | 任意で <literal>Explanation:</literal> で始まる行を持てます。 |
| 768 | これは、コメント用の場所を確保します。</para> |
| 769 | |
| 770 | <!-- |
| 771 | <para>The <literal>Pin-Priority:</literal> line in each APT preferences record is |
| 772 | optional. If omitted, APT assigs a priority of 1 less than the last value |
| 773 | specified on a line beginning with <literal>Pin-Priority: release ...</literal>.</para> |
| 774 | --> |
| 775 | <para>APT 設定レコードの <literal>Pin-Priority:</literal> 行は任意です。 |
| 776 | 省略すると、<literal>Pin-Priority: release ...</literal> |
| 777 | で始まる行で指示した最後の値 (少なくとも1つ) を優先度に割り当てます。</para> |
| 778 | </refsect2> |
| 779 | </refsect1> |
| 780 | |
| 781 | <refsect1> |
| 782 | <!-- |
| 783 | <title>Examples</title> |
| 784 | --> |
| 785 | <title>サンプル</title> |
| 786 | <refsect2> |
| 787 | <!-- |
| 788 | <title>Tracking Stable</title> |
| 789 | --> |
| 790 | <title>安定版を追跡</title> |
| 791 | |
| 792 | <!-- |
| 793 | <para>The following APT preferences file will cause APT to assign a |
| 794 | priority higher than the default (500) to all package versions belonging |
| 795 | to a <literal>stable</literal> distribution and a prohibitively low priority to |
| 796 | package versions belonging to other <literal>Debian</literal> distributions. |
| 797 | --> |
| 798 | <para>以下の APT 設定ファイルは、<literal>stable</literal> |
| 799 | ディストリビューションに属する全てのパッケージのバージョンに、 |
| 800 | デフォルト (500) より高い優先度を割り当て、 |
| 801 | 他の <literal>Debian</literal> |
| 802 | ディストリビューションのパッケージのバージョンには、 |
| 803 | 低くてインストールできないような優先度を割り当てます。 |
| 804 | |
| 805 | <programlisting> |
| 806 | Explanation: Uninstall or do not install any Debian-originated |
| 807 | Explanation: package versions other than those in the stable distro |
| 808 | Package: * |
| 809 | Pin: release a=stable |
| 810 | Pin-Priority: 900 |
| 811 | |
| 812 | Package: * |
| 813 | Pin: release o=Debian |
| 814 | Pin-Priority: -10 |
| 815 | </programlisting> |
| 816 | </para> |
| 817 | |
| 818 | <!-- |
| 819 | <para>With a suitable &sources-list; file and the above preferences file, |
| 820 | any of the following commands will cause APT to upgrade to the |
| 821 | latest <literal>stable</literal> version(s). |
| 822 | --> |
| 823 | <para>適切な &sources-list; ファイルと上記の設定ファイルにより、 |
| 824 | 以下のコマンドで最新の <literal>stable</literal> |
| 825 | バージョンにアップグレードできます。 |
| 826 | |
| 827 | <programlisting> |
| 828 | apt-get install <replaceable>package-name</replaceable> |
| 829 | apt-get upgrade |
| 830 | apt-get dist-upgrade |
| 831 | </programlisting> |
| 832 | </para> |
| 833 | |
| 834 | <!-- |
| 835 | <para>The following command will cause APT to upgrade the specified |
| 836 | package to the latest version from the <literal>testing</literal> distribution; |
| 837 | the package will not be upgraded again unless this command is given |
| 838 | again. |
| 839 | --> |
| 840 | <para>以下のコマンドで、指定したパッケージを <literal>testing</literal> |
| 841 | ディストリビューションの最新バージョンにアップグレードします。 |
| 842 | このパッケージは、再度このコマンドを発行しないとアップグレードされません。 |
| 843 | |
| 844 | <programlisting> |
| 845 | apt-get install <replaceable>package</replaceable>/testing |
| 846 | </programlisting> |
| 847 | </para> |
| 848 | </refsect2> |
| 849 | |
| 850 | <refsect2> |
| 851 | <!-- |
| 852 | <title>Tracking Testing or Unstable</title> |
| 853 | --> |
| 854 | <title>テスト版や不安定版を追跡</title> |
| 855 | |
| 856 | <!-- |
| 857 | <para>The following APT preferences file will cause APT to assign |
| 858 | a high priority to package versions from the <literal>testing</literal> |
| 859 | distribution, a lower priority to package versions from the |
| 860 | <literal>unstable</literal> distribution, and a prohibitively low priority |
| 861 | to package versions from other <literal>Debian</literal> distributions. |
| 862 | --> |
| 863 | <para>以下の APT 設定ファイルは、<literal>testing</literal> |
| 864 | ディストリビューションのパッケージのバージョンに高い優先度を割り当て、 |
| 865 | <literal>unstable</literal> |
| 866 | ディストリビューションのパッケージのバージョンには低い優先度を割り当てます。 |
| 867 | また他の <literal>Debian</literal> |
| 868 | ディストリビューションのパッケージのバージョンには、 |
| 869 | 低くてインストールできないような優先度を割り当てます。 |
| 870 | |
| 871 | <programlisting> |
| 872 | Package: * |
| 873 | Pin: release a=testing |
| 874 | Pin-Priority: 900 |
| 875 | |
| 876 | Package: * |
| 877 | Pin: release a=unstable |
| 878 | Pin-Priority: 800 |
| 879 | |
| 880 | Package: * |
| 881 | Pin: release o=Debian |
| 882 | Pin-Priority: -10 |
| 883 | </programlisting> |
| 884 | </para> |
| 885 | |
| 886 | <!-- |
| 887 | <para>With a suitable &sources-list; file and the above preferences file, |
| 888 | any of the following commands will cause APT to upgrade to the latest |
| 889 | <literal>testing</literal> version(s). |
| 890 | --> |
| 891 | <para>適切な &sources-list; ファイルと上記の設定ファイルにより、 |
| 892 | 以下のコマンドで最新の <literal>testing</literal> |
| 893 | バージョンにアップグレードできます。 |
| 894 | |
| 895 | <programlisting> |
| 896 | apt-get install <replaceable>package-name</replaceable> |
| 897 | apt-get upgrade |
| 898 | apt-get dist-upgrade |
| 899 | </programlisting> |
| 900 | </para> |
| 901 | |
| 902 | <!-- |
| 903 | <para>The following command will cause APT to upgrade the specified |
| 904 | package to the latest version from the <literal>unstable</literal> distribution. |
| 905 | Thereafter, <command>apt-get upgrade</command> will upgrade |
| 906 | the package to the most recent <literal>testing</literal> version if that is |
| 907 | more recent than the installed version, otherwise, to the most recent |
| 908 | <literal>unstable</literal> version if that is more recent than the installed |
| 909 | version. |
| 910 | --> |
| 911 | <para>以下のコマンドで、指定したパッケージを <literal>unstable</literal> |
| 912 | ディストリビューションの最新バージョンにアップグレードします。 |
| 913 | それ以降、<command>apt-get upgrade</command> は |
| 914 | <literal>testing</literal> バージョンのパッケージが更新されていれば |
| 915 | <literal>testing</literal> の最新版に、 |
| 916 | <literal>unstable</literal> バージョンのパッケージが更新されていれば |
| 917 | <literal>unstable</literal>の最新版にアップグレードします。 |
| 918 | |
| 919 | <programlisting> |
| 920 | apt-get install <replaceable>package</replaceable>/unstable |
| 921 | </programlisting> |
| 922 | </para> |
| 923 | |
| 924 | </refsect2> |
| 925 | </refsect1> |
| 926 | |
| 927 | <refsect1> |
| 928 | <!-- |
| 929 | <title>See Also</title> |
| 930 | --> |
| 931 | <title>関連項目</title> |
| 932 | <para>&apt-get; &apt-cache; &apt-conf; &sources-list; |
| 933 | </para> |
| 934 | </refsect1> |
| 935 | |
| 936 | &manbugs; |
| 937 | &translator; |
| 938 | |
| 939 | </refentry> |
| 940 | |