summaryrefslogtreecommitdiffstats
path: root/debootstrap
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-04-08 15:48:33 (GMT)
committerJoey Hess <joey@kitenet.net>2011-04-08 15:48:33 (GMT)
commit8ab67eded30d05a613d1f0f8c6c5420d8fe93948 (patch)
treeaed50d5a2fdf1d31f67bdf05f1e3d2d273f5e395 /debootstrap
parentc72e1705e402c17255493a7c3062b3cc86ac3b72 (diff)
downloaddebootstrap-8ab67eded30d05a613d1f0f8c6c5420d8fe93948.zip
debootstrap-8ab67eded30d05a613d1f0f8c6c5420d8fe93948.tar.gz
debootstrap-8ab67eded30d05a613d1f0f8c6c5420d8fe93948.tar.bz2
Clear all global variables used for options, so that unclean environment doesn't break debootstrap. Closes: #621657
With the notable exception of SHA_SIZE, which is used to communicate with debootstrap. Also, upper-cased a few global variables.
Diffstat (limited to 'debootstrap')
-rwxr-xr-xdebootstrap34
1 files changed, 25 insertions, 9 deletions
diff --git a/debootstrap b/debootstrap
index 0ca832d..e7e2a44 100755
--- a/debootstrap
+++ b/debootstrap
@@ -27,6 +27,22 @@ USE_COMPONENTS=main
KEYRING=""
DISABLE_KEYRING=""
VARIANT=""
+ARCH=""
+KEEP_DEBOOTSTRAP_DIR=""
+USE_BOOTFLOPPIES_INTERACTION=""
+USE_DEBIANINSTALLER_INTERACTION=""
+SECOND_STAGE_ONLY=""
+CHROOTDIR=""
+MAKE_TARBALL=""
+KEEP_DEBOOTSTRAP_DIR=""
+EXTRACTOR_OVERRIDE=""
+UNPACK_TARBALL=""
+ADDITIONAL=""
+EXCLUDE=""
+VERBOSE=""
+CERTIFICATE=""
+CHECKCERTIF=""
+PRIVATEKEY=""
DEF_MIRROR="http://ftp.us.debian.org/debian"
@@ -242,31 +258,31 @@ if [ $# != 0 ] ; then
;;
--include|--include=?*)
if [ "$1" = "--include" -a -n "$2" ]; then
- additional="$2"
+ ADDITIONAL="$2"
shift 2
elif [ "$1" != "${1#--include=}" ]; then
- additional="${1#--include=}"
+ ADDITIONAL="${1#--include=}"
shift 1
else
error 1 NEEDARG "option requires an argument %s" "$1"
fi
- additional="$(echo "$additional" | tr , " ")"
+ ADDITIONAL="$(echo "$ADDITIONAL" | tr , " ")"
;;
--exclude|--exclude=?*)
if [ "$1" = "--exclude" -a -n "$2" ]; then
- exclude="$2"
+ EXCLUDE="$2"
shift 2
elif [ "$1" != "${1#--exclude=}" ]; then
- exclude="${1#--exclude=}"
+ EXCLUDE="${1#--exclude=}"
shift 1
else
error 1 NEEDARG "option requires an argument %s" "$1"
fi
- exclude="$(echo "$exclude" | tr , " ")"
+ EXCLUDE="$(echo "$EXCLUDE" | tr , " ")"
;;
--verbose)
- verbose=true
- export verbose
+ VERBOSE=true
+ export VERBOSE
shift 1
;;
--components|--components=?*)
@@ -529,7 +545,7 @@ if am_doing_phase finddebs; then
work_out_debs
- base=$(without "$base $additional" "$exclude")
+ base=$(without "$base $ADDITIONAL" "$EXCLUDE")
if [ "$RESOLVE_DEPS" = true ]; then
requiredX=$(echo $(echo $required | tr ' ' '\n' | sort | uniq))