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.
This commit is contained in:
parent
68b7e53144
commit
5aa214736c
|
@ -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;
|
||||
}
|
||||
/*}}}*/
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue