From b33677749142e0997121d358277b18136bdbef87 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 26 Feb 2025 12:18:39 +0100 Subject: Consider 0-size debs not downloadable, set a size in EDSP EDSP dumps all appear as a single file, so we cannot determine correctly if a package is obsolete. We can fix this by ensuring that only debs with a size are downloadable, and then by faking a size in EDSP: The size is 1 if APT-Release is set (there is a source to download it from) or 0 otherwise. This ensures that the obsolete logic in solver3 works correctly, as well as the obsolete patterns, if anyone could actually use it on the EDSP files. --- apt-pkg/edsp/edsplistparser.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/edsp') 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; } /*}}}*/ -- cgit v1.2.3-70-g09d2