Merge "Turn down pkg-map and hook copy tracing output"

This commit is contained in:
Zuul 2018-10-18 03:56:12 +00:00 committed by Gerrit Code Review
commit 56634e0938
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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