Skip to content

Commit d2dfa47

Browse files
committed
debian_buildenv.sh: Fix race condition in fonts-ubuntu check
1 parent f404922 commit d2dfa47

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tools/debian_buildenv.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@ case "$1" in
6363
fi
6464

6565
# Check if fonts-ubuntu is available (from non-free repository)
66-
if ! apt-cache show fonts-ubuntu 2>/dev/null | grep -q "Package: fonts-ubuntu"; then
66+
if apt-cache show fonts-ubuntu 2>/dev/null >/dev/null; then
67+
sudo apt-get install -y --no-install-recommends lld
68+
else
6769
echo ""
6870
echo "WARNING: The package 'fonts-ubuntu' is not available."
6971
echo "This package is required for Mixxx and is located in the Debian non-free repository."
7072
echo ""
7173
echo "See also: https://wiki.debian.org/SourcesList"
7274
echo ""
73-
read -p "Would you like to exit to enable 'non-free' now? (y = Exit / n = Continue without fonts): " -n 1 -r
75+
read -p "Would you like to exit to manually enable 'non-free' now? (y = Exit / n = Continue without fonts): " -n 1 -r
7476
echo
7577
if [[ $REPLY =~ ^[Yy]$ ]]; then
7678
echo "Please edit your /etc/apt/sources.list, run 'sudo apt update', and restart this script."
7779
exit 1
7880
fi
79-
else
80-
FONTS_UBUNTU_AVAILABLE=true
8181
fi
8282

8383
sudo apt-get install -y --no-install-recommends -- \
@@ -90,7 +90,6 @@ case "$1" in
9090
docbook-to-man \
9191
dput \
9292
fonts-open-sans \
93-
"$([ "$FONTS_UBUNTU_AVAILABLE" = true ] && echo "fonts-ubuntu")" \
9493
g++ \
9594
lcov \
9695
libavformat-dev \

0 commit comments

Comments
 (0)