summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc5
-rw-r--r--apt-pkg/deb/deblistparser.cc7
2 files changed, 8 insertions, 4 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index d6ffaf34d..37a715390 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -3471,9 +3471,8 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *const Owner, pkgSourceList *const Sourc
}
if (FileSize == 0 && not _config->FindB("Acquire::AllowUnsizedPackages", false))
{
- _error->Error("Repository is broken: %s (= %s) has no Size information",
- Version.ParentPkg().FullName(false).c_str(),
- Version.VerStr());
+ _error->Error("Repository is broken: %s has no Size information",
+ Desc.Description.c_str());
return;
}
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,