<div dir="ltr">Would love to see this merged, this is a long-standing issue.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 15, 2018 at 7:05 AM Stefan Agner &lt;<a href="mailto:stefan@agner.ch">stefan@agner.ch</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Stefan Agner &lt;<a href="mailto:stefan.agner@toradex.com" target="_blank">stefan.agner@toradex.com</a>&gt;<br>
<br>
OpenEmbedded has a built-in mechanism to run postinst scripts offline<br>
at build time or, if necessary, on first boot (delayed execution). If<br>
the latter is the case and systemd is in use, two services end up<br>
doing the same thing:<br>
- opkg-configure.service starts &quot;opkg configure&quot; directly.<br>
- run-postinsts.service starts &quot;/usr/sbin/run-postinsts&quot; which runs<br>
  postinst scripts stored in /etc/ipk-postinsts/ or &quot;opkg configure&quot;<br>
  if package management is installed.<br>
<br>
Since the run-postinsts.service is also used in cases where no<br>
package management is in use, it is the primary means of handling<br>
postinsts.<br>
<br>
Get rid of the opkg-configure.service to avoid duplicate opkg<br>
configure execution.<br>
<br>
Signed-off-by: Stefan Agner &lt;<a href="mailto:stefan.agner@toradex.com" target="_blank">stefan.agner@toradex.com</a>&gt;<br>
---<br>
 meta/recipes-devtools/opkg/opkg/opkg-configure.service | 17 -----------------<br>
 meta/recipes-devtools/opkg/<a href="http://opkg_0.3.6.bb" rel="noreferrer" target="_blank">opkg_0.3.6.bb</a>               | 14 --------------<br>
 2 files changed, 31 deletions(-)<br>
 delete mode 100644 meta/recipes-devtools/opkg/opkg/opkg-configure.service<br>
<br>
diff --git a/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/meta/recipes-devtools/opkg/opkg/opkg-configure.service<br>
deleted file mode 100644<br>
index 432c3ddc28..0000000000<br>
--- a/meta/recipes-devtools/opkg/opkg/opkg-configure.service<br>
+++ /dev/null<br>
@@ -1,17 +0,0 @@<br>
-[Unit]<br>
-Description=Opkg first boot configure<br>
-DefaultDependencies=no<br>
-After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount<br>
-Before=sysinit.target<br>
-<br>
-[Service]<br>
-Type=oneshot<br>
-EnvironmentFile=-@SYSCONFDIR@/default/postinst<br>
-ExecStart=-@BASE_BINDIR@/sh -c &quot; if [ $POSTINST_LOGGING = &#39;1&#39; ]; then @BINDIR@/opkg configure &gt; $LOGFILE 2&gt;&amp;1; else @BINDIR@/opkg configure; fi&quot;<br>
-ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable opkg-configure.service<br>
-StandardOutput=syslog<br>
-RemainAfterExit=No<br>
-<br>
-[Install]<br>
-WantedBy=basic.target<br>
-WantedBy=sysinit.target<br>
diff --git a/meta/recipes-devtools/opkg/<a href="http://opkg_0.3.6.bb" rel="noreferrer" target="_blank">opkg_0.3.6.bb</a> b/meta/recipes-devtools/opkg/<a href="http://opkg_0.3.6.bb" rel="noreferrer" target="_blank">opkg_0.3.6.bb</a><br>
index 70f20af739..579b51166c 100644<br>
--- a/meta/recipes-devtools/opkg/<a href="http://opkg_0.3.6.bb" rel="noreferrer" target="_blank">opkg_0.3.6.bb</a><br>
+++ b/meta/recipes-devtools/opkg/<a href="http://opkg_0.3.6.bb" rel="noreferrer" target="_blank">opkg_0.3.6.bb</a><br>
@@ -12,7 +12,6 @@ DEPENDS = &quot;libarchive&quot;<br>
 PE = &quot;1&quot;<br>
<br>
 SRC_URI = &quot;<a href="http://downloads.yoctoproject.org/releases/$%7BBPN%7D/$%7BBPN%7D-$%7BPV%7D.tar.gz" rel="noreferrer" target="_blank">http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz</a> \<br>
-           file://opkg-configure.service \<br>
            file://opkg.conf \<br>
            file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \<br>
 &quot;<br>
@@ -22,8 +21,6 @@ SRC_URI[sha256sum] = &quot;f607f0e61be8cf8a3bbd0d2dccd9ec9e9b6c21dd4307b671c600d6eeaf<br>
<br>
 inherit autotools pkgconfig systemd<br>
<br>
-SYSTEMD_SERVICE_${PN} = &quot;opkg-configure.service&quot;<br>
-<br>
 target_localstatedir := &quot;${localstatedir}&quot;<br>
 OPKGLIBDIR = &quot;${target_localstatedir}/lib&quot;<br>
<br>
@@ -46,16 +43,6 @@ do_install_append () {<br>
<br>
        # We need to create the lock directory<br>
        install -d ${D}${OPKGLIBDIR}/opkg<br>
-<br>
-       if ${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;,&#39;systemd&#39;,&#39;true&#39;,&#39;false&#39;,d)};then<br>
-               install -d ${D}${systemd_unitdir}/system<br>
-               install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/<br>
-               sed -i -e &#39;s,@BASE_BINDIR@,${base_bindir},g&#39; \<br>
-                       -e &#39;s,@SYSCONFDIR@,${sysconfdir},g&#39; \<br>
-                       -e &#39;s,@BINDIR@,${bindir},g&#39; \<br>
-                       -e &#39;s,@SYSTEMD_UNITDIR@,${systemd_unitdir},g&#39; \<br>
-                       ${D}${systemd_unitdir}/system/opkg-configure.service<br>
-       fi<br>
 }<br>
<br>
 RDEPENDS_${PN} = &quot;${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive&quot;<br>
@@ -68,7 +55,6 @@ RPROVIDES_${PN} = &quot;opkg-collateral&quot;<br>
 PACKAGES =+ &quot;libopkg&quot;<br>
<br>
 FILES_libopkg = &quot;${libdir}/*.so.* ${OPKGLIBDIR}/opkg/&quot;<br>
-FILES_${PN} += &quot;${systemd_unitdir}/system/&quot;<br>
<br>
 BBCLASSEXTEND = &quot;native nativesdk&quot;<br>
<br>
-- <br>
2.13.6<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>