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

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Simon Fels
Approved revision: 57483a4a69e7249b5feca9b8a9098ccadfdbab9d
Merged at revision: 3315fae0907f98e8f460069f103c90586d72e42d
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/udisks2:fix/adopt-new-aliases
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/udisks2:master
Diff against target: 52 lines (+12/-11)
3 files modified
snapcraft.yaml (+2/-0)
tests/lib/utilities.sh (+8/-0)
tests/main/aliases/task.yaml (+2/-11)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Simon Fels Approve
Review via email: mp+323980@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
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM but not sure why tests are failing

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

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 c04a78b..5ad9f43 100644
3--- a/snapcraft.yaml
4+++ b/snapcraft.yaml
5@@ -14,6 +14,8 @@ apps:
6 udisksctl:
7 command: bin/udisksctl.sh
8 plugs: [client]
9+ # NOTE: This is depreciated with snapd 2.25 however it needs to stay to
10+ # guarantee that all clients are updated correctly.
11 aliases: [udisksctl]
12 udisksd:
13 daemon: simple
14diff --git a/tests/lib/utilities.sh b/tests/lib/utilities.sh
15index 12f7d15..a0c8692 100644
16--- a/tests/lib/utilities.sh
17+++ b/tests/lib/utilities.sh
18@@ -12,6 +12,14 @@ snap_install() {
19 # snap.
20 snap install $name
21 snap install --dangerous $PROJECT_PATH/$name*_amd64.snap
22+
23+ # Setup all necessary aliases
24+ snapd_version=$(snap version | awk '/^snapd / {print $2; exit}')
25+ target=$SNAP_NAME.udisksctl
26+ if dpkg --compare-versions $snapd_version lt 2.25 ; then
27+ target=$SNAP_NAME
28+ fi
29+ snap alias $target udisksctl
30 fi
31 }
32
33diff --git a/tests/main/aliases/task.yaml b/tests/main/aliases/task.yaml
34index 96f7813..1aebee5 100644
35--- a/tests/main/aliases/task.yaml
36+++ b/tests/main/aliases/task.yaml
37@@ -1,13 +1,4 @@
38-summary: Verify aliases provided by the snap are correctly enabled
39+summary: Verify aliases are set up
40
41 execute: |
42- # FIXME: Aliases should be not in place automatically unless we
43- # have them approved from the store in our snap-declaration assertion.
44- test ! -e /snap/bin/udisksctl
45-
46- snap alias udisks2 udisksctl
47-
48- test -e /snap/bin/udisksctl
49-
50- # Verify the alias works without any problems
51- /snap/bin/udisksctl status
52+ test -x /snap/bin/udisksctl

Subscribers

People subscribed via source and target branches