Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/locationd:fix-caracalla into ~snappy-hwe-team/snappy-hwe-snaps/+git/locationd:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Roberto Mier Escandon
Approved revision: bacf7daf478b6a8a6057ca160c3fb4f0bd9ecdf8
Merged at revision: ab80ed4afe8fc20b8d3df8fa8c8c2a478b6325d7
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/locationd:fix-caracalla
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/locationd:master
Diff against target: 111 lines (+22/-14)
3 files modified
prebuilt/meta/hooks/configure (+19/-12)
snapcraft.yaml (+1/-1)
src/location/providers/ubx/provider.cpp (+2/-1)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Roberto Mier Escandon (community) Approve
Simon Fels Approve
Review via email: mp+332549@code.launchpad.net

Description of the change

Fix for regression in caracalla (LP: #1715724)

To post a comment you must log in.
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Roberto Mier Escandon (rmescandon) wrote :

looks good

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

PASSED: Successfully build documentation, rev: bacf7daf478b6a8a6057ca160c3fb4f0bd9ecdf8

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/874/

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 :

PASSED: Successfully build documentation, rev: bacf7daf478b6a8a6057ca160c3fb4f0bd9ecdf8

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/875/

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/prebuilt/meta/hooks/configure b/prebuilt/meta/hooks/configure
2index e17071f..e414551 100755
3--- a/prebuilt/meta/hooks/configure
4+++ b/prebuilt/meta/hooks/configure
5@@ -9,6 +9,13 @@ export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
6
7 ubx_enable=$(snapctl get ubx.provider.enable)
8 ubx_device=$(snapctl get ubx.provider.device)
9+# Keep compatibility with old name
10+if [ -z "$ubx_device" ]; then
11+ ubx_device=$(snapctl get ubx.provider.path)
12+ if [ -n "$ubx_device" ]; then
13+ snapctl set ubx.provider.device="$ubx_device"
14+ fi
15+fi
16 ubx_protocol=$(snapctl get ubx.provider.protocol)
17 ubx_assist_enable=$(snapctl get ubx.provider.assistnow.enable)
18 ubx_assist_token=$(snapctl get ubx.provider.assistnow.token)
19@@ -23,39 +30,39 @@ mls_host=$(snapctl get mls.provider.host)
20 mls_api_key=$(snapctl get mls.provider.apikey)
21
22 if [ -n "$ubx_enable" ]; then
23- $SNAP/bin/locationd set --key=ubx.provider.enable --value="$ubx_enable"
24+ "$SNAP"/bin/locationd set --key=ubx.provider.enable --value="$ubx_enable"
25 fi
26
27 if [ -n "$ubx_device" ]; then
28- $SNAP/bin/locationd set --key=ubx.provider.device --value="$ubx_device"
29+ "$SNAP"/bin/locationd set --key=ubx.provider.device --value="$ubx_device"
30 fi
31
32 if [ -n "$ubx_protocol" ]; then
33- $SNAP/bin/locationd set --key=ubx.provider.protocol --value="$ubx_protocol"
34+ "$SNAP"/bin/locationd set --key=ubx.provider.protocol --value="$ubx_protocol"
35 fi
36
37 if [ -n "$ubx_assist_enable" ]; then
38- $SNAP/bin/locationd set --key=ubx.provider.assist_now.enable --value="$ubx_assist_enable"
39+ "$SNAP"/bin/locationd set --key=ubx.provider.assist_now.enable --value="$ubx_assist_enable"
40 fi
41
42 if [ -n "$ubx_assist_token" ]; then
43- $SNAP/bin/locationd set --key=ubx.provider.assist_now.token --value="$ubx_assist_token"
44+ "$SNAP"/bin/locationd set --key=ubx.provider.assist_now.token --value="$ubx_assist_token"
45 fi
46
47 if [ -n "$ubx_assist_timeout" ]; then
48- $SNAP/bin/locationd set --key=ubx.provider.assist_now.timeout --value="$ubx_assist_timeout"
49+ "$SNAP"/bin/locationd set --key=ubx.provider.assist_now.timeout --value="$ubx_assist_timeout"
50 fi
51
52 if [ -n "$sirf_enable" ]; then
53- $SNAP/bin/locationd set --key=sirf.provider.enable --value="$sirf_enable"
54+ "$SNAP"/bin/locationd set --key=sirf.provider.enable --value="$sirf_enable"
55 fi
56
57 if [ -n "$sirf_device" ]; then
58- $SNAP/bin/locationd set --key=sirf.provider.device --value="$sirf_device"
59+ "$SNAP"/bin/locationd set --key=sirf.provider.device --value="$sirf_device"
60 fi
61
62 if [ -n "$sirf_protocol" ]; then
63- $SNAP/bin/locationd set --key=sirf.provider.protocol --value="$sirf_protocol"
64+ "$SNAP"/bin/locationd set --key=sirf.provider.protocol --value="$sirf_protocol"
65 fi
66
67 # Disable Mozilla Location Service provider by default to prevent
68@@ -66,13 +73,13 @@ if [ -z "$mls_enable" ]; then
69 fi
70
71 if [ -n "$mls_enable" ]; then
72- $SNAP/bin/locationd set --key=mls.provider.enable --value="$mls_enable"
73+ "$SNAP"/bin/locationd set --key=mls.provider.enable --value="$mls_enable"
74 fi
75
76 if [ -n "$mls_host" ]; then
77- $SNAP/bin/locationd set --key=mls.provider.host --value="$mls_host"
78+ "$SNAP"/bin/locationd set --key=mls.provider.host --value="$mls_host"
79 fi
80
81 if [ -n "$mls_api_key" ]; then
82- $SNAP/bin/locationd set --key=mls.provider.api_key --value="$mls_api_key"
83+ "$SNAP"/bin/locationd set --key=mls.provider.api_key --value="$mls_api_key"
84 fi
85diff --git a/snapcraft.yaml b/snapcraft.yaml
86index 8fbe3f9..923b97c 100644
87--- a/snapcraft.yaml
88+++ b/snapcraft.yaml
89@@ -6,7 +6,7 @@ summary: Location service mediates access to positioning providers.
90 description: |
91 Location service mediates access to positioning providers.
92
93- Please find the source for this snap at https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/location-service
94+ Please find the source for this snap at https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/locationd
95
96 apps:
97 run:
98diff --git a/src/location/providers/ubx/provider.cpp b/src/location/providers/ubx/provider.cpp
99index c5000cc..720c173 100644
100--- a/src/location/providers/ubx/provider.cpp
101+++ b/src/location/providers/ubx/provider.cpp
102@@ -217,7 +217,8 @@ location::Provider::Ptr ubx::Provider::create_instance(const util::settings::Sou
103 {
104 Configuration configuration
105 {
106- settings.get_value<Protocol>(options::protocol, Protocol::ubx),
107+ // Production devices in the field use nmea by default
108+ settings.get_value<Protocol>(options::protocol, Protocol::nmea),
109 settings.get_value<std::string>(options::device, "/dev/ttyACM1"),
110 {
111 settings.get_value<bool>(options::assist_now::enable, false),

Subscribers

People subscribed via source and target branches