utils: always check some dependencies.

Every dependency in check_deps is used inside the script (apart from
git, which may be a historical artifact), and therefore should be
checked even when the -f option is passed to the script. Simply changed
at what point check_deps is called in order to always run it.

Fixes #6302.

Signed-off-by: Gabe Venberg <gabevenberg@gmail.com>
This commit is contained in:
Gabe Venberg 2023-02-16 23:00:19 -06:00
parent c1602c848a
commit 1047840cf8

View File

@ -327,7 +327,7 @@ check_deps()
debian|ubuntu) sudo apt-get -y install $packages ;; debian|ubuntu) sudo apt-get -y install $packages ;;
fedora) sudo dnf -y install $packages ;; fedora) sudo dnf -y install $packages ;;
opensuse*|sles) sudo zypper install -y $packages ;; opensuse*|sles) sudo zypper install -y $packages ;;
*) die "Unsupported distro: $ID" *) die "Unsupported distro: $ID, install $packages manually and re-run"
esac esac
} }
@ -343,10 +343,12 @@ setup()
source /etc/os-release || source /usr/lib/os-release source /etc/os-release || source /usr/lib/os-release
#these dependencies are needed inside this script, and should be checked regardless of the -f option.
check_deps
[ "$force" = "true" ] && return 0 [ "$force" = "true" ] && return 0
pre_checks pre_checks
check_deps
} }
# Download the requested version of the specified project. # Download the requested version of the specified project.