Remove 'IMAGETYPE' and 'IMAGEFORMAT' bits per the suggestions.

ubuntu/cosmic
Gary.Wzl 7 years ago
parent eb76178ab5
commit 228ed7c87b

@ -16,17 +16,11 @@ if [ -z "${PROJECT:-}" ]; then
fi
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
if [ "${IMAGETYPE:-}" = "classic" ]; then
# Use ubuntu-image instead of live-build
OPTS="${PROJECT:+--project=$PROJECT} ${SUITE:+--suite=$SUITE} ${ARCH:+--arch=$ARCH} ${SUBPROJECT:+--subproject=$SUBPROJECT} ${SUBARCH:+--subarch=$SUBARCH} ${PROPOSED:+--with-proposed=$PROPOSED} ${IMAGEFORMAT:+--image-format=$IMAGEFORMAT} ${EXTRA_PPAS:+--extra-ppas=$EXTRA_PPAS}"
ubuntu-image classic $OPTS gadget_tree
else
# Use ubuntu-image instead of live-build
env SNAPPY_STORE_NO_CDN=1 \
ubuntu-image snap -c edge \
# Use ubuntu-image instead of live-build
env SNAPPY_STORE_NO_CDN=1 \
ubuntu-image -c edge \
-o livecd."$PROJECT".img livecd."$PROJECT".model-assertion
xz -0 -T4 livecd."$PROJECT".img
fi
xz -0 -T4 livecd."$PROJECT".img
exit 0
fi

@ -153,48 +153,34 @@ case $IMAGEFORMAT in
;;
ubuntu-image)
case $IMAGETYPE in
classic)
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
# TODO livecd-rootfs needs to take a branch URI for the gadget as input,
# stage it, and pass it to ubuntu-image, where do we get it?
# Fake finished configuration for lb build
mkdir -p .build
touch .build/config
exit 0
;;
*) # backport compatibility for core image creation.
case "$ARCH+${SUBARCH:-}" in
amd64+*)
MODEL=pc-amd64 ;;
i386+*)
MODEL=pc-i386 ;;
arm64+snapdragon)
MODEL=dragonboard ;;
armhf+raspi2)
MODEL=pi2 ;;
armhf+raspi3)
MODEL=pi3 ;;
armhf+cm3)
MODEL=cm3 ;;
*)
echo "Model $ARCH+${SUBARCH:-} unknown to livecd-rootfs" >&2
exit 1
;;
esac
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
# Store model assertion in top dir to get it picked up later as a build artifact
env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > livecd."$PROJECT".model-assertion
echo "Configured ubuntu-image for the following model assertion:"
cat livecd."$PROJECT".model-assertion
echo "----------------------------------------------------------"
# Fake finished configuration for lb build
mkdir -p .build
touch .build/config
exit 0
case "$ARCH+${SUBARCH:-}" in
amd64+*)
MODEL=pc-amd64 ;;
i386+*)
MODEL=pc-i386 ;;
arm64+snapdragon)
MODEL=dragonboard ;;
armhf+raspi2)
MODEL=pi2 ;;
armhf+raspi3)
MODEL=pi3 ;;
armhf+cm3)
MODEL=cm3 ;;
*)
echo "Model $ARCH+${SUBARCH:-} unknown to livecd-rootfs" >&2
exit 1
;;
esac
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
# Store model assertion in top dir to get it picked up later as a build artifact
env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > livecd."$PROJECT".model-assertion
echo "Configured ubuntu-image for the following model assertion:"
cat livecd."$PROJECT".model-assertion
echo "----------------------------------------------------------"
# Fake finished configuration for lb build
mkdir -p .build
touch .build/config
exit 0
;;
*)

Loading…
Cancel
Save