mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-11 02:41:33 +00:00
Add IMAGETYPE to support classic image creation by ubuntu-image.
This commit is contained in:
parent
5c1b9f5c5c
commit
84da578380
@ -16,11 +16,17 @@ if [ -z "${PROJECT:-}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
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
|
# Use ubuntu-image instead of live-build
|
||||||
env SNAPPY_STORE_NO_CDN=1 \
|
env SNAPPY_STORE_NO_CDN=1 \
|
||||||
ubuntu-image -c edge \
|
ubuntu-image snap -c edge \
|
||||||
-o livecd."$PROJECT".img livecd."$PROJECT".model-assertion
|
-o livecd."$PROJECT".img livecd."$PROJECT".model-assertion
|
||||||
xz -0 -T4 livecd."$PROJECT".img
|
xz -0 -T4 livecd."$PROJECT".img
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -153,6 +153,18 @@ case $IMAGEFORMAT in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
ubuntu-image)
|
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
|
case "$ARCH+${SUBARCH:-}" in
|
||||||
amd64+*)
|
amd64+*)
|
||||||
MODEL=pc-amd64 ;;
|
MODEL=pc-amd64 ;;
|
||||||
@ -182,6 +194,8 @@ case $IMAGEFORMAT in
|
|||||||
touch .build/config
|
touch .build/config
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
case $PROJECT in
|
case $PROJECT in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user