Skip to content

Commit ef84d50

Browse files
author
Matthias Koeppe
committed
build/bin/write-dockerfile.sh: Shell-quote system packages
1 parent e4a39d0 commit ef84d50

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

build/bin/write-dockerfile.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ export PATH="$SAGE_ROOT"/build/bin:$PATH
1616
SYSTEM_PACKAGES=$EXTRA_SYSTEM_PACKAGES
1717
CONFIGURE_ARGS="--enable-option-checking "
1818
for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do
19-
SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG | sed 's/${PYTHON_MINOR}/'${PYTHON_MINOR}'/g')
19+
SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG)
2020
if [ -n "${SYSTEM_PACKAGE}" ]; then
21-
# SYSTEM_PACKAGE can be empty if, for example, the environment
22-
# variable ENABLE_SYSTEM_SITE_PACKAGES is empty.
23-
SYSTEM_PACKAGES+=" ${SYSTEM_PACKAGE}"
24-
CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
21+
# SYSTEM_PACKAGE can be empty if, for example, the environment
22+
# variable ENABLE_SYSTEM_SITE_PACKAGES is empty.
23+
for a in $SYSTEM_PACKAGE; do
24+
# shell-quote package if necessary
25+
SYSTEM_PACKAGES+=$(printf " %q" "$a")
26+
done
27+
CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
2528
fi
2629
done
2730
echo "# Automatically generated by SAGE_ROOT/build/bin/write-dockerfile.sh"

0 commit comments

Comments
 (0)