diff options
author | David Kalnischkies <david@kalnischkies.de> | 2021-06-10 12:58:24 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2021-06-10 12:58:24 +0200 |
commit | 7adecd8b2543fc8ee5288b91525a366cf9525cb8 (patch) | |
tree | 387fa3b5c4f4b3789d4b5dc61f6fa36f0abb0348 /apt-pkg | |
parent | e45417c4767c2e54def08f52d55350ed0651d95a (diff) |
Store size from volatile sources for already installed versions
Volatile sources are parsed after the status file, so if we have a
version already installed the size information is not stored, so that
a reinstall of said version is refused claiming a broken repository.
References: 1412cf51403286e9c040f9f86fd4d8306e62aff2
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 7 |
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, |