Skip to content

Commit

Permalink
improve VirtualBox version check
Browse files Browse the repository at this point in the history
  • Loading branch information
adrelanos committed Aug 18, 2023
1 parent 8df7c4d commit b1532ba
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions usr/bin/dist-installer-cli
Expand Up @@ -1716,10 +1716,12 @@ install_virtualbox_fedora(){
fi
}

get_virtualbox_version_fedora || \
if get_virtualbox_version_fedora ; then
test_pkg "${virtualbox_qt_package_name}" 2>/dev/null && has_virtualbox_qt=1
else
true "INFO: get_virtualbox_version_fedora failed the first time which is normal is the repository has not been enabled yet."
has_virtualbox_qt=0
test_pkg "${virtualbox_qt_package_name}" 2>/dev/null && has_virtualbox_qt=1
has_virtualbox_qt=0
fi

## Guard against adding extraneous repositories.
if test "${has_virtualbox_qt}" != "1"; then
Expand Down Expand Up @@ -1774,10 +1776,12 @@ install_virtualbox_debian(){
linux_headers="linux-headers-$(dpkg --print-architecture)"
install_pkg "${linux_headers}"

has_virtualbox_qt=0
get_virtualbox_version_debian || \
if get_virtualbox_version_debian ; then
test_pkg "${virtualbox_qt_package_name}" 2>/dev/null && has_virtualbox_qt=1
else
true "INFO: get_virtualbox_version_fedora failed the first time which is normal is the repository has not been enabled yet."
test_pkg "${virtualbox_qt_package_name}" 2>/dev/null && has_virtualbox_qt=1
has_virtualbox_qt=0
fi

if test "${has_virtualbox_qt}" != "1"; then
log notice "VirtualBox Installation: Preparing to install VirtualBox..."
Expand Down

0 comments on commit b1532ba

Please sign in to comment.