diff options
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/edsp/edsplistparser.cc | 2 | ||||
| -rw-r--r-- | apt-pkg/pkgcache.cc | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index f591a6a54..14967e110 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -56,6 +56,8 @@ bool edspLikeListParser::NewVersion(pkgCache::VerIterator &Ver) } } + // Fake a size such that the deb appears downloadable if it has a source + Ver->Size = Section.Exists("APT-Release"); return true; } /*}}}*/ diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index a27b1b054..4101fb4e5 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -864,6 +864,10 @@ int pkgCache::VerIterator::CompareVer(const VerIterator &B) const /* */ APT_PURE bool pkgCache::VerIterator::Downloadable() const { + // A zero size deb is not downloadable + if (S->Size == 0) + return false; + VerFileIterator Files = FileList(); for (; Files.end() == false; ++Files) if (Files.File().Flagged(pkgCache::Flag::NotSource) == false) |
