Cleanup and handle manifest-remove files

manifest-remove files are generated in all cases and removed for
projects/subprojects that don't need it like the new ubiquity.
sil2100/core18-pi3-arm64
Jean-Baptiste Lallement 6 years ago
parent 9dba350834
commit 3075d65578

@ -447,6 +447,12 @@ for OUTPUT in ext2 ext3 ext4 manifest manifest-remove size squashfs; do
chmod 644 "$PREFIX.$OUTPUT" chmod 644 "$PREFIX.$OUTPUT"
done done
# we don't need a manifest-remove for a layered-aware installer
if [ "$SUBPROJECT" = "ubiquity-ng" ]; then
rm -f livecd.${PROJECT}-manifest-remove
rm -f config/manifest-minimal-remove
fi
if [ -e config/manifest-minimal-remove ]; then if [ -e config/manifest-minimal-remove ]; then
cp config/manifest-minimal-remove "$PREFIX.manifest-minimal-remove" cp config/manifest-minimal-remove "$PREFIX.manifest-minimal-remove"
fi fi

@ -396,7 +396,7 @@ case $PROJECT in
LIVE_TASK='ubuntu-live' LIVE_TASK='ubuntu-live'
case ${SUBPROJECT:-} in case ${SUBPROJECT:-} in
layered) ubiquity-ng)
# LANG PASS for minimal and install # LANG PASS for minimal and install
add_layered_pass_delta install-minimal desktop-minimal-default-languages '^desktop-minimal-(?!default-languages)[^.]+$' add_layered_pass_delta install-minimal desktop-minimal-default-languages '^desktop-minimal-(?!default-languages)[^.]+$'
add_layered_pass_delta install-minimal desktop-minimal-default-languages '' # none (if no default langpack is selected) add_layered_pass_delta install-minimal desktop-minimal-default-languages '' # none (if no default langpack is selected)
@ -768,37 +768,35 @@ case $SUBPROJECT in
;; ;;
esac esac
if [ -z "${PASSES}" ]; then # we'll expand the base seed given here according to the STRUCTURE file, and
# we'll expand the base seed given here according to the STRUCTURE file, and # then look in all of the seeds found to see which snaps are seeded
# then look in all of the seeds found to see which snaps are seeded case $PROJECT:${SUBPROJECT:-} in
case $PROJECT:${SUBPROJECT:-} in ubuntu:*|kubuntu*:*|lubuntu*:*|xubuntu*:*|ubuntu-mate*:*|ubuntustudio*:*|ubuntukylin*:*|ubuntu-budgie*:*)
ubuntu:*|kubuntu*:*|lubuntu*:*|xubuntu*:*|ubuntu-mate*:*|ubuntustudio*:*|ubuntukylin*:*|ubuntu-budgie*:*) BASE_SEED='desktop'
BASE_SEED='desktop' ;;
;; ubuntu-cpc:*)
ubuntu-cpc:*) BASE_SEED='server'
BASE_SEED='server' ;;
;; ubuntu-server:live)
ubuntu-server:live) BASE_SEED='server'
BASE_SEED='server' ;;
;; esac
esac
if [ -n "${BASE_SEED}" ]; then if [ -z "$PASSES" ] && [ -n "${BASE_SEED}" ]; then
snap_from_seed "${BASE_SEED}" config/seeded-snaps snap_from_seed "${BASE_SEED}" config/seeded-snaps
fi fi
# grab a list of packags to remove for a "minimal" installation from the seed # grab a list of packags to remove for a "minimal" installation from the seed
# mirror for this project # mirror for this project
if [ -n "${BASE_SEED}" ] && [ -n "${BASE_SEED}" ]; then if [ -n "${BASE_SEED}" ] && [ -n "${BASE_SEED}" ]; then
minimal_packages_url=${SEEDMIRROR}/${SEED}/${BASE_SEED}.minimal-remove minimal_packages_url=${SEEDMIRROR}/${SEED}/${BASE_SEED}.minimal-remove
echo -n "Checking ${minimal_packages_url} for a minimal installation list... " echo -n "Checking ${minimal_packages_url} for a minimal installation list... "
minimal_packages_remove=$(wget -q -O- ${minimal_packages_url} | sed -e '/\s*#.*$/d' -e '/^\s*$/d') minimal_packages_remove=$(wget -q -O- ${minimal_packages_url} | sed -e '/\s*#.*$/d' -e '/^\s*$/d')
if [ -n "${minimal_packages_remove}" ]; then if [ -n "${minimal_packages_remove}" ]; then
echo "${minimal_packages_remove}" > config/manifest-minimal-remove echo "${minimal_packages_remove}" > config/manifest-minimal-remove
echo "$(echo ${minimal_packages_remove} | tr '\n' ' ')" echo "$(echo ${minimal_packages_remove} | tr '\n' ' ')"
else else
echo "failed to retrieve, not including." echo "failed to retrieve, not including."
fi
fi fi
fi fi
@ -922,7 +920,6 @@ lb config noauto \
echo "LB_CHROOT_HOOKS=\"$CHROOT_HOOKS\"" >> config/chroot echo "LB_CHROOT_HOOKS=\"$CHROOT_HOOKS\"" >> config/chroot
echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/chroot echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/chroot
echo "LB_DISTRIBUTION=\"$SUITE\"" >> config/chroot echo "LB_DISTRIBUTION=\"$SUITE\"" >> config/chroot
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
if [ -n "$PASSES" ]; then if [ -n "$PASSES" ]; then
echo "PASSES=\"$PASSES\"" >> config/common echo "PASSES=\"$PASSES\"" >> config/common
fi fi

@ -60,7 +60,7 @@ build_layered_squashfs() {
mount_overlay ${lowerlayers} "chroot.${pass}/" chroot/ mount_overlay ${lowerlayers} "chroot.${pass}/" chroot/
else else
# first pass # first pass
rmdir chroot||true rmdir chroot 2>/dev/null||true
ln -s "chroot.${pass}/" chroot ln -s "chroot.${pass}/" chroot
fi fi
@ -122,4 +122,11 @@ umount chroot/
PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}" PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
cp "livecd.${PROJECT}.${PASSPREFIX}${_PASS}.size" "$PREFIX.size" cp "livecd.${PROJECT}.${PASSPREFIX}${_PASS}.size" "$PREFIX.size"
cp "livecd.${PROJECT}.${PASSPREFIX}${_PASS}.manifest.full" "$PREFIX.manifest" cp "livecd.${PROJECT}.${PASSPREFIX}${_PASS}.manifest.full" "$PREFIX.manifest"
chmod 644 *.squashfs *.manifest *.manifest.full *.size
# Ubiquity-compatible removal manifest for ISO not using a layered-aware installer
if [ -n "$(ls livecd.${PROJECT}.[0-9][0-9]-live.manifest.full 2>/dev/null)" ] && \
[ -n "$(ls livecd.${PROJECT}.[0-9][0-9]-install.manifest.full 2>/dev/null)" ]; then
echo "$(diff livecd.${PROJECT}.[0-9][0-9]-live.manifest.full livecd.${PROJECT}.[0-9][0-9]-install.manifest.full | awk '/^< / { print $2 }')" > livecd.${PROJECT}-manifest-remove
fi
chmod 644 *.squashfs *.manifest* *.size

Loading…
Cancel
Save