Merge ~kzapalowicz/snappy-hwe-snaps/+git/modem-manager:fix/adopt-new-aliases into ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:master

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Simon Fels
Approved revision: 6841aa9c0c08d02032a121b726bc1944fa8ae03c
Merged at revision: ce2ad75c265c0eb5716c9804901dcbd4676acaeb
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/modem-manager:fix/adopt-new-aliases
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:master
Diff against target: 40 lines (+9/-5)
2 files modified
snapcraft.yaml (+1/-2)
tests/lib/utilities.sh (+8/-3)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+324118@code.launchpad.net

Description of the change

Adopt for new aliases coming with 2.25

To post a comment you must log in.
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

See comment

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snapcraft.yaml b/snapcraft.yaml
2index 5309985..edd364d 100644
3--- a/snapcraft.yaml
4+++ b/snapcraft.yaml
5@@ -21,8 +21,7 @@ apps:
6 mmcli:
7 command: bin/mmcli
8 plugs: [mmcli]
9- aliases:
10- - mmcli
11+ aliases: [mmcli]
12 modemmanager:
13 command: bin/modemmanager
14 daemon: simple
15diff --git a/tests/lib/utilities.sh b/tests/lib/utilities.sh
16index 519e78c..f756f66 100644
17--- a/tests/lib/utilities.sh
18+++ b/tests/lib/utilities.sh
19@@ -22,13 +22,18 @@ install_snap_under_test() {
20 snap install --$SNAP_CHANNEL $SNAP_NAME
21 fi
22 else
23- # Install first from store to avoid error when performing the connection
24- snap install $SNAP_NAME
25+ # Install first from store to avoid error when performing the connection
26+ snap install $SNAP_NAME
27 # Install prebuilt snap
28 snap install --dangerous ${PROJECT_PATH}/${SNAP_NAME}_*_${SNAP_ARCH}.snap
29 if [ -n "$SNAP_AUTO_ALIASES" ]; then
30+ snapd_version=$(snap version | awk '/^snapd / {print $2; exit}')
31 for alias in $SNAP_AUTO_ALIASES ; do
32- snap alias $SNAP_NAME $alias
33+ target=$SNAP_NAME.$alias
34+ if dpkg --compare-versions $snapd_version lt 2.25 ; then
35+ target=$SNAP_NAME
36+ fi
37+ snap alias $target $alias
38 done
39 fi
40 fi

Subscribers

People subscribed via source and target branches