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

Packaging Manual chapter13, ch-methif.html



芳尾と申します。

Packaging Manual の 第13章を訳しました。ここは dselect のインターフェー
スについてなのですが、超訳^^; が少しあります。分からなかった箇所には、HTML 
コメント中に、??? を付けています。

たとえば、install method これを、インストール方式と訳しています。これ
は、/usr/lib/dpkg/methods を見れば、やれ、フロッピーとか、マウントディ
スクだとか、dselect の初期選択画面の話だと一目瞭然なのですが、訳は、
インストール方式?でよいでしょうか?

あと、特に分からなかった箇所に、^^^^^^^^ を付けます。
見てくだされば幸いです。

あと、いつものように栗栖さん、お手数ですが、ホームページの更新をお願い
いたします。

私はようやく最後の 14 章の翻訳に突入します。
さらに、第7章の英語添付版と、第12章の改訂版をそのうちに流します。

よろしくお願いします。

<!-- 
<var>vardir</var> is the base directory for storing <kbd>dpkg</kbd> and
<kbd>dselect</kbd>'s state, usually <code>/var/lib/dpkg</code>; this is
passed in so that the <code>--admindir</code> option to
<kbd>dselect</kbd> is honoured).<P>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--> 

<var>vardir</var> は、<kbd>dpkg</kbd> と <kbd>dselect</kbd>の状態をセー
ブするための基本となるディレクトリで、通常、 <code>/var/lib/dpkg</code> 
です。このディレクトリは、<code>--admindir</code> オプションで指定した
引数を<kbd>dselect</kbd>に渡すこともできます。<p>



<!-- 
The group name and method name must follow the rules for C identifiers.
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--> 

グループ名とインストール方式名は、C 識別子の規則に従っていなければいけま
せん。


ではでは。 ---- 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


<html><head>
<title>
<!-- 
Debian Packaging Manual - dselect's interface to its installation
methods
--> 
Debian Packaging Manual - dselect のインストール方式へのインターフェース
</title>
<link rev=made href="mailto:ijackson@xxxxxxxxxxxxxx";>
</head><body>
<h1>
<!-- 
Debian Packaging Manual - chapter 13<br>
dselect's interface to its installation methods
--> 
Debian Packaging Manual - 第 13 章<br>
dselect のインストール方式へのインターフェース
</h1>

<!-- 
<kbd>dselect</kbd> calls scripts from its installation methods when it
needs to actually access data from the distribution.  The core program
<kbd>dselect</kbd> itself just calls these scripts and provides the
package and access method selection interfaces.  The installation
methods are responsible for invoking <kbd>dpkg</kbd> as appropriate.<P>
--> 

<kbd>dselect</kbd> は、ディストリビューションのデータに実際にアクセスす
るときに、ターゲットとなるインストール方式から、スクリプトを呼出します。
核となるプログラム<kbd>dselect</kbd>自身は、スクリプトを呼出すだけであり、
パッケージとアクセス方法に関して選択を行なうことができるインターフェース
を提供します。<kbd>dpkg</kbd> を適切に起動することが、インストール方式の
担当です。<p>

<!-- 
Each installation method has three scripts:
<ul compact>
<li>Setup installation parameters.<li>Update list of available packages.<li>Install.</ul>
<P>
--> 

それぞれのインストール方式は、3 つのスクリプトを持っています。
<ul compact>
<li>インストールパラメータの設定
<li>パッケージリストの更新
<li>インストール
</ul><p>

<!-- 
<kbd>dselect</kbd> searches for methods in <code>/usr/lib/dpkg/methods</code>
and <code>/usr/local/lib/dpkg/methods</code>.
--> 

<kbd>dselect</kbd> は、<code>/usr/lib/dpkg/methods</code> と、 
<code>/usr/local/lib/dpkg/methods</code> から利用できるインストール方式
を検索します。

<hr>
<h2><A name="s13.1">
<!-- 
13.1 Functions of the method scripts
--> 
方法スクリプトの機能
</A></h2>

<!-- 
The setup script is run just after the user has chosen an installation
method.  It should prompt the user for parameters like the site to
NFS-mount or FTP from, the directory to use, or the directory or
filesystem where the <code>.deb</code> files can be found, or the tape or
floppy device to install from.  It should store the responses under
<code>/var/lib/dpkg/methods</code> - see below.  If no available
packages list is available it should perhaps offer to scan the
available packages.<P>
--> 

ユーザがインストール方法を選択したのち、設定スクリプトが実行されます。こ
こでは、環境によって異なる値についてユーザに入力を求めます。例えば、NFS 
マウントする、または FTP によってアクセスされるサイトの名前、使用ディレ
クトリ名、<code>.deb</code> ファイルが置かれているファイルシステムやディ
レクトリ名、テープからインストールするのか、または、フロッピーディスクを
使用するのか、などです。これらに対するユーザの入力結果は、
<code>/var/lib/dpkg/methods</code> にセーブします。詳しくは、以下をごら
ん下さい。また、利用可能なパッケージリストが得られない場合には、パッケー
ジを検索する機能が使用できなければいけません。<p>

