mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-23 11:21:12 +00:00
Add initial support for preinstallation of snaps in images, and
preinstall pulsemixer in the Ubuntu MATE image.
This commit is contained in:
parent
cb7fe7592f
commit
e59db65edb
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
||||
livecd-rootfs (2.469) UNRELEASED; urgency=medium
|
||||
|
||||
* Add initial support for preinstallation of snaps in images, and
|
||||
preinstall pulsemixer in the Ubuntu MATE image.
|
||||
|
||||
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 06 Oct 2017 16:23:49 -0700
|
||||
|
||||
livecd-rootfs (2.468) artful; urgency=medium
|
||||
|
||||
[ Dimitri John Ledkov ]
|
||||
|
@ -27,6 +27,43 @@ fi
|
||||
# Setup cleanup function
|
||||
Setup_cleanup
|
||||
|
||||
preinstall_snaps() {
|
||||
lb chroot_resolv install
|
||||
Chroot chroot sh -c '
|
||||
set -x;
|
||||
cd /var/lib/snapd/seed;
|
||||
SNAPPY_STORE_NO_CDN=1 snap download core'
|
||||
for snap in "$@"; do
|
||||
Chroot chroot sh -c "
|
||||
set -x;
|
||||
cd /var/lib/snapd/seed;
|
||||
SNAPPY_STORE_NO_CDN=1 snap download \"$snap\""
|
||||
done
|
||||
lb chroot_resolv remove
|
||||
|
||||
CORE_SNAP=$(cd chroot/var/lib/snapd/seed; ls -1 core_*.snap)
|
||||
|
||||
cat <<EOF > chroot/var/lib/snapd/seed/seed.yaml
|
||||
snaps:
|
||||
- name: core
|
||||
channel: stable
|
||||
file: ${CORE_SNAP}
|
||||
EOF
|
||||
for snap in "$@"; do
|
||||
cat <<EOF >> chroot/var/lib/snapd/seed/seed.yaml
|
||||
- name: $snap
|
||||
channel: stable
|
||||
EOF
|
||||
echo -n " file: " >> chroot/var/lib/snapd/seed/seed.yaml
|
||||
(cd chroot/var/lib/snapd/seed; ls -1 "${snap}_*.snap") \
|
||||
>> chroot/var/lib/snapd/seed/seed.yaml
|
||||
done
|
||||
|
||||
mv chroot/var/lib/snapd/seed/*.assert \
|
||||
chroot/var/lib/snapd/seed/assertions/
|
||||
mv chroot/var/lib/snapd/seed/*.snap chroot/var/lib/snapd/seed/snaps/
|
||||
}
|
||||
|
||||
rm -f binary.success
|
||||
(
|
||||
if [ -d config/gnupg ]; then
|
||||
@ -322,6 +359,17 @@ deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS
|
||||
;;
|
||||
esac
|
||||
|
||||
# FIXME: this should not be a hard-coded list in this script; this
|
||||
# is an interim solution for 17.10.
|
||||
case $PROJECT:$SUBPROJECT in
|
||||
ubuntu-mate:*)
|
||||
SNAP_LIST=pulsemixer
|
||||
;;
|
||||
esac
|
||||
if [ -n "$SNAP_LIST" ]; then
|
||||
preinstall_snaps $SNAP_LIST
|
||||
fi
|
||||
|
||||
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
|
||||
if [ "$ARCH" = "armhf" ]; then
|
||||
INFO_DESC="$(lsb_release -d -s)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user