diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2022-06-25 18:12:21 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2022-06-27 09:09:40 +0200 |
commit | be341d3e10b976c8a8724c4b220331fbaf1c4b35 (patch) | |
tree | 9a4723724b0fd1308767a564c94a2d44a781de10 | |
parent | 8e6f55ce8253e9b1d06f681b0bbfec61e7f0eaf3 (diff) | |
download | NetworkManager-be341d3e10b976c8a8724c4b220331fbaf1c4b35.tar.gz |
contrib/debian: rework package install
Apt is run for each package separately and errors are ignored. This is
not great -- it's slow and ignores errors. Therefore we sometimes end
up without packages we need.
Let's tolerate errors only for packages that we are know can fail to
install safely.
-rwxr-xr-x | contrib/debian/REQUIRED_PACKAGES | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/contrib/debian/REQUIRED_PACKAGES b/contrib/debian/REQUIRED_PACKAGES index eb38a3fa7d..9c5f294cd3 100755 --- a/contrib/debian/REQUIRED_PACKAGES +++ b/contrib/debian/REQUIRED_PACKAGES @@ -1,5 +1,7 @@ #!/bin/bash +set -xe + # A list of packages useful/needed to build and develop # NetworkManager on Debian and Ubuntu. # @@ -11,15 +13,20 @@ # This is a generous list of related packages. install() { - for p in "$@"; do - if [ "$NM_INSTALL" != "" ]; then - $NM_INSTALL "$p" || : - else - sudo apt-get install -y "$p" || : - fi + if [ "$NM_INSTALL" != "" ]; then + $NM_INSTALL "$@" + else + sudo apt-get install -y "$@" + fi +} + +install_ignore_missing() { + for p; do + install "$p" || : done } + install \ \ autoconf \ @@ -38,11 +45,9 @@ install \ libaudit-dev \ libcurl4-gnutls-dev \ libdbus-1-dev \ - libgcrypt11-dev \ libgirepository1.0-dev \ libglib2.0-dev \ libglib2.0-doc \ - libgnutls-dev \ libgnutls28-dev \ libiw-dev \ libjansson-dev \ @@ -65,10 +70,7 @@ install \ policykit-1 \ ppp \ ppp-dev \ - python-dbus \ - python-gi \ python-setuptools \ - python-software-properties \ python3-dbus \ python3-gi \ python3-pip \ @@ -78,3 +80,26 @@ install \ valgrind \ \ #end + +# Old. Present in Ubuntu 20.04, not in Ubuntu 22.04 +# software-properties-common +install_ignore_missing \ + python-dbus \ + python-gi \ + \ + #end + +# Old. Present in Ubuntu 18.04, not in Ubuntu 20.04 +# software-properties-common +install_ignore_missing \ + libgcrypt11-dev \ + \ + #end + +# Old. Present in Ubuntu 16.04, not in Ubuntu 18.04 +# software-properties-common +install_ignore_missing \ + libgnutls-dev \ + python-software-properties \ + \ + #end |