summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/debsrcrecords.h6
-rw-r--r--apt-pkg/depcache.cc9
-rw-r--r--apt-pkg/srcrecords.cc5
-rw-r--r--apt-pkg/tagfile.cc6
4 files changed, 18 insertions, 8 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/depcache.cc b/apt-pkg/depcache.cc
index a3bb4fd3d..c39e8c628 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1134,8 +1134,13 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
std::clog << OutputInDepth(Depth) << Start << " can't be satisfied!" << std::endl;
if (Start.IsCritical() == false)
continue;
- // if the dependency was critical, we can't install it, so remove it again
- MarkDelete(Pkg,false,Depth + 1, false);
+ // if the dependency was critical, we have absolutely no chance to install it,
+ // so if it wasn't installed remove it again. If it was, discard the candidate
+ // as the problemresolver will trip over it otherwise trying to install it (#735967)
+ if (Pkg->CurrentVer == 0)
+ MarkDelete(Pkg,false,Depth + 1, false);
+ else
+ SetCandidateVersion(Pkg.CurrentVer());
return false;
}
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..