<!-- 

The update script should obtain a list of available packages if
possible, and run <code>dpkg --update-avail</code>, <code>dpkg
--merge-avail</code> and/or <code>dpkg --forget-old-unavail</code> to
load it into <kbd>dpkg</kbd> and <kbd>dselect</kbd>'s database of
available packages.  If no packages list was available and the user was
offered and accepted the option of scanning the actual files available
this scan should be done here, using <code>dpkg
--record-avail</code>.<P>

--> 

更新スクリプトは、もし可能であれば、有効なパッケージのリストを読みこみま
す。そして、パッケージのリストを <kbd>dpkg</kbd> と<kbd>dselect</kbd> と
の有効パッケージのデータベースに読みこむために、<code>dpkg --
update-avail</code> と、<code>dpkg --merge-avail</code>を実行します。場
合によってはさらに、<code>dpkg --forget-old-unavail</code>も実行します。
有効なパッケージリストが存在しない場合で、実際のファイルからデータを走査
することをユーザが選択した場合においては、その走査作業はこのフェイズで実
行されます。そのとき <code>dpkg --record-avail</code> が用います。
<p>

<!-- 
The install script should feed all the available <code>.deb</code> files
to <code>dpkg --iGOEB</code> (this is equivalent to <code>dpkg --install
--refuse-downgrade --selected-only --skip-same-version
--auto-deconfigure</code>).  The <code>-R</code>
(<code>--recursive</code>) option for traversing subdirectories may also
be useful here).<P>
--> 

<!-- ???
-R は recursive となっているが、man dpkg によると、--root となっている。
-R | --root --admindir と併記されている。dpkg 1.4.0.8 のマンページが間違
っている?
--> 

インストールスクリプトは、すべての有効な <code>.deb</code> ファイルを、
 <code>dpkg --iGOEB</code> に供給します(これは、 <code>dpkg --install
--refuse-downgrade --selected-only --skip-same-version
--auto-deconfigure</code>と等価です)。 <code>-R</code>
(<code>--recursive</code>) オプションは、サブディレクトリも同時に考慮し
てくれるので、便利かもしれません。)<p> 

<!--
If any of these scripts needs to display a message for the user, it
should wait for the user to hit `return' before exiting so that
dselect doesn't immediately rewrite the screen.<P>
--> 

いくつかのスクリプトは、メッセージを画面に出力することもあります。この時、
あっという間にdselect がスクリーンを再描画して、その出力メッセージが流れ
ていってしまっては困ります。そこで、スクリプトは、ユーザが「リターン」を
たたくまで、メッセージの出力を待っていなければいけません。<p>

<!-- 
If a method script succeeds (returns a zero exit status)
<kbd>dselect</kbd> will return immediately to the main menu, with the
`next' option highlighted ready for the user to select it.  If it
fails <kbd>dselect</kbd> will display a message and wait for the user to
hit return.
--> 

方法スクリプトが成功した場合( 0 を返します)、<kbd>dselect</kbd> は、メイ
ン・メニューへと即座に戻ります。戻ったときには、`next' オプションがハイ
ライト表示されて、ユーザがすぐ選ぶことができるようになっています。もし、
次に進むことができなかった場合には、<kbd>dselect</kbd> は、メッセージを
画面に出力して、ユーザが「リターン」を叩くのを待ちます。

<hr>
<h2><A name="s13.2">
<!-- 
13.2 Location and arguments of the method scripts
--> 
方法スクリプトの場所と引数
</A></h2>

<!-- 
A set of scripts (henceforth known as a group) may provide several
methods on the `main menu' with different behaviour.  For example,
there might be a generic get-packages-by-FTP group which might provide
methods in the main menu for installation directly from one of the
Debian mirror sites as well as for installation from a user-specified
site.<P>
--> 

あるスクリプトの集合(以後、グループと表記します)は、メイン・メニュー中で
違う動作のいくつかのインストール方法を提供します。例えば、一般的な
 get-packages-by-FTP グループは、メイン・メニュー中で、ある Debian ミラー
 サイトからのインストールをユーザの定義したサイトからのインストール同様
 にできるように提供します。<p>

<!-- 
Each group of methods implemented by the same set of scripts should have
a subdirectory
<code>/usr/lib/dpkg/methods/</code><var>group</var><code></code> or
<code>/usr/local/lib/dpkg/methods/</code><var>group</var><code></code>,
containing:
<dl compact>
<dt><code>names</code><dd>a list of user-visible methods provided by
    these scripts.
<dt><code>setup</code>
<dt><code>update</code>
<dt><code>install</code>
<dd>executable programs, the scripts themselves.
<dt><code>desc.</code><var>option</var><code></code><dd>description
    file.</dl><P>
