diff options
| author | Julian Andres Klode <jak@debian.org> | 2021-04-13 15:22:37 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2021-04-13 15:22:37 +0000 |
| commit | 734c6ce0d3250d0b35cf3d0dd54e8baae3774fa8 (patch) | |
| tree | cea11605e9ddbe8e5763d8f2e822d9c764dbd363 /apt-pkg | |
| parent | 7a3b13832bf60d8d086c07ea96aa656ac9439f66 (diff) | |
| parent | 1412cf51403286e9c040f9f86fd4d8306e62aff2 (diff) | |
Merge branch 'pu/unsized-packages' into 'main'
Fix downloads of unsized files that are largest in pipeline
See merge request apt-team/apt!161
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/acquire-item.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index ab4306aac..2bab7d5c0 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3469,6 +3469,13 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *const Owner, pkgSourceList *const Sourc Version.VerStr(), Version.ParentPkg().FullName(false).c_str()); return; } + 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()); + return; + } // Check if we already downloaded the file struct stat Buf; |
