summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:27 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:27 +0000
commit03e39e592311fd327ea516d31567557830634c86 (patch)
tree6fc4479836bf5df004ecc5b387854d95a54a7b05 /apt-pkg/pkgcachegen.cc
parentd7827acababa05db7e901d2dfeb27538ef6a6142 (diff)
Archive acquire code
Author: jgg Date: 1998-11-13 04:23:26 GMT Archive acquire code
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 0bec88fc8..bbf245b00 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.22 1998/11/12 03:28:31 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.23 1998/11/13 04:23:33 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -176,8 +176,14 @@ bool pkgCacheGenerator::NewFileVer(pkgCache::VerIterator &Ver,
pkgCache::VerFileIterator VF(Cache,Cache.VerFileP + VerFile);
VF->File = CurrentFile - Cache.PkgFileP;
- VF->NextFile = Ver->FileList;
- Ver->FileList = VF.Index();
+
+ // Link it to the end of the list
+ __apt_ptrloc *Last = &Ver->FileList;
+ for (pkgCache::VerFileIterator V = Ver.FileList(); V.end() == false; V++)
+ Last = &V->NextFile;
+ VF->NextFile = *Last;
+ *Last = VF.Index();
+
VF->Offset = List.Offset();
VF->Size = List.Size();
if (Cache.HeaderP->MaxVerFileSize < VF->Size)