Install required packages when changing GL settings

Fixes #78
This commit is contained in:
Serge Schneider 2020-01-13 16:56:24 +00:00
parent cabd4289a6
commit 4d1dc2e245
2 changed files with 8 additions and 2 deletions

1
debian/changelog vendored
View File

@ -3,6 +3,7 @@ raspi-config (20200109) UNRELEASED; urgency=medium
* Add proxy configuration
* Handle cases where SUDO_USER is unset
* Fix VNC options
* Install required packages when changing GL settings
-- Serge Schneider <serge@raspberrypi.org> Thu, 09 Jan 2020 14:38:50 +0000

View File

@ -1417,8 +1417,13 @@ do_gldriver() {
whiptail --msgbox "Driver and kernel not present on your system. Please update" 20 60 2
return 1
fi
if [ $(dpkg -l libgl1-mesa-dri | tail -n 1 | cut -d ' ' -f 1) != "ii" ]; then
whiptail --msgbox "libgl1-mesa-dri not found - please install" 20 60 2
for package in gldriver-test libgl1-mesa-dri; do
if [ "$(dpkg -l "$package" 2> /dev/null | tail -n 1 | cut -d ' ' -f 1)" != "ii" ]; then
missing_packages="$package $missing_packages"
fi
done
if [ -n "$missing_packages" ] && ! apt-get install $missing_packages; then
whiptail --msgbox "Required packages not found, please install: ${missing_packages}" 20 60 2
return 1
fi
if is_pifour ; then