summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2015-05-15 02:32:07 (GMT)
committerCyril Brulebois <kibi@debian.org>2015-05-15 02:38:31 (GMT)
commitbe99f7b4c1fc622f9c4d4f93d96aec649ff7c543 (patch)
tree286ebcbb9d544a3693cbb338701df561e38a9ff4 /functions
parenteec4c44fc78efa492d4eea5ff69089b6b86979e1 (diff)
downloaddebootstrap-be99f7b4c1fc622f9c4d4f93d96aec649ff7c543.zip
debootstrap-be99f7b4c1fc622f9c4d4f93d96aec649ff7c543.tar.gz
debootstrap-be99f7b4c1fc622f9c4d4f93d96aec649ff7c543.tar.bz2
Add support for --force-check-gpg (Closes: #661501, #733179, #775454).
With this option, one can programmatically make sure keyring checks are used and that no fallback to an https mirror happens.
Diffstat (limited to 'functions')
-rw-r--r--functions5
1 files changed, 4 insertions, 1 deletions
diff --git a/functions b/functions
index c8d7787..d697c4f 100644
--- a/functions
+++ b/functions
@@ -200,11 +200,14 @@ keyring () {
if [ -e "$1" ]; then
KEYRING="$1"
elif [ -z "$DISABLE_KEYRING" ]; then
- if [ -n "$DEF_HTTPS_MIRROR" ] && [ -z "$USER_MIRROR" ] ; then
+ if [ -n "$DEF_HTTPS_MIRROR" ] && [ -z "$USER_MIRROR" ] && [ -z "$FORCE_KEYRING" ]; then
info KEYRING "Keyring file not available at %s; switching to https mirror %s" "$1" "$DEF_HTTPS_MIRROR"
USER_MIRROR="$DEF_HTTPS_MIRROR"
else
warning KEYRING "Cannot check Release signature; keyring file not available %s" "$1"
+ if [ -n "$FORCE_KEYRING" ]; then
+ error 1 KEYRING "Keyring-based check was requested; aborting accordingly"
+ fi
fi
fi
fi