Scroll to navigation

APT-CONFIG(8) APT APT-CONFIG(8)

名前

apt-config - APT 設定取得プログラム

概要

apt-config [--empty] [--format ' %f "%v";%n'] [-o=config_string] [-c=config_file] {shell | dump | {-v | --version} | {-h | --help}}

説明

apt-config は、APT スイートの様々な所で一貫した設定を行うために使用する、内部プログラムです。スクリプトアプリケーションで使いやすい方法で、メイン設定ファイル /etc/apt/apt.conf にアクセスします。

-h オプションや --help オプションを除き、以下に挙げるコマンドが必要です。

shell

shell は、シェルスクリプトから設定情報にアクセスするのに使用します。引数として、まずシェル変数、次に取得したい設定値をペアで与えます。出力として、現在の値ごとのシェル代入コマンドを列挙します。シェルスクリプト内では、以下のようにしてください。

OPTS="-f"
RES=`apt-config shell OPTS MyApp::options`
eval $RES
これは、MyApp::options の値をシェル環境変数 $OPTS にセットします。デフォルト値は -f となります。

設定項目は /[fdbi] を後ろに付けられます。f はファイル名を、d はディレクトリを、b は true か false を、i は整数を返します。返り値ごとに内部で正規化と検証を行います。

dump

設定箇所の内容を表示するだけです。

オプション

All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like -f-,--no-f, -f=no or several other variations.

--empty

値が空のオプションを含めます。これはデフォルトですので、出力から取り除くには --no-empty としてください。

--format '%f "%v";%n'

各設定オプションの出力を定義します。%t はオプション名に、%f は完全オプション名に、%v はオプションの値に置換されます。大文字や特殊文字を使用する値は、安全を保証するために、RFC822 で定義されている quoted-string でエンコードされることになります。さらに、%n は改行に、%N はタブ文字になります。% を出力するには、%% としてください。

-h, --help

Show a short usage summary.

-v, --version

Show the program version.

-c, --config-file

Configuration File; Specify a configuration file to use. The program will read the default configuration file and then this configuration file. If configuration settings need to be set before the default configuration files are parsed specify a file with the APT_CONFIG environment variable. See apt.conf(5) for syntax information.

-o, --option

Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option can be used multiple times to set different options.

関連項目

apt.conf(5)

診断メッセージ

apt-config は正常終了時に 0 を返します。エラー時には十進の 100 を返します。

BUGS

APT bug page[1]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.

TRANSLATION

The english translation was done by John Doe <john@doe.org> in 2009, 2010 and Daniela Acme <daniela@acme.us> in 2010 together with the Debian Dummy l10n Team <debian-l10n-dummy@lists.debian.org>.

Note that this translated document may contain untranslated parts. This is done on purpose, to avoid losing content when the translation is lagging behind the original content.

著者

Gunthorpe Jason[FAMILY Given]

[FAMILY Given]

注記

1.
APT bug page
30 11 月 2013 APT 1.4.9