* [meta-networking][PATCH 1/2] postfix: use alternatives to manage /usr/lib/sendmail
@ 2019-07-15 8:09 Chen Qi
2019-07-15 8:09 ` [meta-networking][PATCH 2/2] esmtp: " Chen Qi
0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2019-07-15 8:09 UTC (permalink / raw)
To: openembedded-devel
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>
---
meta-networking/recipes-daemons/postfix/postfix.inc | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index 3d4f1df..9437941 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -196,11 +196,15 @@ do_install_append_class-native() {
ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
}
-ALTERNATIVE_${PN} += "sendmail mailq newaliases"
+ALTERNATIVE_${PN} = "sendmail mailq newaliases"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
ALTERNATIVE_PRIORITY = "120"
@@ -219,11 +223,6 @@ pkg_postinst_${PN} () {
touch /etc/postfix/virtual_alias
postmap /etc/postfix/virtual_alias
else
- if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
- # /usr/lib/sendmail is required by LSB core test
- [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
- fi
-
touch $D/etc/aliases
# This can fail depending on host setup
if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [meta-networking][PATCH 2/2] esmtp: use alternatives to manage /usr/lib/sendmail
2019-07-15 8:09 [meta-networking][PATCH 1/2] postfix: use alternatives to manage /usr/lib/sendmail Chen Qi
@ 2019-07-15 8:09 ` Chen Qi
0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2019-07-15 8:09 UTC (permalink / raw)
To: openembedded-devel
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>
---
meta-networking/recipes-support/esmtp/esmtp_1.2.bb | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/meta-networking/recipes-support/esmtp/esmtp_1.2.bb b/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
index 663161a..972d5aa 100644
--- a/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
+++ b/meta-networking/recipes-support/esmtp/esmtp_1.2.bb
@@ -18,11 +18,15 @@ EXTRA_OECONF = "--with-libesmtp=${STAGING_EXECPREFIXDIR}"
inherit autotools update-alternatives
-ALTERNATIVE_${PN} += "sendmail mailq newaliases"
+ALTERNATIVE_${PN} = "sendmail mailq newaliases"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
ALTERNATIVE_TARGET[sendmail] = "${bindir}/esmtp"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${bindir}/esmtp"
ALTERNATIVE_PRIORITY = "10"
@@ -39,9 +43,4 @@ do_install_append() {
rm -rf ${D}${libdir}
}
-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/
-}
-
FILES_${PN} += "${libdir}/"
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-15 8:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-15 8:09 [meta-networking][PATCH 1/2] postfix: use alternatives to manage /usr/lib/sendmail Chen Qi
2019-07-15 8:09 ` [meta-networking][PATCH 2/2] esmtp: " Chen Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox