summaryrefslogtreecommitdiff
path: root/data/_apt7/turbulence.diff
blob: 0f80e2bd19a6d5910a382d66cffb15f4d2109be4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
diff -ru apt-0.7.25.3/apt-pkg/pkgcachegen.cc apt-0.7.25.3+iPhone/apt-pkg/pkgcachegen.cc
--- apt-0.7.25.3/apt-pkg/pkgcachegen.cc	2014-05-13 10:14:37.000000000 +0000
+++ apt-0.7.25.3+iPhone/apt-pkg/pkgcachegen.cc	2014-05-13 08:54:35.000000000 +0000
@@ -296,7 +296,7 @@
    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 @@
    // 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;
diff -ru apt-0.7.25.3/apt-pkg/pkgcache.h apt-0.7.25.3+iPhone/apt-pkg/pkgcache.h
--- apt-0.7.25.3/apt-pkg/pkgcache.h	2014-05-13 10:14:37.000000000 +0000
+++ apt-0.7.25.3+iPhone/apt-pkg/pkgcache.h	2014-05-13 10:17:33.000000000 +0000
@@ -226,7 +226,7 @@
    unsigned char InstState;         // Flags
    unsigned char CurrentState;      // State
    
-   unsigned short ID;
+   unsigned int ID;
    unsigned long Flags;
 };
 
@@ -247,7 +247,7 @@
    
    // Linked list
    map_ptrloc NextFile;        // PackageFile
-   unsigned short ID;
+   unsigned int ID;
    time_t mtime;                  // Modification time for the file
 };
 									/*}}}*/
@@ -291,8 +291,9 @@
    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 @@
    map_ptrloc NextDesc;          // Description
    map_ptrloc ParentPkg;         // Package
 
-   unsigned short ID;
+   unsigned int ID;
 };
 									/*}}}*/
 struct pkgCache::Dependency						/*{{{*/