]> git.saurik.com Git - apt-legacy.git/commitdiff
Break the ABI and fix the package limit.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 12 Jun 2014 15:17:10 +0000 (15:17 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 12 Jun 2014 15:17:10 +0000 (15:17 +0000)
A turbulence.diff

git-svn-id: http://svn.telesphoreo.org/trunk@790 514c082c-b64e-11dc-b46d-3d985efe055d

apt-pkg/pkgcache.h
apt-pkg/pkgcachegen.cc

index fc492e2f0f0c42ae3a48995729e114f62790957d..1903b2ffe34cf1b4bb6bba65125739ab68eb9375 100644 (file)
@@ -226,7 +226,7 @@ struct pkgCache::Package                                            /*{{{*/
    unsigned char InstState;         // Flags
    unsigned char CurrentState;      // State
    
-   unsigned short ID;
+   unsigned int ID;
    unsigned long Flags;
 };
 
@@ -247,7 +247,7 @@ struct pkgCache::PackageFile
    
    // Linked list
    map_ptrloc NextFile;        // PackageFile
-   unsigned short ID;
+   unsigned int ID;
    time_t mtime;                  // Modification time for the file
 };
                                                                        /*}}}*/
@@ -291,8 +291,9 @@ struct pkgCache::Version                                            /*{{{*/
    map_ptrloc Size;              // These are the .deb size
    map_ptrloc InstalledSize;
    unsigned short Hash;
-   unsigned short ID;
+   unsigned short ID1;
    unsigned char Priority;
+   unsigned short ID2;
 };
                                                                        /*}}}*/
 struct pkgCache::Description                                           /*{{{*/
@@ -308,7 +309,7 @@ struct pkgCache::Description                                                /*{{{*/
    map_ptrloc NextDesc;          // Description
    map_ptrloc ParentPkg;         // Package
 
-   unsigned short ID;
+   unsigned int ID;
 };
                                                                        /*}}}*/
 struct pkgCache::Dependency                                            /*{{{*/
index f20c3e579c0bc602cbb7eb5e00d293e4c4af0cb8..e5c572fbf22189b991fac7cabe58ad02a3f429a3 100644 (file)
@@ -296,7 +296,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
    if (Cache.HeaderP->PackageCount >= (1ULL<<sizeof(Cache.PkgP->ID)*8)-1)
       return _error->Error(_("Wow, you exceeded the number of package "
                             "names this APT is capable of."));
-   if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID)*8))-1)
+   if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID1)*8+sizeof(Cache.VerP->ID2)*8))-1)
       return _error->Error(_("Wow, you exceeded the number of versions "
                             "this APT is capable of."));
    if (Cache.HeaderP->DescriptionCount >= (1ULL<<(sizeof(Cache.DescP->ID)*8))-1)
@@ -446,7 +446,9 @@ unsigned long pkgCacheGenerator::NewVersion(pkgCache::VerIterator &Ver,
    // Fill it in
    Ver = pkgCache::VerIterator(Cache,Cache.VerP + Version);
    Ver->NextVer = Next;
-   Ver->ID = Cache.HeaderP->VersionCount++;
+   unsigned int ID = Cache.HeaderP->VersionCount++;
+   Ver->ID1 = ID & 0xffff;
+   Ver->ID2 = ID >> 16;
    Ver->VerStr = Map.WriteString(VerStr.Start, VerStr.Size);
    if (Ver->VerStr == 0)
       return 0;