Skip to content

Commit de63328

Browse files
author
Ian Campbell
committed
Update kernel in update-linuxkit-hashes.sh
The kernel is outside pkg/* so we missed it, it also uses a different tagging strategy and so needs some special handling. Signed-off-by: Ian Campbell <ijc@docker.com>
1 parent f445e8c commit de63328

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/update-linuxkit-hashes.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ for i in $tdir/lk/pkg/* ; do
2727
sed -i -e "s,$image:[[:xdigit:]]\{40\}\(-dirty\)\?,$tag,g" yml/*.yml
2828
done
2929

30+
# Kernel doesn't use `linuxkit pkg` and uses a different
31+
# tagging strategy, so we do it manually by extracting the
32+
# "recommended" one from the toplevel linuxkit.yml
33+
# example.
34+
# TODO: add a target to kernel/Makefile which will show
35+
# the recommended kernel.
36+
tag=$(sed -n -e 's,^\s*image: \(linuxkit/kernel:.\+\)\s*,\1,p' $tdir/lk/linuxkit.yml)
37+
if [ ! -n "$tag" ] ; then
38+
echo "Failed to extract kernel tag" >&2
39+
exit 1
40+
fi
41+
# Not update_hash since the tag is not a hash in this case
42+
43+
echo "Updating to $tag"
44+
sed -i -e "s,linuxkit/kernel:.\+,$tag,g" yml/*.yml
45+
3046
# We manually construct the S-o-b because -F strips the trailing blank
3147
# lines, meaning that with -s there is no blank between the "Commit:
3248
# ..." and the S-o-b.

0 commit comments

Comments
 (0)