[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packaging Manual ch8, ch-relationships



芳尾です。
小島さん、査読ありがとうございます。

8章の関連性の宣言の部分の、 8.1 に関してです。
小島さんが、????? を付けていた部分はコメントにして残してあります。
私がそれに関して何らかの対処をしたときは、
----- でコメントをつけてあります。

たとえば、こんな具合です。

<!-- 
????? いまひとつ日本語がこなれてないのですが、代案だせませんでした。
----- 上述のように してみました。
--> 

よろしければ、査読お願いします。

あと、設定と構築についてですが、「設定」だと人間がいじるファイルを
いじった場合( ppp.chatscript )のようなもの、「構築」は人間がいじらなく
てもシステムがやってくれる設定 ( etc/cron/cron.weekly みたいなよなもの) 
と分けていました。が、統一しても特に問題なさそうなので、「設定」に統一
しました。

ではでは。 ---- Yours, K.S.Yoshio
                mailto:shishamo@xxxxxxxxxxxxxxx
                http://www2.osk.3web.ne.jp/~shishamo
Key fingerprint = 3C 3C 1C E6 B1 65 53 58  A3 B3 6A ED BA E4 54 52




From: mkojima@xxxxxxxxxxxx (Motoyasu KOJIMA)
Subject: Re: 
Date: Tue, 5 May 1998 23:33:10 +0900
Message-ID: <199805051430.XAA21521@xxxxxxxxxxxxxxxxxxxxxxxx>

> 小島基靖と申します。
> 
> >> 芳尾です。
> >> Packaging Manual の 8 章が訳しおわりました。
> 
> 8.1 だけ読み終りました。言い回しをかなり変えてあります。
> よければ使ってください。
> 
> configure の訳がばらばらだったので 「設定」で統一してあります。
> ????? は、訳の意味がとれず、原文もうまく訳せなかったところです。
> あと、--auto-deconfigure のところ、理解不足のためか、どうも意味がとおらないです。
> 

<html><head>
<title>Debian packaging manual - パッケージ間の関連性の宣言</title>
<link rev=made href="mailto:ijackson@xxxxxxxxxxxxxx";>
</head><body>
<h1>
Debian packaging manual - 第 8 章<br>
パッケージ間の関連性の宣言
</h1>

<!--
Packages can declare in their control file that they have certain
relationships to other packages - for example, that they may not be
installed at the same time as certain other packages, and/or that they
depend on the presence of others, or that they should overwrite files
in certain other packages if present.<P>
-->

パッケージは、コントロールファイル中に他のパッケージとの関連性について宣
言することができます。例えば、あるパッケージと同じタイミングでインストー
ルすることが許されていないパッケージや、また、あるパッケージがきちんとイ
ンストールされていなければインストールできないパッケージ、またはあるパッ
ケージがインストールされているとき、そのファイルを上書きするパッケージな
どがあります。<p>

<!--
 This is done using the <code>Depends</code>, <code>Recommends</code>, <code>Suggests</code>,
<code>Conflicts</code>, <code>Provides</code> and <code>Replaces</code> control file fields.<P>
 -->

この宣言には、コントロールファイルの <code>Depends</code> と
<code>Recommends</code>、<code>Suggests</code>、<code>Conflicts</code>、
<code>Provides</code>、<code>Replaces</code> フィールドを使用します。<p>
<hr>
<h2><A name="s-depsyntax">
<!-- 
8.1 Syntax of relationship fields
--> 
8.1 関係性フィールドの書式
</A></h2>

<!--
These fields all have a uniform syntax.  They are a list of package
names separated by commas.<P>
 -->

これ 関連性フィールドはすべて同一書式です。このフィールドは、コンマで区切った
 パッケージ名のリストです。<p> 

<!--
In <code>Depends</code>, <code>Recommends</code>, <code>Suggests</code> and <code>Pre-Depends</code>
(the fields which declare dependencies of the package in which they
occur on other packages) these package names may also be lists of
alternative package names, separated by vertical bar symbols <code>|</code>
(pipe symbols).<P>
 -->


<code>Depends</code>や<code>Recommends</code>、 <code>Suggests</code>、
<code>Pre-Depends</code>
(他のパッケージに依存関係がある場合に宣言するフィールド)の各フィールド内の
パッケージ名には、代替パッケージ名のリストを書くこともできます。
代替パッケージ名は、<code>|</code> (パイプシンボル)で区切って書きます。
<p>

<!--
All the fields except <code>Provides</code> may restrict their applicability
to particular versions of each named package.  This is done in
parentheses after each individual package name; the parentheses should
contain a relation from the list below followed by a version number,
in the format described in <A href="ch-versions.html">Version numbering,
chapter 5</A>.<P>
 -->

<code>Provides</code>以外のすべてのフィールドでは、パッケージ名ごとに
そのバージョンを指定することができます。
この場合、パッケージ名の後に括弧を続け、その中にバージョン番号を記述し
ます。 括弧内には、<A
href="ch-versions.html">Version numbering, chapter 5</A>の書式に従った
バージョン番号との関係を記します。<p>

<!--
The relations allowed are
<code>&lt;&lt;</code>,
<code>&lt;=</code>,
<code>=</code>,
<code>&gt;=</code> and
<code>&gt;&gt;</code>
for strictly earlier, earlier or equal, exactly equal, later or equal
and strictly later, respectively.  The forms <code>&lt;</code> and <code>&gt;</code>
were used to mean earlier/later or equal, rather than strictly
earlier/later, so they should not appear in new packages (though
<kbd>dpkg</kbd> still supports them).<P>
 -->


バージョン番号の関係を示すために使用する記号は、<code>&lt;&lt;</code>と
<code>&lt;=</code>, <code>=</code>, <code>&gt;=</code>、
<code>&gt;&gt;</code>です。それぞれ、順番に「全く小さい」「小さいか等し
い」「全く同じ」「等しいか大きい」「全く大きい」を意味しています。記号
<code>&lt;</code> と <code>&gt;</code> は「小さいか等しい」「等しいか大
きい」という意味をもちます。「全く小さい」または「全く大きい」という意味
ではありません。新しいパッケージでは、<code>&lt;</code> 、 
<code>&gt;</code> は使用しません。(いちおう<kbd>dpkg</kbd>はまだこの書式
をサポートしていますけど)。
 <p>

<!--
Whitespace may appear at any point in the version specification, and
must appear where it's necessary to disambiguate; it is not otherwise
significant.  For consistency and in case of future changes to
<kbd>dpkg</kbd> it is recommended that a single space be used after a
version relationship and before a version number; it is usual also to
put a single space after each comma, on either side of each vertical
bar, and before each open parenthesis.<P>
-->

空白は、バージョン設定のどの部分に入れてもかまいません。そして、必要なら
ば空白を挿入して、あいまいさを取りのぞかなければいけません。その他の意味
はありません。他の部分との整合性、または <kbd>dpkg</kbd> の将来の拡張の
ために、バージョン間の関連性の後ろとバージョン番号の前に、空白を一ついれ
ることを推奨します。そして通常は、コンマのあとに空白を一つ入れ、パイプシ
ンボル「|」の両側にも空白を入れます。また、開括弧の前にも空白を一つ入れ
ます。
<p>

<!--
For example:
<pre>Package: metamail
Version: 2.7-3
Depends: libc5 (&gt;= 5.2.18-4), mime-support, csh | tcsh</pre>
<hr>
 -->

例を以下にしめします。
<pre>Package: metamail
Version: 2.7-3
Depends: libc5 (&gt;= 5.2.18-4), mime-support, csh | tcsh</pre>
<hr>
<h2><A name="s8.2">
<!-- 
8.2 Dependencies - <code>Depends</code>, <code>Recommends</code>,
 <code>Suggests</code>, <code>Pre-Depends</code>
-->
 8.2 依存関係 - <code>Depends</code>, <code>Recommends</code>, <code>Suggests</code>, <code>Pre-Depends</code>
</A></h2>

<!--
These four fields are used to declare a dependency by one package on
another.  They appear in the depending package's control file.<P>
 -->

これらの四つのフィールドはあるパッケージと他のパッケージとの依存関係を宣
言するために使用します。これらのフィールドは、パッケージのコントロールファ
イルの中にあります。
<p>

<!--
All but <code>Pre-Depends</code> (discussed below) take effect <em>only</em> when
a package is to be configured.  They do not prevent a package being on
the system in an unconfigured state while its dependencies are
unsatisfied, and it is possible to replace a package whose
dependencies are satisfied and which is properly installed with a
different version whose dependencies are not and cannot be satisfied;
when this is done the depending package will be left unconfigured
(since attempts to configure it will give errors) and will not
function properly.<P>
 -->

<code>Pre-Depends</code> (これについては以下で議論します)以外のすべての
宣言は、パッケージを設定する時<em>だけ</em>作用します。
そのため、依存関係を満たさないパッケージがシステム中に未設定(unconfigured) 
な状態でインストールされることを防ぐことはできません。このパッケージは、
依存関係をきちんと満足したパッケージで置き換えることもできますし、違う
バージョンで、依存関係をきちんと満足していないパッケージで上書きするこ
ともできます。この場合はそのパッケージは未設定のまま
(configure しようとするとエラーが返ってきまず) で、当然、きちんと動作し
ないでしょう。<p>

<!--
For this reason packages in an installation run are usually all
unpacked first and all configured later; this gives later versions of
packages with dependencies on later versions of other packages the
opportunity to have their dependencies satisfied.<P>
 -->

この理由から、インストール時には、すべてのパッケージがまず展開されて、そ
の後、すべてのパッケージを設定 (configure) します。こうすることによって、
現存のシステムに存在しない、新しいバージョンのパッケージに依存関係を宣言
している新しいパッケージが依存関係を満足できることになります。
<p>

<!-- 
?????
this gives 以下が意味不明?????。妙訳求む。
----- 上述のようにしてみました。
--> 

<!--
Thus <code>Depends</code> allows package maintainers to impose an order in
which packages should be configured.
 -->

このように、 <code>Depends</code> フィールドによって、パッケージのメンテ
ナはパッケージの設定順序を指定できます。

<dl>

<!--
<dt><code>Depends</code><dd>This declares an absolute dependency.<P>
 -->

<dt><code>Depends</code><dd>これは、必ず依存しているパッケージを宣言しま
    す。<p>

<!--
<kbd>dpkg</kbd> will not configure
packages whose dependencies aren't satisfied.  If it is asked to make
an installation which would cause an installed package's dependencies
to become unsatisfied it will complain<A href="footnotes.html#21" name="fr21">[21]</A>, unless
<code>--auto-deconfigure</code> is specified, in which case those packages
will be deconfigured before the installation proceeds.<P>
 -->

 <kbd>dpkg</kbd> は、その依存関係が満足されない限り、パッケージを設定し
ようとしません。もし、強制的に依存関係を無視してインストールしようとする
と、<code>--auto-deconfigure</code> オプションが指定されていないかぎり、
<kbd>dpkg</kbd> は文句をいいます<A href="footnotes.html#21"
name="fr21">[21]</A>。このオプションが指定されていると、パッケージのイン
ストールが行われる前に、設定が解除されます。<p>

<!-- 
????? dpkgに --auto-deconfigure が指定されたときの動作ってこれで
いいでしたっけ?
--> 


<!--
<kbd>dselect</kbd> makes it hard for the user to select packages for
installation, removal or upgrade in a way that would mean that
packages' <kbd>Depends</kbd> fields would be unsatisfied.  The user can
override this if they wish, for example if they know that <kbd>dselect</kbd>
has an out-of-date view of the real package relationships.<P>
 -->

<kbd>dselect</kbd> を使ってパッケージを導入や削除、更新するときは、この
<kdb>Depends</kdb>フィールドは厳密にチェックされます。けれども、例えば
<kdb>dselect</kdb>が実際のパッケージ間関係を反映しておらず、古い情報しか
持っていない場合など、もし必要であれば上書きすることができます。<p>

<!--
The <code>Depends</code> field should be used if the depended-on package is
required for the depending package to provide a significant amount of
functionality.
 -->

 <code>Depends</code>フィールドは、そのパッケージが他のあるパッケージに
重要な機能の多くを依存している場合に使わなければいけません。<p>

<!--
<p><dt><code>Recommends</code><dd>This declares a strong, but not
    absolute, dependency.<P>
 -->

<dt><code>Recommends</code><dd>強い依存関係だけれども、絶対というほどで
    はない依存関係の場合に宣言します。<p>

<!--
<code>Recommends</code> is ignored by <kbd>dpkg</kbd>, so that users
    using the command-line (who are presumed to know what they're doing)
    will not be impeded.<P>
 -->

 <kbd>dpkg</kbd> は、<code>Recommends</code> フィールドを無視します。コ
    マンドラインを使うユーザ(自分が何をしているかを知っているユーザ)はエ
    ラーなどに邪魔されることはありません。<p>

<!--
It is treated by <kbd>dselect</kbd> exactly as <code>Depends</code> is;
this makes it hard for the user to select things so as to leave
<code>Recommends</code> fields unsatisfied, but they are able to do so
by being persistent.<P>
 -->

    一方、<kbd>dselect</kbd>がこのフィールドを扱うときは、
<code>Depends</code>と同様の扱いをします。<CODE>Recommends</CODE>フィー
ルドの関係を満足せずに、パッケージを選択することは難しくなっています。け
れども、ユーザがもし望むのであればそうすることもできるようになっています。
<P>

<!--
The <code>Recommends</code> field should list packages that would be found
together with this one in all but unusual installations.
 -->

この<code>Recommends</code> フィールドには、特別な場合でないかぎり一緒に
使用されるパッケージが書かれます。<p>

<!--
<p><dt><code>Suggests</code><dd>This is used to declare that one package
may be more useful with one or more others.  Using this field tells the
packaging system and the user that the listed packages are be related to
this one and can perhaps enhance its usefulness, but that installing
this one without them is perfectly reasonable.<P>
 -->

<dt><code>Suggests</code><dd>そのパッケージをより便利に使うための一つま
    たはそれ以上の他のパッケージを宣言します。ここに宣言されているパッケー
    ジも一緒にインストールすると、おそらく、より便利になるでしょう。
    けれども、それらがない場合でも全く問題なくインストールできます。<p>

<!--
<kbd>dselect</kbd> will offer suggsted packages to the system administrator
when they select the suggesting package, but the default is not to
install the suggested package.
 -->


<kbd>dselect</kbd> を使用してパッケージを選択すると、管理者に
<code>Suggests</code>されたパッケージをインストールするように提案してき
ます。けれども、デフォルトではインストールしません。<p>

<!--
<p><dt><code>Pre-Depends</code><dd>This field is like <code>Depends</code>, except that it also forces <kbd>dpkg</kbd>
to complete installation of the packages named before even starting
the installation of the package which declares the predependency.<P>
 -->

<dt><code>Pre-Depends</code><dd>このフィールドは、ほとんど
    <code>Depends</code>と同様です。けれども、この場合は、その目的のパッ
    ケージのインストールの前に、事前依存性 (predependency) のあるパッケー
    ジの完全なインストールを、<code>dpkg</code>に強制します。<p>

<!--
<kbd>dselect</kbd> checks for predependencies when it is doing an
installation run, and will attempt to find the packages which are
required to be installed first and do so in the right order.<P>
 -->

    <kbd>dselect</kbd> は、一連のインストール作業の実行中に、その事前依
    存性をチェックします。そして最初にインストールしなければいけないパッ
    ケージから正しい順番でインストール作業を行おうとします。<p>

<!--
However, this process is slow (because it requires repeated
invocations of <kbd>dpkg</kbd>) and troublesome (because it requires
guessing where to find the appropriate files).<P>

     
    けれども、この作業は遅く (<kbd>dpkg</kbd>の複数回の実行が必要なので
    す)、またトラブルを起しやすいです (適切なファイルがどこにあるか推測
    しなければならないので)。<p>

<!--
For these reasons, and because this field imposes restrictions on the
order in which packages may be unpacked (which can be difficult for
installations from multipart media, for example), <code>Pre-Depends</code>
should be used sparingly, preferably only by packages whose premature
upgrade or installation would hamper the ability of the system to
continue with any upgrade that might be in progress.<P>
 -->

    これらの理由から、また、このフィールドは、パッケージの展開順序に制約
    を設けます (例えば、マルチパートメディアからのインストールが難しくな
    ります)。従って、<code>Pre-Depends</code> は、そのパッケージの不完全
    な更新やインストールが、システムで進行中の更新作業を続ける妨げとなる
    場合のみに使用されなければいけません。<p>

<!--
 When the package declaring it is being configured, a
<code>Pre-Dependency</code> will be considered satisfied only if the depending
package has been correctly configured, just as if an ordinary
<code>Depends</code> had been used.<P>
 -->

<code>Pre-Dependency</code> を宣言したパッケージが設定中の時、
依存するパッケージが正常に設定済である場合にのみ
<code>Pre-Dependency</code> を満たしたとみなします。
これは、通常の<code>Depends</code> と同様です。<p>

<!--
However, when a package declaring a predependency is being unpacked
the predependency can be satisfied even if the depended-on package(s)
are only unpacked or half-configured, provided that they have been
configured correctly at some point in the past (and not removed or
partially removed since).  In this case both the previously-configured
and currently unpacked or half-configured versions must satisfy any
version clause in the <code>Pre-Depends</code> field.
 --> 

ただし、ある時点できちんと設定され、以後削除されていない場合には、
<code>Pre-Dependency</code> を宣言したパッケージが展開中や展開直後、中途
半端な設定済の状態でさえ、事前依存性(<code>Pre-Dependency</code>)は満足
できます。この場合は、以前に設定されていたパッケージのバージョンと、現在
展開された、またはある程度設定されたバージョンとの両方が、
<code>Pre-Depends</code> フィールドのバージョン部分を満足しなければいけ
ません。
<p></dl>

<!-- 
????? いまひとつ日本語がこなれてないのですが、代案だせませんでした。
----- 上述のように 変えてみました。
--> 

<!--
When selecting which level of dependency to use you should consider
how important the depended-on package is to the functionality of the
one declaring the dependency.  Some packages are composed of
components of varying degrees of importance.  Such a package should
list using <code>Depends</code> the package(s) which are required by the more
important components.  The other components' requirements may be
mentioned as Suggestions or Recommendations, as appropriate to the
components' relative importance.
 -->

<!-- 
?????Such a package 以下、component をパッケージと誤訳している????? 
?????が、よい訳なし。妙訳求む。
----- component は、ここでは、Package の Dependency の問題で、Depends: 
の中にリストしてあるものを「部品」と言っています。そこで、ここでは「部品」
=「パッケージ」としました。間違いがございましたら教えてください。
--> 

依存関係のレベルを選択するにあたって、そのパッケージの機能において依存パ
ッケージの機能がどの程度重要なのかを考えなければいけません。あるパッケー
ジは、重要度の異なるいくつかの部品から構成されます。
それらの部品パッケージの
うち、より重要なパッケージを<code>Depends</code> として宣言しなればいけ
ません。その他の依存パッケージは、その相対的な重要度によって、Suggests な
り、Recommends の値をとることになります。

<hr>
<h3><A name="s8.2.1">
<!-- 
8.2.1 Dependencies on shared libraries
--> 
8.2.1 共有ライブラリへの依存関係
</A></h3>

<!--
The dependency fields listed above are used by packages which need
shared libraries to declare dependencies on the appropriate packages.<P>
 -->

上述の Depends フィールドは、共有ライブラリを必要とするパッケージが、あ
る適切なパッケージへの依存関係を宣言する際に使用します。<p>

<!--
These dependencies are usually determined automatically using
<kbd>dpkg-shlibdeps</kbd> and inserted in the package control file using
the control file substitution variables mechanism; see <A
href="ch-sourcepkg.html#s-srcsubstvars"><code>debian/substvars</code>
and variable substitutions, subsection 3.2.4</A> and <A
href="ch-sourcepkg.html#s-sourcetools">Tools for processing source
packages, section 3.1</A>.
 -->

これらの依存関係は、通常は、<kbd>dpkg-shlibdeps</kbd> によって自動的に決
定され、パッケージのコントロールファイルに挿入されます。これは、コントロー
ルファイルへの変数代入機構によっています。 <A
href="ch-sourcepkg.html#s-srcsubstvars"><code>debian/substvars</code>and
variable substitutions, subsection 3.2.4</A> および <A
href="ch-sourcepkg.html#s-sourcetools">Tools for processing source
packages, section 3.1</A> をごらんください。
<hr>

<h3><A name="s8.2.2">
<!-- 
8.2.2 Deconfiguration due to removal during bulk installations
--> 
8.2.2 大量インストール時のパッケージ削除による設定の解除
</A></h3>

<!--
If <kbd>dpkg</kbd> would like to remove a package due to a conflict, as
described above, but this would violate a dependency of some other
package on the system, <kbd>dpkg</kbd> will usually not remove the
conflicting package and halt with an error.<P>
 -->

 <kbd>dpkg</kbd> が、上述のような競合関係のためにあるパッケージを削除し
をようとしたとき、システム中の他のあるパッケージとの依存関係を満足できな
くなることがありえます。この場合、<kbd>dpkg</kbd> は、その競合パッケージ
を削除しようとせず、エラーを出力して終了します。<p>

<!--
However, if the <code>--auto-deconfigure</code> (<code>-B</code>) option
is used <kbd>dpkg</kbd> will automatically `deconfigure' the package
with the problematic dependency, so that the conflicting package can be
removed and the package we're trying to install can be installed.  If
<kbd>dpkg</kbd> is being asked to install packages (rather than just
unpacking them) it will try to reconfigure the package when it has
unpacked all its arguments, in the hope that one of the other packages
it is installing will satisfy the problematic dependency.<P>
 -->

けれども、<code>--auto-deconfigure</code> (<code>-B</code>) というオプショ
ンが使用されていると、<kbd>dpkg</kbd> は、依存関係に問題のあるパッケージ
の設定を自動的に解除します。この場合は、競合関係のあるパッケージは削除可
能になり、インストールしようとしているパッケージはインストール可能になり
ます。この時、<kbd>dpkg</kbd> は、依存関係の問題を、他のあるパッケージが
解決してくれることを期待して、インストール時に、展開後、再設定を行おうと
します。
<p>

<!--
<kbd>dselect</kbd> supplies this argument to <kbd>dpkg</kbd> when it
invokes it, so that bulk installations proceed smoothly.
 -->

<kbd>dselect</kbd> は、大量のインストール作業を円滑に進めるため、
<kbd>dpkg</kbd> をこのオプション付きで起動します。
<hr>
<h2><A name="s-conflicts">
<!-- 
8.3 Alternative packages - <code>Conflicts</code> and <code>Replaces</code>
--> 
8.3 代替パッケージ - <code>Conflicts</code> と <code>Replaces</code>
</A></h2>
<!--
When one package declares a conflict with another <kbd>dpkg</kbd> will
refuse to allow them to be installed on the system at the same time.<P>
 -->

あるパッケージが他のパッケージとの競合関係を宣言している場合、
<kbd>dpkg</kbd>は、それら二つのパッケージを同時にインストールすることは
できません。<p>

<!--
 If one package is to be installed, the other must be removed
first - if the package being installed is marked as replacing (<A
href="#s-replaces"><code>Replaces</code> - overwriting files and
replacing packages, section 8.5</A>) the one on the system, or the one
on the system is marked as deselected, or both packages are marked
<code>Essential</code>, then <kbd>dpkg</kbd> will automatically remove
the package which is causing the conflict, otherwise it will halt the
installation of the new package with an error.<P>
 -->

一つのパッケージがインストールされていると、他方のパッケージはまず最初に
削除しなければいけません。また、そのインストール中のパッケージが置き換え
られるように指示されているとき(<A href="#s-replaces">
<code>Replaces</code> - ファイルの上書きと置換、section 8.5</A>)や、シス
テムにインストールされているパッケージが選択解除されるように指示されてい
るとき、両方のパッケージに、<code>Essential</code> という宣言がされてい
るときは、<kbd>dpkg</kbd> は、競合関係の原因となっているパッケージを自動
的に削除します。そうでない時は、エラーを出力し、新規パッケージのインストー
ルを中止します。<p>

<!--
<kbd>dselect</kbd> makes it hard to select conflicting packages, though
the user can override this if they wish.  If they do not override it
then <kbd>dselect</kbd> will select one of the packages for removal, and
the user must make sure it is the right one.  In the future
<kbd>dselect</kbd> will look for the presence of a <code>Replaces</code>
field to help decide which package should be installed and which
removed.<P>
 -->

<kbd>dselect</kbd> を使用するときは、もし望むのであれば上書きすることで
きます。けれども、競合パッケージをユーザが選択することは難しくなっていま
す。ユーザが上書きをしなかった場合は、<kbd>dselect</kbd> が自動的に削除
するパッケージを選びます。ユーザはそれが正しいものかどうかを確認しなけれ
ばいけません。将来的には、<kbd>dselect</kbd> が、<code>Replaces</code>
フィールドが存在しているのかどうかを見つけるようになる予定です。これによ
って、どれをインストールしてどれを削除するのかの判断がより容易になるでし
ょう。
<p>

<!--
A package will not cause a conflict merely because its configuration
files are still installed; it must be at least half-installed.<P>
 -->

あるパッケージは単に構成ファイルがまだインストールされていないという理由
で、競合関係をひきおこすことはありません。この場合は最低で 
half-installed の状態でなければいけません。<p>

<!--
A special exception is made for packages which declare a conflict with
their own package name, or with a virtual package which they provide
(see below): this does not prevent their installation, and allows a
package to conflict with others providing a replacement for it.  You
use this feature when you want the package in question to be the only
package providing something.<P>
 -->

インストール中のパッケージ自身の名前やそれ自身が提供する仮想パッケージ
(以下を参照してください)との競合関係が宣言されている場合は特殊な例外です。
;この場合、そういうパッケージのインストールが妨げられることはありません。
また、このパッケージを置換する他のパッケージと競合することもできます。あ
るパッケージだけが、ある仮想パッケージを提供するように指定したいときに、
この機能を使用します。<p>

<!--
A <code>Conflicts</code> entry should almost never have an `earlier than'
version clause.  This would prevent <kbd>dpkg</kbd> from upgrading or
installing the package which declared such a conflict until the
upgrade or removal of the conflicted-with package had been completed.
This aspect of installation ordering is not handled by <kbd>dselect</kbd>,
so that the use <code>Conflicts</code> in this way is likely to cause
problems for `bulk run' upgrades and installations.<P>
 -->

<code> Conflicts </code> フィールドは、バージョン番号の指定に、「より古
い」という指定を含んではいけません。このフィールドがあると、
<kbd>dpkg</kbd>は、その競合関係を宣言しているパッケージが削除されるか更
新されるまでそのパッケージのインストールまたは更新を中止します。このイン
ストール順序は、<kbd>dselect</kbd> コマンドには無視されます。従って、イ
ンストール順序の規定に、このフィールドを使用すると、<kbd> dselect</kbd>
によって、大量のインストール作業を行うときには、問題がおきるかもしれませ
ん。
<p>

<hr>
<h2><A name="s-virtual">
<!-- 
8.4 Virtual packages - <code>Provides</code>
--> 
8.4 仮想パッケージ - <code>Provides</code>
</A></h2>

<!--
As well as the names of actual (`concrete') packages, the package
relationship fields <code>Depends</code>, <code>Recommends</code>,
<code>Suggests</code> and <code>Conflicts</code> may mention virtual
packages. <P>
 -->

実際に存在するパッケージと同様、パッケージの関連性を記述するフィールド、
<code>Depends</code> と、 <code>Recommends</code>、<code>Suggests</code>、
<code>Conflicts</code>には、仮想パッケージ名を記述することができます。<p>

<!--
A virtual package is one which appears in the <code>Provides</code> control
file field of another package.  The effect is as if the package(s)
which provide a particular virtual package name had been listed by
name everywhere were the virtual package name appears.<P>
 -->

この仮想パッケージ名は、あるパッケージのコントロールファイルの、
<code>Provides</code> フィールドに書かれるものです。これによって、その
パッケージが仮想パッケージが書かれているところすべてにリストされることに
なります。<p>

<!--
If there are both a real and a virtual package of the same name then
the dependency may be satisfied (or the conflict caused) by either the
real package or any of the virtual packages which provide it.  This is
so that, for example, supposing we have
 -->

同じ名前の実際のパッケージと仮想パッケージが存在していた場合、依存関係は
は、そのパッケージによって、満足されたりされなかったりします。例えば、

<!--
<pre>Package: vm
Depends: emacs</pre>
and someone else releases an xemacs package they can say
<pre>Package: xemacs
Provides: emacs</pre>
and all will work in the interim (until a purely virtual package name
is decided on and the <code>emacs</code> and <code>vm</code> packages are changed to
use it).<P>
 -->

<pre>Package: vm
Depends: emacs</pre>
こういうパッケージがあった場合で、他の xemacs のリリースパッケージが、
<pre>Package: xemacs
Provides: emacs</pre>

こういう宣言をしていた場合、すべて正常に動作します(ただし、仮想パッケー
ジ名が上書きされたり、<code>emacs</code> と <code>vm</code> パッケージが
変更された場合を除きます)。<p>

<!--
If a dependency or a conflict has a version number attached then only
real packages will be considered to see whether the relationship is
satisfied (or the prohibition violated, for a conflict) - it is
assumed that a real package which provides virtual package is not of
the `right' version.  So, a <code>Provides</code> field may not contain
version numbers, and the version number of the concrete package which
provides a particular virtual package will not be looked at when
considering a dependency on or conflict with the virtual package name.<P>
 -->

依存、競合関係にバージョン番号が付けられている場合は、そのチェックのため
には実際のパッケージだけが考慮されます。- 仮想パッケージを提供するある実
在のパッケージのバージョン番号は、「正しい」バージョン番号ではないとみな
されます。従って、Provides フィールドには、バージョン番号を含んではいけ
ません、そして仮想パッケージとの競合または依存関係を決定するときに、その
仮想パッケージを提供する実際パッケージのバージョン番号を参照してはいけま
せん。<p>

<!--
It is likely that the ability will be added in a future release of
<kbd>dpkg</kbd> to specify a version number for each virtual package it
provides.  This feature is not yet present, however, and is expected
to be used only infrequently.<P>
 -->

将来的に、dpkg には、提供される仮想パッケージのバージョン番号を特定する
機能が付加される予定です。しかし、この機能は今はまだ実装されていませんし、
またそれはめったに使われないことと思います。<p>

<!--
If you want to specify which of a set of real packages should be the
default to satisfy a particular dependency on a virtual package, you
should list the real package as alternative before the virtual.<P>
 -->

ある実際のパッケージのセットが、ある仮想パッケージに関する特定の依存関係
を満足しなければいけないときは、仮想パッケージのかわりに、実際のパッケー
ジ名をフィールドに並べてください。
<hr>

<h2><A name="s-replaces">
<!-- 
8.5 <code>Replaces</code> - overwriting files and replacing packages
--> 
8.5 <code>Replaces</code> - ファイルの上書きと置換
</A></h2>

<!--
The <code>Replaces</code> control file field has two purposes, which come into
play in different situations.<P>
 -->

コントロールファイルの <code>Replaces</code> フィールドは、違う状況下で
作用する二つの目的を持っています。<p>

<!--
Virtual packages (<A href="#s-virtual">Virtual packages - <code>Provides</code>, section 8.4</A> ) are not considered when looking at a
<code>Replaces</code> field - the packages declared as being replaced
must be mentioned by their real names.
 --> 

仮想パッケージは(<A href="#s-virtual">仮想パッケージ -
<code>Provides</code>、section 8.4</A> ) は、<code>Replaces</code> フィールドを参照す
るときは、考慮されません。このフィールドに置換されるパッケージを宣言する
ときは、実際のパッケージ名を使用してください。

<hr>
<h3><A name="s8.5.1">
<!-- 
8.5.1 Overwriting files in other packages
-->
8.5.1 他のパッケージ中の一部ファイルの上書き
</A></h3>

<!--
Firstly, as mentioned before, it is usually an error for a package to
contains files which are on the system in another package, though
currently the <code>--force-overwrite</code> flag is enabled by default,
downgrading the error to a warning,<P>
 -->

最初に、以前言及したように、通常、システム中の他のパッケージに含まれてい
るファイルをインストールしようとするパッケージが含んでいると、それはエラー
になります。現在のところ、dpkg のオプション、
<code>--force-overwrite</code> はデフォルトでオンになっており、このエラー
はウォーニングに格下げされています。<p>

<!--
If the overwriting package declares that it replaces the one
containing the file being overwritten then <kbd>dpkg</kbd> will proceed, and
replace the file from the old package with that from the new.  The
file will no longer be listed as `owned' by the old package.<P>
 -->

ここで、インストールパッケージが、システム中のあるファイルを置換すると宣
言していた場合、<kbd>dpkg</kbd> はそれの処理を実行します。そして、古いパ
ッケージ中のファイルを新しいファイルと置き換えます。そのファイルは古いパ
ッケージの所有リストからは削除されます <p>

<!-- 
If a package is completely replaced in this way, so that <kbd>dpkg</kbd>
does not know of any files it still contains, it is considered to have
disappeared.  It will be marked as not wanted on the system (selected
for removal) and not installed.  Any conffiles details noted in the
package will be ignored, as they will have been taken over by the
replacing package(s).  The package's <kbd>postrm</kbd> script will be run to
allow the package to do any final cleanup required.
See <A href="ch-maintainerscripts.html#s-mscriptsinstact">Summary of ways maintainer scripts are called, section 6.2</A>.<P>
 -->

このようにして、パッケージが完全に置き換えられてしまったときは、
<kbd>dpkg </kbd>は、どのファイルがまだ含まれているのか、もはや情報を持っ
ていません。したがって、この場合は、古いパッケージは削除されたと考えられ
ます。システムは、「削除」および「インストールされていない」とのマークを
古いパッケージに付けます。一方、そのパッケージの構成情報を記した設定ファ
イルは削除されません。これは、新しいパッケージによって上書きされている可
能性があるからです。最終的な大掃除が必要であれば、そのパッケージの
<kbd>postrm</kbd> スクリプトを必要に応じて実行することになるでしょう。<A
href="ch-maintainerscripts.html#s-mscriptsinstact">Summary of ways
maintainer scripts are called, section 6.2</A> をごらんください。<p>

<!--
In the future <kbd>dpkg</kbd> will discard files which overwrite those from
another package which declares that it replaces the one being
installed (so that you can install an older version of a package
without problems).<P>
 -->

将来の<kbd> dpkg </kbd>のバージョンにおいては、置き換えインストールが発
生した時は、最初にシステム中にあったファイルは削除されるようになる予定で
す(これによって、古いバージョンのパッケージを問題なく上書きインストール
できるようになります)。<p>

<!--
This usage of <code>Replaces</code> only takes effect when both packages are
at least partially on the system at once, so that it can only happen
if they do not conflict or if the conflict has been overridden.
 -->

<code> Replaces </code>フィールドがこのような使われるときは、二つのパッ
ケージが一時的にせよシステム中に同時に存在するときです。つまり、この場合
は、これらのパッケージは競合関係にないか、または、その競合関係がすでに上
書きされて解消されたていることになります。
<hr>
<h3><A name="s8.5.2">
<!-- 
8.5.2 Replacing whole packages, forcing their removal
--> 
8.5.2 パッケージ全体の削除を伴う置換
</A></h3>

<!--
Secondly, <code>Replaces</code> allows <kbd>dpkg</kbd> and
<kbd>dselect</kbd> to resolve which package should be removed when a
conflict - see <A href="#s-conflicts">代替パッケージ -
<code>Conflicts</code> と <code>Replaces</code>、 section 8.3</A>.  This
usage only takes effect when the two packages <em>do</em> conflict, so
that the two effects do not interfere with each other.<P>
 -->

もう一つは、<code> Replaces </code>がパッケージ間の競合関係を解決するた
めに、<kbd>dpkg</kbd> および <kbd>dpkg</kbd> にどのパッケージを削除する
のか指示する場合です。 <A href="#s-conflicts">代替パッケージ -
<code>Conflicts</code> と <code>Replaces</code>, section 8.3</A> をご覧
ください。この場合は、二つのパッケージが競合しているときです。したがって、
前節の場合とこの場合との間にはお互いに干渉することはありません。

<hr>
<h2><A name="s8.6">
<!-- 
8.6 Defaults for satisfying dependencies - ordering
--> 
8.6 依存関係満足のデフォルト - 順序
</A></h2>

<!--
Ordering is significant in dependency fields.<P>
 -->

依存関係を記述するフィールドにおいて、その順序は重要です。<p>

<!--
Usually dselect will suggest to the user that they select the package
with the most `fundamental' class (eg, it will prefer Base packages to
Optional ones), or the one that they `most wanted' to select in some
sense.<P>
 -->

複数のパッケージが記述されていた場合、ふつうは、dselect が、ユーザにもっ
とも基本的クラスのパッケージを選択するように提案してきます(つまり、ベー
スパッケージのほうが、オプションよりも優先されます)。また、あなたの好み
によって、一番欲しいパッケージを選ぶこともできます。<p>

<!--
In the absence of other information <kbd>dselect</kbd> will offer a
default selection of the first named package in a list of
alternatives.<P>
 -->

その他の情報が欠けていた場合、<kbd>dselect</kbd> は、代替リストのなかの
一番最初のパッケージをデフォルトで選択します。<p>

<!--
However, there is no way to specify the `order' of several packages
which all provide the same thing, when that thing is listed as a
dependency.<P>
 -->

けれども、同じ仮想パッケージを提供するいくつかのパッケージが、依存関係と
して記述されているとき、それらのパッケージのインストール順を規定すること
はできません。

<!--
Therefore a dependency on a virtual package should contain a concrete
package name as the first alternative, so that this is the default.<P>
 -->

ですから、仮想パッケージに対して依存関係を記述するときは、実際のパッケー
ジ名を代替リストの最初におくようにします。この場合、そのパッケージがデフ
ォルトで選択されるようになります。<p>
 
<!--
For example, consider the set of packages:
 -->

例えば、次のような場合を考えます。

<pre>Package: glibcdoc
Recommends: info-browser

Package: info
Provides: info-browser

Package: emacs
Provides: info-browser</pre><P>

<!--
If <kbd>emacs</kbd> and <kbd>info</kbd> both have the same priority then
<kbd>dselect</kbd>'s choice is essentially random.  Better would be
<pre>Package: glibcdoc
Recommends: info | info-browser</pre>
so that <kbd>dselect</kbd> defaults to selecting the lightweight standalone
info browser.
 -->

<kbd>emacs</kbd> と <kbd>info</kbd> とが同一の優先順位を持っていたとした
ら、<kbd>dselect</kbd> の選択は、ランダムとなります。一方、
<pre>Package: glibcdoc
Recommends: info | info-browser</pre>

このような記述になっていた場合、<kbd>dselect</kbd> は、軽くて単独で動作
する info-browser、info をデフォルトで選択します。
<hr>

Debian packaging manual - <A href="index.html#copyright">Copyright 1996
Ian Jackson.</A>
<br>
<A href="index.html#toc">Contents</A>; <A
href="index.html#abstract">abstract</A>; <A
href="ch-conffiles.html">next</A>; <A
href="ch-descriptions.html">back</A>.<br>

<address>version 2.4.1.0, 14 April 1998<br>
Ian Jackson <A
href="mailto:ijackson@xxxxxxxxxxxxxx";>ijackson@xxxxxxxxxxxxxx</A><br>
Revised: David A. Morris <A
href="mailto:bweaver@debian.org";>bweaver@debian.org</A><br> Maintainer:
Christian Schwarz <A href="mailto:schwarz@debian.org";>schwarz@debi
an.org</A><br>日本語訳:芳尾桂<A
href="mailto:shishamo@xxxxxxxxxxxxxxx";>shishamo@xxxxxxxxxxxxxxx</A><br>
査読:<a href="http://www.debian.or.jp/";>Debian-JP Project </a><br>
</address>
</body></html>