-->

同一集合のスクリプトによって規定されるそれぞれのインストール方式は、サブ
ディレクトリ、
<code>/usr/lib/dpkg/methods/</code><var>group</var><code></code> か
<code>/usr/local/lib/dpkg/methods/</code><var>group</var><code></code>
これらは以下を含みます。

<dl compact>
<dt><code>name</code><dd>これらのスクリプトによって提供されるユーザに見
    えるインストール方式
<dt><code>setup</code>
<dt><code>update</code>
<dt><code>install</code>
<dd>実行可能なプログラム、スクリプト自身
<dt><code>desc.</code><var>option</var><code></code><dd>説明ファイル</dl><P>

<!-- 
<code>names</code> will be formatted as a list of lines, each containing:
<pre><var>sequence</var> <var>method</var> <var>summary</var></pre><P>
--> 

<code>names</code>は、行のリストとして構成されます。それぞれの行は、
<pre><var>sequence</var> <var>method</var> <var>summary</var></pre>
を含みます。<p>

<!-- 
<var>sequence</var> is a two-digit number that will be used much like
<code>rc.d</code> prefixes to control the order in the main menu.  If in
doubt use 50.<P>
--> 

<var>sequence</var> は、2 桁の数字で、メイン・メニューの並びの順序を
制御するために、<code>rc.d</code> の接頭辞のように使われます。
よく分からないときは、50 を使用します。
<p> 

<!-- 
<var>method</var> is a name which is displayed by <kbd>dselect</kbd> as the
name of the method, and which will be passed to <code>setup</code>,
<code>update</code> and <code>unpack</code> as their first argument.<P>
--> 

<var>method</var> は、インストール方式の名前として <kbd>dselect</kbd> に
よって、画面に出力される名前です。<code>setup</code> と、
<code>update</code>、<code>unpack</code> に渡される第一引数となります。
<p>

<!--  
<var>summary</var> is the brief description string for
<kbd>dselect</kbd>'s menu.<P>
--> 

<var>summary</var> は、<kbd>dselect</kbd> のメニューに使用される簡単な説
明文です。<p>

<!-- 
Each of the three scripts gets the same three arguments:
<var>vardir</var>, <var>group</var> and <var>method</var>.
--> 

それぞれの三つのスクリプトはそれぞれ同じ三つの引数をとります。それらは、
<var>vardir</var>と<var>group</var>、<var>method</var>です。

<!-- 
<var>vardir</var> is the base directory for storing <kbd>dpkg</kbd> and
<kbd>dselect</kbd>'s state, usually <code>/var/lib/dpkg</code>; this is
passed in so that the <code>--admindir</code> option to
<kbd>dselect</kbd> is honoured).<P>
--> 

<!-- 
??? dselect is honoured?
--> 

<var>vardir</var> は、<kbd>dpkg</kbd> と <kbd>dselect</kbd>の状態をセー
ブするための基本となるディレクトリで、通常、 <code>/var/lib/dpkg</code> 
です。このディレクトリは、<code>--admindir</code> オプションで指定した
引数を<kbd>dselect</kbd>に渡すこともできます。<p>

<!-- 
  Each option may have an extended description in
<code>desc.</code><var>option</var><code></code>.  This should be
formatted like the extended description part of a
<code>Description</code> field entry <em>shifted one character to the
left</em>.<P>
--> 

それぞれのインストール方式 (option)は、さらに詳細な説明文を、
<code>desc.</code><var>option</var><code></code>ファイル に書くことがで
きます。このファイルの書式は、<code>Description</code> フィールドのエン
トリの拡張説明文のように、<em>行頭に一つのスペースを入れなければいけませ
ん。</em>.<p>

<!-- 
<code></code><var>vardir</var><code>/methods</code> will exist, and a
method group may use a
<code></code><var>vardir</var><code>/methods/</code><var>group</var><code>
</code>directory to store its state.<P>
--> 

また、<code></code><var>vardir</var><code>/methods</code>ディレクトリが
あります。インストール方式群は、現在の状態のセーブに
<code></code><var>vardir</var><code>/methods/</code><var>group</var><code>
</code>ディレクトリを使用できます。<p>

<!-- 
The group name and method name must follow the rules for C identifiers.
--> 

<!-- 
??? the rules for C identifiers => C 識別子の規則?
--> 

グループ名とインストール方式名は、C 識別子の規則に従っていなければいけま
せん。

<hr>
Debian Packaging Manual
- <A href="index.html#copyright">Copyright .Aゥ1996 Ian Jackson.</A>*B
<br>
<A href="index.html#toc">Contents</A>; <A href="index.html#abstract">abstract</A>; <A href="ch-conversion.html">next</A>; <A href="ch-sharedlibs.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@debian.org</A></address>
</body></html>