summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-03-03 10:44:50 +0000
committerJulian Andres Klode <jak@debian.org>2025-03-03 10:44:50 +0000
commit939aa53621fd6b884b1d3d48a7abc55bf6c16ca4 (patch)
tree80062a0bc3aa8c8ac8b248868e77680e4972f92a /apt-pkg/pkgcache.cc
parentc21598657c8e3e7eaf4f3337774878d1463a8711 (diff)
parent45b04762e1990a761a7c308f9e73a286a92f908a (diff)
Merge branch 'edsp-downloadable' into 'main'
Consider 0-size debs not downloadable, set a size in EDSP See merge request apt-team/apt!454
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc4
1 files changed, 4 insertions, 0 deletions
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)