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