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
This commit is contained in:
Ian Wienand 2018-10-18 10:55:07 +11:00
parent bbbade0e4c
commit 6c077d7c2a
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then if [ ${DIB_DEBUG_TRACE:-1} -gt 1 ]; then
set -x set -x
fi fi
set -eu set -eu
@ -16,6 +16,7 @@ for i in "${!image_elements[@]}"; do
pkg_map="${element_dir}/pkg-map" pkg_map="${element_dir}/pkg-map"
if [ -f "${pkg_map}" ]; then if [ -f "${pkg_map}" ]; then
echo "Copying pkg-map for ${element}"
sudo cp "${pkg_map}" "$TMP_MOUNT_PATH/usr/share/pkg-map/$element" sudo cp "${pkg_map}" "$TMP_MOUNT_PATH/usr/share/pkg-map/$element"
fi fi
done done

View File

@ -92,6 +92,10 @@ function copy_hooks_not_overwrite () {
} }
function generate_hooks () { function generate_hooks () {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local dir local dir
local file local file
@ -103,6 +107,8 @@ function generate_hooks () {
local element=$i local element=$i
local element_dir=${image_elements[$i]} local element_dir=${image_elements[$i]}
echo "Copying hooks for ${element}"
for dir in $(find $element_dir \ for dir in $(find $element_dir \
-follow -mindepth 1 -maxdepth 1 \ -follow -mindepth 1 -maxdepth 1 \
-type d -not -name tests); do -type d -not -name tests); do
@ -113,6 +119,8 @@ function generate_hooks () {
cp -t $TMP_HOOKS_PATH -a $file cp -t $TMP_HOOKS_PATH -a $file
done done
done done
$xtrace
} }
# Call the supplied break-in routine if the named point is listed in the break # Call the supplied break-in routine if the named point is listed in the break