mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-25 12:21:10 +00:00
Fix core_snap variable scope issue
The prior change to pre-seed the correct base added a case to handle installation of the core snap. When that was added it created a case where the $core_snap variable would not be defined when we reach the end of the _snap_preseed function and evaluate if $core_snap is defined by empty. Previous if the snap to preseed was core or core18 then $core_snap would be "" so this patch addresses that by ensuring the variable exists and is empty by default.
This commit is contained in:
parent
b8865cb17d
commit
15c419eafb
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
livecd-rootfs (2.525.42) UNRELEASED; urgency=medium
|
||||
|
||||
* Fix core_snap variable scope issue
|
||||
|
||||
-- Robert C Jennings <robert.jennings@canonical.com> Fri, 28 Feb 2020 08:29:57 -0600
|
||||
|
||||
livecd-rootfs (2.525.41) bionic; urgency=medium
|
||||
|
||||
* Use snap cli rather than custom snap-tool (LP: #1864252)
|
||||
|
@ -440,6 +440,7 @@ _snap_preseed() {
|
||||
fi
|
||||
|
||||
# Pre-seed snap's base
|
||||
local core_snap=""
|
||||
case $SNAP_NAME in
|
||||
snapd)
|
||||
# snapd is self-contained, ignore base
|
||||
@ -458,7 +459,7 @@ _snap_preseed() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local core_snap=$(echo "$snap_info" | grep '^base:' | awk '{print $2}')
|
||||
core_snap=$(echo "$snap_info" | grep '^base:' | awk '{print $2}')
|
||||
|
||||
# If snap info does not list a base use 'core'
|
||||
core_snap=${core_snap:-core}
|
||||
|
Loading…
x
Reference in New Issue
Block a user