]> git.saurik.com Git - apt.git/blob - doc/apt-config.8.xml
* imported changes from apt--main
[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
12 <refentryinfo>
13 &apt-author.jgunthorpe;
14 &apt-author.team;
15 &apt-email;
16 &apt-product;
17 <!-- The last update date -->
18 <date>29 February 2004</date>
19 </refentryinfo>
20
21 <refmeta>
22 <refentrytitle>apt-config</refentrytitle>
23 <manvolnum>8</manvolnum>
24 </refmeta>
25
26 <!-- Man page title -->
27 <refnamediv>
28 <refname>apt-config</refname>
29 <refpurpose>APT Configuration Query program</refpurpose>
30 </refnamediv>
31
32 <!-- Arguments -->
33 <refsynopsisdiv>
34 <cmdsynopsis>
35 <command>apt-config</command>
36 <arg><option>-hv</option></arg>
37 <arg><option>-o=<replaceable>config string</replaceable></option></arg>
38 <arg><option>-c=<replaceable>file</replaceable></option></arg>
39 <group choice="req">
40 <arg>shell</arg>
41 <arg>dump</arg>
42 </group>
43 </cmdsynopsis>
44 </refsynopsisdiv>
45
46 <refsect1><title>Description</title>
47 <para><command>apt-config</command> is an internal program used by various
48 portions of the APT suite to provide consistent configurability. It accesses
49 the main configuration file <filename>/etc/apt/apt.conf</filename> in a
50 manner that is easy to use by scripted applications.</para>
51
52 <para>Unless the <option>-h</option>, or <option>--help</option> option is
53 given one of the commands below must be present.
54 </para>
55
56 <variablelist>
57 <varlistentry><term>shell</term>
58 <listitem><para>
59 shell is used to access the configuration information from a shell
60 script. It is given pairs of arguments, the first being a shell
61 variable and the second the configuration value to query. As output
62 it lists a series of shell assignments commands for each present value.
63 In a shell script it should be used like:
64 </para>
65
66 <informalexample><programlisting>
67 OPTS="-f"
68 RES=`apt-config shell OPTS MyApp::options`
69 eval $RES
70 </programlisting></informalexample>
71
72 <para>This will set the shell environment variable $OPTS to the value of
73 MyApp::options with a default of <option>-f</option>.</para>
74
75
76 <para>The configuration item may be postfixed with a /[fdbi]. f returns
77 file names, d returns directories, b returns true or false and i returns
78 an integer. Each of the returns is normalized and verified
79 internally.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry><term>dump</term>
84 <listitem><para>
85 Just show the contents of the configuration space.</para>
86 </listitem>
87 </varlistentry>
88
89 </variablelist>
90 </refsect1>
91
92 <refsect1><title>options</title>
93 &apt-cmdblurb;
94
95 <variablelist>
96
97 &apt-commonoptions;
98
99 </variablelist>
100 </refsect1>
101
102 <refsect1><title>See Also</title>
103 <para>&apt-conf;
104 </para>
105 </refsect1>
106
107 <refsect1><title>Diagnostics</title>
108 <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
109 </para>
110 </refsect1>
111
112 &manbugs;
113
114 </refentry>
115