diff options
author | Qi.Chen@windriver.com <Qi.Chen@windriver.com> | 2019-07-15 16:09:55 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-07-15 08:03:29 -0700 |
commit | dbe4429e739ede16fbee008b736c08390b3c62f4 (patch) | |
tree | 2c0e806533ee3c492fd8650c845c03a25c3b36db /meta-networking/recipes-daemons | |
parent | c1ecd778cef733caf1e3b0ced7fd4da21f080e6d (diff) | |
download | meta-openembedded-contrib-dbe4429e739ede16fbee008b736c08390b3c62f4.tar.gz |
postfix: use alternatives to manage /usr/lib/sendmail
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: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r-- | meta-networking/recipes-daemons/postfix/postfix.inc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc index 3d4f1df439..94379412f9 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 |