diff options
author | David Kalnischkies <david@kalnischkies.de> | 2021-06-10 12:51:45 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2021-06-10 12:51:45 +0200 |
commit | e45417c4767c2e54def08f52d55350ed0651d95a (patch) | |
tree | e7a37df3d8f24d8e9a4187adcbbc4b7d76ec58b9 | |
parent | 06da685fc1abe073c379a34151500fc4d2d853fa (diff) |
Use full item description in broken repo error
The error says the repository is broken but doesn't mention which one it
is. The item description gives us at least all the information, but is
not as nicely formatted. As this message is not even marked for
translation this is a rather temporary affair and we can survive without
the eye candy for a while.
-rw-r--r-- | apt-pkg/acquire-item.cc | 5 | ||||
-rwxr-xr-x | test/integration/test-ubuntu-bug-1921626-unsized-packages | 2 |
2 files changed, 3 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/test/integration/test-ubuntu-bug-1921626-unsized-packages b/test/integration/test-ubuntu-bug-1921626-unsized-packages index 361cccd2e..441bc7043 100755 --- a/test/integration/test-ubuntu-bug-1921626-unsized-packages +++ b/test/integration/test-ubuntu-bug-1921626-unsized-packages @@ -40,4 +40,4 @@ Get:2 http://localhost:${APTHTTPPORT} stable/main all b all 1.0 [$size_b B] Get:3 http://localhost:${APTHTTPPORT} stable/main all c all 1.0 [$size_c B]" apt download a b c -o Acquire::AllowUnsizedPackages=true rm *.deb -testfailureequal "E: Repository is broken: b:i386 (= 1.0) has no Size information" apt download a b c +testfailureequal "E: Repository is broken: http://localhost:${APTHTTPPORT} stable/main all b all 1.0 has no Size information" apt download a b c |