address review comments

bdmurray/intel-iot-models
Michael Hudson-Doyle 4 years ago
parent d233655180
commit bb0bba1793

@ -778,6 +778,12 @@ case $PROJECT in
add_package ubuntu-server.installer s390-tools-zkey
fi
# Live server ISOs for LTS point releases past .2 offer both
# the GA and HWE kernels (in separate layers) so this code is
# written generically to support both even though a lot of the
# time only one kernel is offered.
# variants='ga hwe'
variants='ga'
for variant in $variants; do
@ -797,7 +803,7 @@ case $PROJECT in
done
;;
*)
echo "no thanks"
echo "unrecognized subproject for server: '$SUBPROJECT'"
exit 1
;;
esac

@ -132,6 +132,17 @@ reduce_pass_size () {
fi
p=$(dirname $f)
while [ "$p" != . ]; do
# As explained in the overlayfs documentation
# https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html#whiteouts-and-opaque-directories
# an xattr of trusted.overlay.opaque indicates an 'opaque' directory
# that was deleted from the overlay. Removing files from within the
# directory, even if identical with one in the lower layer, will result
# in it going missing from the combined filesystem.
#
# It would be possible to be more clever, e.g. if the two directories
# are still similar, we could the delete the attribute and convert any
# still-needed deletions to whiteouts but it doesn't seem worth it in
# the cases seen so far.
if [ -n "$(getfattr -n trusted.overlay.opaque -h --only-values -- "$pass_dir/$p" 2>/dev/null)" ]; then
Echo_message "reduce_pass_size: '%s' would be removed from overlay but for trusted.overlay.opaque on '%s'" "$f" "$p"
continue 2

@ -4,14 +4,14 @@
case $PASS in
ubuntu-server.installer.*)
flavor=${PASS##*.}
if [ "$flavor" = "generic" ]; then
kernel_metapkg=linux-generic
elif [ "$flavor" = "generic-hwe" ]; then
kernel_metapkg=linux-generic-hwe-$(lsb_release -sr)
else
echo "bogus flavor: $flavor"
exit 1
fi
if [ "$flavor" = "generic" ]; then
kernel_metapkg=linux-generic
elif [ "$flavor" = "generic-hwe" ]; then
kernel_metapkg=linux-generic-hwe-$(lsb_release -sr)
else
echo "bogus flavor: $flavor"
exit 1
fi
;;
*)
exit 0

Loading…
Cancel
Save