]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
msmtp: use alternatives to manage /usr/lib/sendmail
authorChen Qi <Qi.Chen@windriver.com>
Mon, 15 Jul 2019 08:35:38 +0000 (16:35 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Jul 2019 11:17:18 +0000 (12:17 +0100)
There are several packages which all provide /usr/lib/sendmail
when lsb is enabled. So use alternative to manage it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/msmtp/msmtp_1.8.4.bb

index 888c1bbb5a9ab07b9c3891997a9e9b8764cd7478..0f10500b38883a9f486c64bca0b65e46d1f970bc 100644 (file)
@@ -19,11 +19,10 @@ inherit gettext autotools update-alternatives pkgconfig
 EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
 
 ALTERNATIVE_${PN} = "sendmail"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}_linuxstdbase = "sendmail usr-lib-sendmail"
 ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
 ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${bindir}/msmtp"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
 ALTERNATIVE_PRIORITY = "100"
-
-pkg_postinst_${PN}_linuxstdbase () {
-       # /usr/lib/sendmial is required by LSB core test
-       [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
-}