summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-07-05 09:50:02 +0000
committerJulian Andres Klode <jak@debian.org>2021-07-05 09:50:02 +0000
commitb1a384c646427e52abef5bdb799f7bbdbb505bb6 (patch)
treecf4a44b08067ab1563d00a5437d06c43b4927eed /apt-pkg/deb
parent690f6191a4332123a912c812a19a37cef253e90c (diff)
parente6056cbc8faf82c368d4439b0fcdcf4f46047d59 (diff)
Merge branch 'fix/sizesharing' into 'main'
Allow packages from volatile sources to be reinstalled See merge request apt-team/apt!177
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/deblistparser.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index d0f0838d0..966246ca7 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -404,8 +404,13 @@ uint32_t debListParser::VersionHash()
half-configured, triggers-awaited, triggers-pending, installed
*/
bool debListParser::ParseStatus(pkgCache::PkgIterator &,
- pkgCache::VerIterator &)
+ pkgCache::VerIterator &Ver)
{
+ // the status file has no info about the download size and
+ // usually this is fine as we will have picked that info up already –
+ // except if we have volatile sources which are parsed after the status file.
+ if (Ver->Size == 0)
+ Ver->Size = Section.FindULL(pkgTagSection::Key::Size);
return true;
}
bool debStatusListParser::ParseStatus(pkgCache::PkgIterator &Pkg,