X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/c59667c189fa698c540c8bf42473ac00ec6fab62..6acc957ea66495a8f0fe8500f4fa00afa8780469:/doc/cache.sgml diff --git a/doc/cache.sgml b/doc/cache.sgml index dd8ca9277..7d2334761 100644 --- a/doc/cache.sgml +++ b/doc/cache.sgml @@ -4,7 +4,7 @@ APT Cache File Format Jason Gunthorpe jgg@debian.org -$Id: cache.sgml,v 1.2 1998/07/05 05:43:09 jgg Exp $ +$Id: cache.sgml,v 1.8 2001/02/20 07:03:17 jgg Exp $ This document describes the complete implementation and format of the APT @@ -144,6 +144,9 @@ This is the first item in the file. // Offsets unsigned long FileList; // PackageFile unsigned long StringList; // StringItem + unsigned long VerSysName; // StringTable + unsigned long Architecture; // StringTable + unsigned long MaxVerFileSize; // Allocation pools struct @@ -154,7 +157,7 @@ This is the first item in the file. } Pools[7]; // Package name lookup - unsigned long HashTable[512]; // Package + unsigned long HashTable[2*1024]; // Package }; @@ -190,9 +193,19 @@ the client should refuse the load the file. DependsCount PackageFileCount 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. +VerSysName +String representing the versiong system used for this cache + +Architecture +Architecture the cache was built against. + +MaxVerFileSize +The maximum size of a raw entry from the original Package file +(ie VerFile::Size) is stored here. + FileList This contains the index of the first PackageFile structure. The PackageFile structures are singely linked lists that represent all package files that @@ -247,9 +260,7 @@ the Header->HashTable. // 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 @@ -281,17 +292,10 @@ package. In this way multiple versions of a package can be cleanly handled by the system. Furthermore, this linked list is guarenteed to be sorted from Highest version to lowest version with no duplicate entries. -TargetVer CurrentVer -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. -TargetDist -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. - Section This indicates the deduced section. It should be "Unknown" or the section of the last parsed item. @@ -329,7 +333,7 @@ status file emitter uses this to track which packages have been emitted already. Flags -Flags are some usefull indicators of the package's state. +Flags are some useful indicators of the package's state. @@ -346,10 +350,16 @@ Header.FileList { // 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; @@ -362,11 +372,21 @@ Header.FileList FileName Refers the the physical disk file that this PacakgeFile represents. -Version -Version is the given version, ie 1.3.1, 2.4_revision_1 etc. +Archive +Component +Version +Origin +Label +Architecture +NotAutomatic +This is the release information. Please see the files document for a +description of what the release information means. + +Site +The site the index file was fetched from. -Distribution -Distribution is the symbolic name for this PackageFile, hamm,bo,rexx etc +IndexType +A string indicating what sort of index file this is. Size Size is provided as a simple check to ensure that the package file has not @@ -401,6 +421,7 @@ VerStr). { unsigned long VerStr; // Stringtable unsigned long Section; // StringTable (StringItem) + unsigned long Arch; // StringTable // Lists unsigned long FileList; // VerFile @@ -411,6 +432,7 @@ VerStr). unsigned long Size; unsigned long InstalledSize; + unsigned long Hash; unsigned short ID; unsigned char Priority; }; @@ -430,6 +452,9 @@ a 0 in all other fields excluding VerStr and Possibly NextVer. This string indicates which section it is part of. The string should be contained in the StringItem list. +Arch +Architecture the package was compiled for. + NextVer Next step in the linked list. @@ -448,6 +473,10 @@ Head of the linked list of Provides::NextPkgProv, forward provides. 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 +Hash +This is a characteristic value representing this package. No two packages +in existance should have the same VerStr and Hash with different contents. + ID See Package::ID. @@ -600,7 +629,7 @@ this version. StringItem

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. struct StringItem @@ -721,6 +750,7 @@ Zero is used for unparsable or absent Priority fields.

#define pkgFLAG_NotSource (1 << 0) +#define pkgFLAG_NotAutomatic (1 << 1)