Skip to content

Commit 0c15173

Browse files
larsewiclaude
andcommitted
Reduce dpkg install noise with run_and_print_on_failure
Each dpkg -i call produces ~8 lines of verbose output per package (Selecting, Reading database, Preparing, Unpacking, Setting up). For a hub build with ~20 dependencies this adds ~160 lines of noise to the Jenkins logs. Wrap the dpkg call with run_and_print_on_failure so output is only shown when installation fails. Also remove -x from shebang to suppress shell trace output. Ticket: ENT-12619 Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 66ec754 commit 0c15173

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

deps-packaging/pkg-install-deb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
#!/bin/sh -ex
1+
#!/bin/sh -e
22

33
# Installs given packages
44

5+
. "$(dirname "$0")/../build-scripts/functions"
56

67
if [ $# -eq 0 ]; then
7-
echo "Usage: $0 <pkg> [<pkg> ...]"
8-
exit 1
8+
echo "Usage: $0 <pkg> [<pkg> ...]"
9+
exit 1
910
fi
1011

11-
sudo dpkg -i "$@"
12+
log_debug "Installing packages: $*"
13+
run_and_print_on_failure sudo dpkg -i "$@"

0 commit comments

Comments
 (0)