]> git.saurik.com Git - apt.git/blame - doc/apt-config.8.xml
* doc/*.xml:
[apt.git] / doc / apt-config.8.xml
CommitLineData
24f6490f
AL
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">
6%aptent;
7
0c1a7101
DK
8<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
9%aptverbatiment;
10
24f6490f
AL
11]>
12
13<refentry>
5e80de29
AL
14
15 <refentryinfo>
16 &apt-author.jgunthorpe;
17 &apt-author.team;
18 &apt-email;
19 &apt-product;
20 <!-- The last update date -->
21 <date>29 February 2004</date>
22 </refentryinfo>
24f6490f
AL
23
24 <refmeta>
25 <refentrytitle>apt-config</refentrytitle>
26 <manvolnum>8</manvolnum>
f0599b9c 27 <refmiscinfo class="manual">APT</refmiscinfo>
24f6490f
AL
28 </refmeta>
29
30 <!-- Man page title -->
31 <refnamediv>
32 <refname>apt-config</refname>
33 <refpurpose>APT Configuration Query program</refpurpose>
34 </refnamediv>
35
6e8b4572
DK
36 &synopsis-command-apt-config;
37
24f6490f
AL
38 <refsect1><title>Description</title>
39 <para><command>apt-config</command> is an internal program used by various
40 portions of the APT suite to provide consistent configurability. It accesses
41 the main configuration file <filename>/etc/apt/apt.conf</filename> in a
42 manner that is easy to use by scripted applications.</para>
43
44 <para>Unless the <option>-h</option>, or <option>--help</option> option is
45 given one of the commands below must be present.
46 </para>
47
48 <variablelist>
49 <varlistentry><term>shell</term>
50 <listitem><para>
51 shell is used to access the configuration information from a shell
52 script. It is given pairs of arguments, the first being a shell
53 variable and the second the configuration value to query. As output
54 it lists a series of shell assignments commands for each present value.
55 In a shell script it should be used like:
56 </para>
57
58<informalexample><programlisting>
59OPTS="-f"
60RES=`apt-config shell OPTS MyApp::options`
61eval $RES
62</programlisting></informalexample>
63
64 <para>This will set the shell environment variable $OPTS to the value of
65 MyApp::options with a default of <option>-f</option>.</para>
66
67
68 <para>The configuration item may be postfixed with a /[fdbi]. f returns
69 file names, d returns directories, b returns true or false and i returns
70 an integer. Each of the returns is normalized and verified
71 internally.</para>
72 </listitem>
73 </varlistentry>
74
75 <varlistentry><term>dump</term>
76 <listitem><para>
77 Just show the contents of the configuration space.</para>
78 </listitem>
79 </varlistentry>
80
81 </variablelist>
82 </refsect1>
83
84 <refsect1><title>options</title>
85 &apt-cmdblurb;
86
87 <variablelist>
a8813606
DK
88 <varlistentry>
89 <term><option>--empty</option></term>
90 <listitem><para>Include options which have an empty value. This is the default, so
91 use --no-empty to remove them from the output.</para></listitem>
92 </varlistentry>
93
94 <varlistentry>
95 <term><option>--format '<replaceable>&percnt;f &#x0022;&percnt;v&#x0022;;&percnt;n</replaceable>'</option></term>
c086ac18
DK
96 <listitem><para>Defines the output of each config option. &percnt;t will be replaced with the name of the option,
97 &percnt;f with the complete optionname and &percnt;v with the value of the option.
98 Use uppercase letters and special characters in the value will be encoded to ensure that
99 it can e.g. be savely used in a quoted-string as defined by RFC822. Additionally
a8813606
DK
100 &percnt;n will be replaced by a newline, &percnt;N by a tab. A &percnt; can be
101 printed by using &percnt;&percnt;.</para></listitem>
102 </varlistentry>
103
24f6490f
AL
104 &apt-commonoptions;
105
106 </variablelist>
107 </refsect1>
108
109 <refsect1><title>See Also</title>
5e80de29 110 <para>&apt-conf;
24f6490f
AL
111 </para>
112 </refsect1>
113
114 <refsect1><title>Diagnostics</title>
115 <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
116 </para>
117 </refsect1>
118
119 &manbugs;
24f6490f
AL
120
121</refentry>
122