From 1c493e34045487d56548fa0cf073bb4b795b4659 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Thu, 16 Jan 2020 01:48:26 +0200 Subject: [PATCH] apt: show more informative messages if "repository has no release file" During repository updates & cleanup there can be a short period of time when repository metadata is not consistent. There may appear an error like E: The repository 'https://termux.org/package stable Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. but it may not be clear for some users what can cause the issue. This commit improves the situation a bit. --- packages/apt/0011-update-error-messages.patch | 26 +++++++++++++++++++ packages/apt/build.sh | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 packages/apt/0011-update-error-messages.patch diff --git a/packages/apt/0011-update-error-messages.patch b/packages/apt/0011-update-error-messages.patch new file mode 100644 index 000000000..28289746d --- /dev/null +++ b/packages/apt/0011-update-error-messages.patch @@ -0,0 +1,26 @@ +diff -uNr apt-1.4.9/apt-pkg/acquire-item.cc apt-1.4.9.mod/apt-pkg/acquire-item.cc +--- apt-1.4.9/apt-pkg/acquire-item.cc 2019-01-18 12:42:07.000000000 +0200 ++++ apt-1.4.9.mod/apt-pkg/acquire-item.cc 2020-01-16 01:46:26.562224655 +0200 +@@ -180,17 +180,11 @@ + { + std::string m; + strprintf(m, msg, repo.c_str()); +- if (isError) +- { +- _error->Error("%s", m.c_str()); +- _error->Notice("%s", _("Updating from such a repository can't be done securely, and is therefore disabled by default.")); +- } +- else +- { +- _error->Warning("%s", m.c_str()); +- _error->Notice("%s", _("Data from such a repository can't be authenticated and is therefore potentially dangerous to use.")); +- } +- _error->Notice("%s", _("See apt-secure(8) manpage for repository creation and user configuration details.")); ++ ++ _error->Error("%s", m.c_str()); ++ _error->Notice("%s", _("Metadata integrity can't be verified, repository is disabled now.")); ++ _error->Notice("%s", _("Possible cause: repository is under maintenance or down (wrong sources.list URL?).")); ++ + return false; + } + /*}}}*/ diff --git a/packages/apt/build.sh b/packages/apt/build.sh index 7389b9c75..0a1ed8a90 100644 --- a/packages/apt/build.sh +++ b/packages/apt/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_VERSION=1.4.9 -TERMUX_PKG_REVISION=24 +TERMUX_PKG_REVISION=25 TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=d4d65e7c84da86f3e6dcc933bba46a08db429c9d933b667c864f5c0e880bac0d # apt-key requires utilities from coreutils, findutils, gpgv, grep, sed.