apt-config.8.xml 3.1 KB

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