* Patch from Otavio Salvador to exit successfully after...
[ntk/apt.git] / doc / apt-config.8.sgml
CommitLineData
b2e465d6
AL
1<!-- -*- mode: sgml; mode: fold -*- -->
2<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
3
4<!ENTITY % aptent SYSTEM "apt.ent">
5%aptent;
6
7]>
8
9<refentry>
10 &apt-docinfo;
11
12 <refmeta>
13 <refentrytitle>apt-config</>
14 <manvolnum>8</>
15 </refmeta>
16
17 <!-- Man page title -->
18 <refnamediv>
19 <refname>apt-config</>
20 <refpurpose>APT Configuration Query program</>
21 </refnamediv>
22
23 <!-- Arguments -->
24 <refsynopsisdiv>
25 <cmdsynopsis>
26 <command>apt-config</>
27 <arg><option>-hv</></arg>
28 <arg><option>-o=<replaceable/config string/</></arg>
29 <arg><option>-c=<replaceable/file/</></arg>
30 <group choice=req>
31 <arg>shell</>
32 <arg>dump</>
33 </group>
34 </cmdsynopsis>
35 </refsynopsisdiv>
36
37 <RefSect1><Title>Description</>
38 <para>
39 <command/apt-config/ is an internal program used by various portions of
40 the APT suite to provide consistent configurability. It accesses the main
877d310f 41 configuration file <filename>/etc/apt/apt.conf</> in a manner that is
b2e465d6
AL
42 easy to use by scripted applications.
43 <para>
09774285
AL
44 Unless the <option/-h/, or <option/--help/ option is given one of the
45 commands below must be present.
b2e465d6
AL
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>
65 This will set the shell environment variable $OPTS to the value of
66 MyApp::Options with a default of <option/-f/.
67
68 <para>
69 The configuration item may be postfixed with a /[fdbi]. f returns file
70 names, d returns directories, b returns true or false and i returns an
71 integer. Each of the returns is normalized and verified internally.
72 </VarListEntry>
73
74 <VarListEntry><Term>dump</Term>
75 <ListItem><Para>
76 Just show the contents of the configuration space.
77 </VarListEntry>
78
79 </VariableList>
80 </RefSect1>
81
82 <RefSect1><Title>Options</>
83 &apt-cmdblurb;
84
85 <VariableList>
86
87 &apt-commonoptions;
88
89 </VariableList>
90 </RefSect1>
91
92 <RefSect1><Title>See Also</>
93 <para>
94 &apt-conf;
95 </RefSect1>
96
97 <RefSect1><Title>Diagnostics</>
98 <para>
99 <command/apt-config/ returns zero on normal operation, decimal 100 on error.
100 </RefSect1>
101
102 &manbugs;
103 &manauthor;
104
105</refentry>