<title>APT Cache File Format</title>
<author>Jason Gunthorpe <email>jgg@debian.org</email></author>
-<version>$Id: cache.sgml,v 1.3 1998/07/19 04:22:11 jgg Exp $</version>
+<version>$Id: cache.sgml,v 1.8 2001/02/20 07:03:17 jgg Exp $</version>
<abstract>
This document describes the complete implementation and format of the APT
unsigned long VersionCount;
unsigned long DependsCount;
unsigned long PackageFileCount;
- unsigned long MaxVerFileSize;
// Offsets
unsigned long FileList; // PackageFile
unsigned long StringList; // StringItem
+ unsigned long VerSysName; // StringTable
+ unsigned long Architecture; // StringTable
+ unsigned long MaxVerFileSize;
// Allocation pools
struct
} Pools[7];
// Package name lookup
- unsigned long HashTable[512]; // Package
+ unsigned long HashTable[2*1024]; // Package
};
</example>
<taglist>
<tag>DependsCount
<tag>PackageFileCount<item>
These indicate the number of each structure contianed in the cache.
-PackageCount is especially usefull for generating user state structures.
+PackageCount is especially useful for generating user state structures.
See Package::Id for more info.
+<tag>VerSysName<item>
+String representing the versiong system used for this cache
+
+<tag>Architecture<item>
+Architecture the cache was built against.
+
<tag>MaxVerFileSize<item>
The maximum size of a raw entry from the original Package file
(ie VerFile::Size) is stored here.
// Pointers
unsigned long Name; // Stringtable
unsigned long VersionList; // Version
- unsigned long TargetVer; // Version
unsigned long CurrentVer; // Version
- unsigned long TargetDist; // StringTable (StringItem)
unsigned long Section; // StringTable (StringItem)
// Linked lists
by the system. Furthermore, this linked list is guarenteed to be sorted
from Highest version to lowest version with no duplicate entries.
-<tag>TargetVer
<tag>CurrentVer<item>
-This is an index (pointer) to the sub version that is being targeted for
-upgrading. CurrentVer is an index to the installed version, either can be
+CurrentVer is an index to the installed version, either can be
0.
-<tag>TargetDist<item>
-This indicates the target distribution. Automatic upgrades should not go
-outside of the specified dist. If it is 0 then the global target dist should
-be used. The string should be contained in the StringItem list.
-
<tag>Section<item>
This indicates the deduced section. It should be "Unknown" or the section
of the last parsed item.
already.
<tag>Flags<item>
-Flags are some usefull indicators of the package's state.
+Flags are some useful indicators of the package's state.
</taglist>
{
// Names
unsigned long FileName; // Stringtable
+ unsigned long Archive; // Stringtable
+ unsigned long Component; // Stringtable
unsigned long Version; // Stringtable
- unsigned long Distribution; // Stringtable
+ unsigned long Origin; // Stringtable
+ unsigned long Label; // Stringtable
+ unsigned long Architecture; // Stringtable
+ unsigned long Site; // Stringtable
+ unsigned long IndexType; // Stringtable
unsigned long Size;
-
+
// Linked list
unsigned long NextFile; // PackageFile
unsigned short ID;
<tag>FileName<item>
Refers the the physical disk file that this PacakgeFile represents.
-<tag>Version<item>
-Version is the given version, ie 1.3.1, 2.4_revision_1 etc.
+<tag>Archive
+<tag>Component
+<tag>Version
+<tag>Origin
+<tag>Label
+<tag>Architecture
+<tag>NotAutomatic<item>
+This is the release information. Please see the files document for a
+description of what the release information means.
+
+<tag>Site<item>
+The site the index file was fetched from.
-<tag>Distribution<item>
-Distribution is the symbolic name for this PackageFile, hamm,bo,rexx etc
+<tag>IndexType<item>
+A string indicating what sort of index file this is.
<tag>Size<item>
Size is provided as a simple check to ensure that the package file has not
{
unsigned long VerStr; // Stringtable
unsigned long Section; // StringTable (StringItem)
+ unsigned long Arch; // StringTable
// Lists
unsigned long FileList; // VerFile
unsigned long Size;
unsigned long InstalledSize;
+ unsigned long Hash;
unsigned short ID;
unsigned char Priority;
};
This string indicates which section it is part of. The string should be
contained in the StringItem list.
+<tag>Arch<item>
+Architecture the package was compiled for.
+
<tag>NextVer<item>
Next step in the linked list.
The archive size for this version. For debian this is the size of the .deb
file. Installed size is the uncompressed size for this version
+<tag>Hash<item>
+This is a characteristic value representing this package. No two packages
+in existance should have the same VerStr and Hash with different contents.
+
<tag>ID<item>
See Package::ID.
<sect>StringItem
<p>
StringItem is used for generating single instances of strings. Some things
-like Section Name are are usefull to have as unique tags. It is part of
+like Section Name are are useful to have as unique tags. It is part of
a linked list based at Header::StringList.
<example>
struct StringItem
<p>
<example>
#define pkgFLAG_NotSource (1 << 0)
+#define pkgFLAG_NotAutomatic (1 << 1)
</example>
</sect1>