summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-26 12:18:39 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-03-03 11:21:55 +0100
commitb33677749142e0997121d358277b18136bdbef87 (patch)
tree9781ce563d27ac6c3d73d5a35855f483029fa7bd /apt-pkg/edsp
parent10755b590311356ecdaa38dbfdf552b6b8fdaddc (diff)
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.
Diffstat (limited to 'apt-pkg/edsp')
-rw-r--r--apt-pkg/edsp/edsplistparser.cc2
1 files changed, 2 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;
}
/*}}}*/