<simpara
  >&config.OS.NAME; uses <application>dpkg</application> for package
  management. It maintains a set of loosely indexed text files in
  <filename>/var/lib/dpkg/</filename>. The whole thing is not well
  suited for our kind of query.
</simpara>

<formalpara>
  <title>Source: &config.PRE;/packages/deb/du.sh</title>
  <para>
    <programlisting><inlinemediaobject><imageobject><imagedata
      format="linespecific"
      fileref="../../&config.PRE;/packages/deb/du.sh"
    /></imageobject></inlinemediaobject></programlisting>
  </para>
</formalpara>
<formalpara>
  <title>Output: &config.OUT;/packages/du</title>
  <para>
    <programlisting><inlinemediaobject><imageobject><imagedata
      format="linespecific"
      fileref="../../&config.OUT;/packages/du"
    /></imageobject></inlinemediaobject></programlisting>
  </para>
</formalpara>

<simpara
  >The first half of a simple example does a linear search trough
  <filename>/var/lib/dpkg/info/*.list</filename>:
</simpara>

<formalpara>
  <title>Source: &config.PRE;/packages/deb/simple.sh</title>
  <para>
    <programlisting><inlinemediaobject><imageobject><imagedata
      format="linespecific"
      fileref="../../&config.PRE;/packages/deb/simple.sh"
    /></imageobject></inlinemediaobject></programlisting>
  </para>
</formalpara>
<formalpara>
  <title>Output: &config.OUT;/packages/simple</title>
  <para>
    <programlisting><inlinemediaobject><imageobject><imagedata
      format="linespecific"
      fileref="../../&config.OUT;/packages/simple"
    /></imageobject></inlinemediaobject></programlisting>
  </para>
</formalpara>

<simpara
  >To create the table shown in the
  <link linkend="index">abstract</link> a second query is required.
  This one does a linear search through one huge text file,
  <filename>/var/lib/dpkg/status</filename>.
</simpara>

<formalpara>
  <title>Source: &config.PRE;/packages/deb/status.sh</title>
  <para>
    <programlisting><inlinemediaobject><imageobject><imagedata
      format="linespecific"
      fileref="../../&config.PRE;/packages/deb/status.sh"
    /></imageobject></inlinemediaobject></programlisting>
  </para>
</formalpara>
<formalpara>
  <title>Output: &config.OUT;/packages/deb/status</title>
  <para>
    <programlisting><inlinemediaobject><imageobject><imagedata
      format="linespecific"
      fileref="../../&config.OUT;/packages/deb/status"
    /></imageobject></inlinemediaobject></programlisting>
  </para>
</formalpara>
