summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-31 08:23:23 +0100
committerMichael Vogt <mvo@debian.org>2014-01-31 08:23:23 +0100
commitbb2e0d5add4a291f09d68ebb5588e45dc128d766 (patch)
tree7f4b41204f42eaf6c408fdf98597f61debd28a4a /apt-pkg
parent960975a175c2a21df749727162d5677cdc97a36e (diff)
parent25d99f3b42ada24679ddc1d911530425acc8e475 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/debsrcrecords.h6
-rw-r--r--apt-pkg/srcrecords.cc5
-rw-r--r--apt-pkg/tagfile.cc6
3 files changed, 11 insertions, 6 deletions
diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h
index 5d2a67f4f..a8fb465bb 100644
--- a/apt-pkg/deb/debsrcrecords.h
+++ b/apt-pkg/deb/debsrcrecords.h
@@ -30,7 +30,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser
public:
- virtual bool Restart() {return Tags.Jump(Sect,0);};
+ virtual bool Restart() {return Jump(0);};
virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);};
virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);};
@@ -50,8 +50,8 @@ class debSrcRecordParser : public pkgSrcRecords::Parser
virtual bool Files(std::vector<pkgSrcRecords::File> &F);
debSrcRecordParser(std::string const &File,pkgIndexFile const *Index)
- : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),
- Buffer(NULL) {}
+ : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),
+ iOffset(0), Buffer(NULL) {}
virtual ~debSrcRecordParser();
};
diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
index 297559957..60b62850a 100644
--- a/apt-pkg/srcrecords.cc
+++ b/apt-pkg/srcrecords.cc
@@ -70,8 +70,9 @@ bool pkgSrcRecords::Restart()
Current = Files.begin();
for (std::vector<Parser*>::iterator I = Files.begin();
I != Files.end(); ++I)
- (*I)->Restart();
-
+ if ((*I)->Offset() != 0)
+ (*I)->Restart();
+
return true;
}
/*}}}*/
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index b92b2c15a..832a40d1e 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -207,7 +207,11 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset)
unsigned long long Dist = Offset - d->iOffset;
d->Start += Dist;
d->iOffset += Dist;
- return Step(Tag);
+ // if we have seen the end, don't ask for more
+ if (d->Done == true)
+ return Tag.Scan(d->Start, d->End - d->Start);
+ else
+ return Step(Tag);
}
// Reposition and reload..