Browse Source

Merge "Only wait for checksum processes"

tags/2.30.0
Zuul 2 weeks ago
parent
commit
05a6f898fd
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      diskimage_builder/lib/common-functions

+ 11
- 3
diskimage_builder/lib/common-functions View File

@@ -66,9 +66,17 @@ function finish_image () {

mv $OUT_IMAGE_PATH $1
if [ "$DIB_CHECKSUM" == "1" ]; then
# NOTE(pabelanger): Read image into memory once and generate both checksum
# files.
md5sum $1 > $1.md5 & sha256sum $1 > $1.sha256 & wait

# NOTE(pabelanger): Read image into memory once and generate
# both checksum files.
# NOTE(ianw): we've seen issues with this waiting for
# our outfilter.py wrapper when containerised (probably due to
# no tty). Waiting for just these processes is a bit of hacky
# workaround ...
declare -a wait_for
md5sum $1 > $1.md5 & wait_for+=($!)
sha256sum $1 > $1.sha256 & wait_for+=($!)
wait "${wait_for[@]}"
fi
echo "Image file $1 created..."
}

Loading…
Cancel
Save