From e490d6bfa27be27e379e6fc0b931480e7d5d9312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sat, 10 Feb 2024 07:23:11 +0100 Subject: [PATCH] Some minor changes to the CI scripts (#404) * octave_ci.m: Avoid error if previous versions depended on Ubuntu packages * octave_ci.m: Show output of apt in log * octave_ci.m: Avoid input prompts during Ubuntu package installation --- assets/ci/octave_ci.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/ci/octave_ci.m b/assets/ci/octave_ci.m index 40aa92af..239817e9 100644 --- a/assets/ci/octave_ci.m +++ b/assets/ci/octave_ci.m @@ -61,8 +61,10 @@ function octave_ci (package_name, pkg_index_file) if (! isempty (ubuntu2204)) step_group_start ("Install Ubuntu 22.04 dependencies"); - [~,~] = system ("sudo apt-get update"); - [~,~] = system (["sudo apt-get install --yes ", strjoin(ubuntu2204)]); + system ("sudo apt-get update"); + ## Avoid input prompts during package installation (e.g., for tzdata) + system (["sudo DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ", ... + "apt-get install --yes apt-utils ", strjoin(ubuntu2204)]); step_group_end ("done."); endif @@ -214,7 +216,7 @@ function pkg_install_sha256_check (pkg_version, test_dir) endfor endif - if (isfield (p, "ubuntu2204")) + if (isfield (p, "ubuntu2204") && ! isempty (p.ubuntu2204)) new_ubuntu2204 = {p.ubuntu2204.name}; for i = 1:length (new_ubuntu2204) ## Ubuntu/Debian package name must consist only of lower case letters