Skip to content

Commit 472f751

Browse files
committed
Fix handling debian version in prepare-chroot-* scripts
The script get requested debian version as its second parameter. Save it to a variable actually used in the script. Previously the script used DEBIANVERSION variable (and in some places DIST), but the parameter was set to DISTRO variable not used anywhere else. This caused the parameter to be ignored and previous value of the DEBIANVERSION/DIST variables used instead (which by a coincidence were the same). Fix this by using DIST variable in all of those places consistently.
1 parent 203a96f commit 472f751

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

prepare-chroot-debian

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fi
1616
# $2: distribution [wheezy, jessie]
1717
# ------------------------------------------------------------------------------
1818
DIR=$1
19-
DISTRO=$2
19+
DIST=$2
2020

2121
set -e
2222

@@ -53,7 +53,7 @@ if ! [ -d $DIR/home/user ]; then
5353
COMPONENTS="" $DEBOOTSTRAP_PREFIX debootstrap --arch=amd64 \
5454
--include=ncurses-term,debian-keyring,$apt_https_pkgs,$eatmydata_maybe \
5555
--keyring=${DEBIAN_PLUGIN_DIR}keys/$DIST-debian-archive-keyring.gpg \
56-
$DEBIANVERSION $DIR https://deb.debian.org/debian \
56+
$DIST $DIR https://deb.debian.org/debian \
5757
|| { echo "Error in debootstrap"; exit 1; }
5858

5959
# --------------------------------------------------------------------------
@@ -152,7 +152,7 @@ fi
152152
# ------------------------------------------------------------------------------
153153
# Install Debian source repo
154154
# ------------------------------------------------------------------------------
155-
add_repo "deb-src https://deb.debian.org/debian ${DEBIANVERSION} main"
155+
add_repo "deb-src https://deb.debian.org/debian ${DIST} main"
156156

157157
if [ -n "$USE_QUBES_REPO_VERSION" ]; then
158158
add_repo "deb [arch=amd64] https://deb.qubes-os.org/r${USE_QUBES_REPO_VERSION}/vm $DIST main"
@@ -174,6 +174,6 @@ wc -L "${DIR}/var/lib/apt/lists/"*InRelease | awk '$1 > 1024 {print; exit 1}'
174174
# Update debian apt sources list to use local qubes repo
175175
# ------------------------------------------------------------------------------
176176
cat > $DIR/etc/apt/sources.list.d/qubes-builder.list <<EOF
177-
deb [trusted=yes] file:/tmp/qubes-deb $DEBIANVERSION main
177+
deb [trusted=yes] file:/tmp/qubes-deb $DIST main
178178
EOF
179179

prepare-chroot-qubuntu

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111
# $2: distribution [trusty ]
1212
# ------------------------------------------------------------------------------
1313
DIR=$1
14-
DISTRO=$2
14+
DIST=$2
1515

1616
set -e
1717

@@ -42,7 +42,7 @@ if ! [ -d $DIR/home/user ]; then
4242
COMPONENTS="" $DEBOOTSTRAP_PREFIX debootstrap --arch=amd64 \
4343
--include=ncurses-term,ubuntu-keyring,$eatmydata_maybe \
4444
--keyring=${DEBIAN_PLUGIN_DIR}/keys/$DIST-qubuntu-archive-keyring.gpg \
45-
$DEBIANVERSION $DIR http://archive.ubuntu.com/ubuntu \
45+
$DIST $DIR http://archive.ubuntu.com/ubuntu \
4646
|| { echo "Error in debootstrap"; exit 1; }
4747

4848
# --------------------------------------------------------------------------
@@ -127,6 +127,6 @@ chroot $DIR apt-get $APT_GET_OPTIONS install -y libpulse-dev
127127
# Update qubuntu apt sources list to use local qubes repo
128128
# ------------------------------------------------------------------------------
129129
cat > $DIR/etc/apt/sources.list.d/qubes-builder.list <<EOF
130-
deb [trusted=yes] file:/tmp/qubes-deb $DEBIANVERSION main
130+
deb [trusted=yes] file:/tmp/qubes-deb $DIST main
131131
EOF
132132

0 commit comments

Comments
 (0)