diff options
author | Dan Walkes <danwalkes@trellis-logic.com> | 2017-10-08 13:05:23 -0600 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-10-15 17:29:40 +0000 |
commit | 0b62032e0247420b392416503931b042b415a6a3 (patch) | |
tree | 4df0c60e792f8a0cdbf465abdde0775393e982d4 /meta-oe | |
parent | 8ceeb8b512a265b03b2175943a01d9318ebb8634 (diff) | |
download | meta-openembedded-0b62032e0247420b392416503931b042b415a6a3.tar.gz |
gpsd: Fix gpsd Yocto pyro build for read only rootfs
Attempting to include gpsd on Yocto pyro with IMAGE_FEATURES including
read-only-rootfs results in an error:
"The following packages could not be configured offline and rootfs is
read-only"
This stems from a failure during the do_rootfs steps where the /etc/init.d/gpsd
file is missing during the call to update-rc.d.
This happens because the /etc/init.d/gpsd file is installed during
package install for gpsd-conf instead of gpsd, and the default value for
INITSCRIPT_PACKAGES is PN. To resolve, specify INITSCRIPT_PACKAGES as
gpsd-conf instead.
Also, as suggested on the Yocto mailing list, refactor to inherit
update-alternatives and use this to replace the postinst and postrm
steps.
Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb index 27a600f70..f8e6a2b13 100644 --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb | |||
@@ -19,8 +19,9 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | |||
19 | SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63" | 19 | SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63" |
20 | SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029" | 20 | SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029" |
21 | 21 | ||
22 | inherit scons update-rc.d python-dir pythonnative systemd bluetooth | 22 | inherit scons update-rc.d python-dir pythonnative systemd bluetooth update-alternatives |
23 | 23 | ||
24 | INITSCRIPT_PACKAGES = "gpsd-conf" | ||
24 | INITSCRIPT_NAME = "gpsd" | 25 | INITSCRIPT_NAME = "gpsd" |
25 | INITSCRIPT_PARAMS = "defaults 35" | 26 | INITSCRIPT_PARAMS = "defaults 35" |
26 | 27 | ||
@@ -86,14 +87,6 @@ do_install_append() { | |||
86 | install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket | 87 | install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket |
87 | } | 88 | } |
88 | 89 | ||
89 | pkg_postinst_${PN}-conf() { | ||
90 | update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 | ||
91 | } | ||
92 | |||
93 | pkg_postrm_${PN}-conf() { | ||
94 | update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default | ||
95 | } | ||
96 | |||
97 | PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" | 90 | PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" |
98 | 91 | ||
99 | FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ | 92 | FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ |
@@ -133,3 +126,9 @@ RPROVIDES_${PN} += "${PN}-systemd" | |||
133 | RREPLACES_${PN} += "${PN}-systemd" | 126 | RREPLACES_${PN} += "${PN}-systemd" |
134 | RCONFLICTS_${PN} += "${PN}-systemd" | 127 | RCONFLICTS_${PN} += "${PN}-systemd" |
135 | SYSTEMD_SERVICE_${PN} = "${PN}.socket" | 128 | SYSTEMD_SERVICE_${PN} = "${PN}.socket" |
129 | |||
130 | |||
131 | ALTERNATIVE_${PN} = "gpsd-defaults" | ||
132 | ALTERNATIVE_PATH = "${sysconfdir}/default/gpsd.default" | ||
133 | ALTERNATIVE_LINK = "${sysconfdir}/default/gpsd" | ||
134 | ALTERNATIVE_TARGET = "${sysconfdir}/default/gpsd.default" | ||