mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 06:28:05 +02:00
tests: fix failure installing non-existing packages in REQUIRED_PACKAGES
Previously, dnf/yum used to ignore packages that didn't exist. In Fedora 32, dnf starts to fail the entire command: No match for argument: python-gobject-base Error: Unable to find a match: python-gobject-base Since this script is supposed to work with different RHEL/Fedora versions, it's expected that not all packages are available everywhere. Fix that, by installing packages that we know that they might be missing one by one (and ignore the error). (cherry picked from commit185567559c) (cherry picked from commit888718d6f4)
This commit is contained in:
parent
298e57e446
commit
8845384e06
1 changed files with 16 additions and 4 deletions
|
|
@ -10,16 +10,25 @@
|
|||
# Not all of these packages are strictly speaking necessary.
|
||||
# This is a generous list of related packages.
|
||||
|
||||
set -xe
|
||||
|
||||
DNF="$(which dnf &>/dev/null && echo dnf || echo yum)"
|
||||
|
||||
install() {
|
||||
if [ "$NM_INSTALL" != "" ]; then
|
||||
$NM_INSTALL "$@"
|
||||
else
|
||||
sudo "$(which dnf &>/dev/null && echo dnf || echo yum)" install -y "$@"
|
||||
sudo "$DNF" install -y "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
install_ignore_missing() {
|
||||
for p; do
|
||||
install "$p" || :
|
||||
done
|
||||
}
|
||||
|
||||
install \
|
||||
\
|
||||
ModemManager-devel \
|
||||
ModemManager-glib-devel \
|
||||
audit-libs-devel \
|
||||
|
|
@ -56,7 +65,6 @@ install \
|
|||
ppp \
|
||||
ppp-devel \
|
||||
pygobject3-base \
|
||||
python-gobject-base \
|
||||
python3-dbus \
|
||||
python3-gobject \
|
||||
qt-devel \
|
||||
|
|
@ -68,5 +76,9 @@ install \
|
|||
vala-tools \
|
||||
valgrind \
|
||||
wireless-tools-devel \
|
||||
\
|
||||
#end
|
||||
|
||||
# some packages don't exist in certain distributions. Install them one-by-one, and ignore errors.
|
||||
install_ignore_missing \
|
||||
python-gobject-base \
|
||||
#end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue