* Replace SGML manpages with XML man pages from richard...
[ntk/apt.git] / doc / apt-config.8.xml
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
8 ]>
9
10 <refentry>
11 &apt-docinfo;
12
13 <refmeta>
14 <refentrytitle>apt-config</refentrytitle>
15 <manvolnum>8</manvolnum>
16 </refmeta>
17
18 <!-- Man page title -->
19 <refnamediv>
20 <refname>apt-config</refname>
21 <refpurpose>APT Configuration Query program</refpurpose>
22 </refnamediv>
23
24 <!-- Arguments -->
25 <refsynopsisdiv>
26 <cmdsynopsis>
27 <command>apt-config</command>
28 <arg><option>-hv</option></arg>
29 <arg><option>-o=<replaceable>config string</replaceable></option></arg>
30 <arg><option>-c=<replaceable>file</replaceable></option></arg>
31 <group choice="req">
32 <arg>shell</arg>
33 <arg>dump</arg>
34 </group>
35 </cmdsynopsis>
36 </refsynopsisdiv>
37
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>
59 OPTS="-f"
60 RES=`apt-config shell OPTS MyApp::options`
61 eval $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>
88
89 &apt-commonoptions;
90
91 </variablelist>
92 </refsect1>
93
94 <refsect1><title>See Also</title>
95 <para>
96 &apt-conf;
97 </para>
98 </refsect1>
99
100 <refsect1><title>Diagnostics</title>
101 <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
102 </para>
103 </refsect1>
104
105 &manbugs;
106 &manauthor;
107
108 </refentry>
109