[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 05/18] dependencies: trisquel: obtimize apt calls.
From: |
Denis 'GNUtoo' Carikli |
Subject: |
[PATCH v1 05/18] dependencies: trisquel: obtimize apt calls. |
Date: |
Fri, 29 Nov 2024 20:14:19 +0100 |
This makes sure that there is only one apt command that is called.
Since this change results in the some package names (like 'git') being
passed twice to apt install, this situation was tested with 'apt
install sl sl' on Trisquel 10 (nabia), Trisquel 11 (aramo) and also
PureOS 10 (byzantium) in case the trisquel and pureos dependencies are
merged later on, and it worked fine.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
resources/dependencies/trisquel | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/resources/dependencies/trisquel b/resources/dependencies/trisquel
index 784889e9..588832af 100755
--- a/resources/dependencies/trisquel
+++ b/resources/dependencies/trisquel
@@ -26,10 +26,9 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+to_install=""
install_packages()
{
- to_install=""
-
for package in $@ ; do
if dpkg -l "${package}" | grep "^ii" 2>&1>/dev/null ; then
continue
@@ -37,10 +36,6 @@ install_packages()
to_install="${to_install} ${package}"
fi
done
-
- if [ -n "${to_install}" ] ; then
- apt install -y ${to_install}
- fi
}
if [ $EUID -ne 0 ]; then
@@ -137,3 +132,7 @@ install_packages gawk git grep lzip make sed tar xz-utils #
u-boot-libre
install_packages \
pandoc \
graphviz
+
+if [ -n "${to_install}" ] ; then
+ apt install -y ${to_install}
+fi
--
2.46.0
- [PATCH v1 00/18] Tests cbfs files, dependencies fixes, documentation., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 01/18] resources: dependencies: trisquel: skip fonts-unifont for Trisquel 10 (nabia)., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 02/18] dependencies: pureos: Fix copyright header., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 03/18] dependencies: trisquel: remove unused packagekit-tools., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 04/18] dependencies: pureos: remove unused packagekit., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 05/18] dependencies: trisquel: obtimize apt calls.,
Denis 'GNUtoo' Carikli <=
- [PATCH v1 08/18] resources: dependencies: unify PureOS and Trisquel., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 07/18] dependencies: trisquel: remove duplicated libusb-1.0-0-dev for flashrom., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 11/18] dependencies: pureos-trisquel: Add texlive for the website., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 13/18] packages: images: tests: add Trisquel test with SeaBIOS., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 18/18] website: status: mention reproducible builds status., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 17/18] packages: images: tests: require essential cbfs files., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 06/18] resources: dependencies: pureos: switch to install_packages., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 12/18] dependencies: pureos-trisquel: Add texlive-plain-generic for the website., Denis 'GNUtoo' Carikli, 2024/11/29
- [PATCH v1 10/18] dependencies: pureos-trisquel: Add texinfo for the website., Denis 'GNUtoo' Carikli, 2024/11/29