<!-- -*- mode: sgml; mode: fold -*- -->
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [

<!ENTITY % aptent SYSTEM "apt.ent">
%aptent;

]>

<refentry>
 &apt-docinfo;
 
 <refmeta>
   <refentrytitle>apt-sortpkgs</>
   <manvolnum>1</>
 </refmeta>
 
 <!-- Man page title -->
 <refnamediv>
    <refname>apt-sortpkgs</>
    <refpurpose>Utility to sort package index files</>
 </refnamediv>

 <!-- Arguments -->
 <refsynopsisdiv>
   <cmdsynopsis>
      <command>apt-sortpkgs</>
      <arg><option>-hvs</></arg>
      <arg><option>-o=<replaceable/config string/</></arg>
      <arg><option>-c=<replaceable/file/</></arg>
      <arg choice="plain" rep="repeat"><replaceable>file</replaceable></arg>
   </cmdsynopsis>
 </refsynopsisdiv>
 
 <RefSect1><Title>Description</>
   <para>   
   <command/apt-sortpkgs/ will take an index file (Source index or Package 
   index) and sort the records so that they are ordered by the package name. 
   It will also sort the internal fields of each record according to the 
   internal sorting rules.

   <para>
   All output is sent to stdout, the input must be a seekable file.
 </RefSect1>
 
 <RefSect1><Title>Options</>
   &apt-cmdblurb;
   
   <VariableList>
     <VarListEntry><term><option/-s/</><term><option/--source/</>
     <ListItem><Para>
     Use Source index field ordering.
     Configuration Item: <literal/APT::SortPkgs::Source/.
     </VarListEntry>
   
     &apt-commonoptions;
     
   </VariableList>
 </RefSect1>

 <RefSect1><Title>See Also</>
   <para>
   &apt-conf;
 </RefSect1>

 <RefSect1><Title>Diagnostics</>
   <para>
   <command/apt-sortpkgs/ returns zero on normal operation, decimal 100 on error.
 </RefSect1>

 &manbugs;
 &manauthor;
 
</refentry>