summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-01-02 20:24:53 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-01-02 20:24:53 +0100
commit6355a02fbfa1cffa9291095ede32c35737ed7419 (patch)
treea1ee26757b73cb1d8b54c5718736e9ed4baa3c66
parent6aa944bc539cea4095971ccb2354c1e8f9f2c90a (diff)
apt-key errors out nicely if wget is not installed (Closes: #545754)
-rwxr-xr-xcmdline/apt-key9
-rw-r--r--debian/changelog2
2 files changed, 10 insertions, 1 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key
index 5f4e02fdf..24010edf3 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -56,7 +56,14 @@ add_keys_with_verify_against_master_keyring() {
# (otherwise it does not make sense from a security POV)
net_update() {
if [ -z "$ARCHIVE_KEYRING_URI" ]; then
- echo "ERROR: no location for the archive-keyring given"
+ echo "ERROR: no location for the archive-keyring given"
+ exit 1
+ fi
+ # in theory we would need to depend on wget for this, but this feature
+ # isn't useable in debian anyway as we have no keyring uri nor a master key
+ if ! which wget >/dev/null 2>&1; then
+ echo "ERROR: an installed wget is required for a network-based update"
+ exit 1
fi
if [ ! -d /var/lib/apt/keyrings ]; then
mkdir -p /var/lib/apt/keyrings
diff --git a/debian/changelog b/debian/changelog
index ffd8f5c59..f70c5735f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,8 @@ apt (0.7.26) UNRELEASED; urgency=low
* share/*-archive.gpg:
- remove the horrible outdated files. We already depend on
the keyring so we don't need to ship our own version
+ * cmdline/apt-key:
+ - errors out if wget is not installed (Closes: #545754)
-- Michael Vogt <mvo@debian.org> Thu, 10 Dec 2009 22:02:38 +0100