From 6c077d7c2af5ebd454af9dcb49cfaaddcd2cc1db Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 18 Oct 2018 10:55:07 +1100 Subject: [PATCH] Turn down pkg-map and hook copy tracing output This is a lot of very low value noise in the logs as these iterate through all the elements (often doing nothing). Turn it down and add an echo so we just see what elements it is working on. Change-Id: I0687de4722766189db9d4a7bd7d3cfb45d387b62 --- .../elements/pkg-map/extra-data.d/10-create-pkg-map-dir | 3 ++- diskimage_builder/lib/common-functions | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir b/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir index 0eb6c730..a1ae680b 100755 --- a/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir +++ b/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir @@ -1,6 +1,6 @@ #!/bin/bash -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then +if [ ${DIB_DEBUG_TRACE:-1} -gt 1 ]; then set -x fi set -eu @@ -16,6 +16,7 @@ for i in "${!image_elements[@]}"; do pkg_map="${element_dir}/pkg-map" if [ -f "${pkg_map}" ]; then + echo "Copying pkg-map for ${element}" sudo cp "${pkg_map}" "$TMP_MOUNT_PATH/usr/share/pkg-map/$element" fi done diff --git a/diskimage_builder/lib/common-functions b/diskimage_builder/lib/common-functions index 9bca5c3c..1caf891e 100644 --- a/diskimage_builder/lib/common-functions +++ b/diskimage_builder/lib/common-functions @@ -92,6 +92,10 @@ function copy_hooks_not_overwrite () { } function generate_hooks () { + local xtrace + xtrace=$(set +o | grep xtrace) + set +o xtrace + local dir local file @@ -103,6 +107,8 @@ function generate_hooks () { local element=$i local element_dir=${image_elements[$i]} + echo "Copying hooks for ${element}" + for dir in $(find $element_dir \ -follow -mindepth 1 -maxdepth 1 \ -type d -not -name tests); do @@ -113,6 +119,8 @@ function generate_hooks () { cp -t $TMP_HOOKS_PATH -a $file done done + + $xtrace } # Call the supplied break-in routine if the named point is listed in the break