aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-10-22 15:14:14 +0800
committerKhem Raj <raj.khem@gmail.com>2019-10-25 10:29:51 -0700
commit308d0f602e83be17ba936805095c4df722278f76 (patch)
tree1c08e1d66df94c9f058e0027c92a5ff8e84bf486 /meta-networking
parent89d86b96f80d8a136d38113baf69d8ccad5a5ff6 (diff)
downloadmeta-openembedded-contrib-308d0f602e83be17ba936805095c4df722278f76.tar.gz
postfix.inc: make deterministic build
This postinst can fail depending on host setup, which makes non-deterministic build on different host. Use postinst ontarget to always fail at do_rootfs and rerun at target first boot. In this situation, remove postfix-native from PACKAGE_WRITE_DEPS Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc25
1 files changed, 6 insertions, 19 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index de45e080d0..64c20d0f5e 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -202,26 +202,13 @@ ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1"
ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
-PACKAGE_WRITE_DEPS += "postfix-native"
-pkg_postinst_${PN}-cfg () {
- if [ "x$D" = "x" ]; then
- touch /etc/aliases
- newaliases
-
- # generate virtual_alias, default is hash
- touch /etc/postfix/virtual_alias
- postmap /etc/postfix/virtual_alias
- else
- touch $D/etc/aliases
- # This can fail depending on host setup
- if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then
- $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
- else
- touch $D/etc/postfix/virtual_alias
- postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
- fi
+pkg_postinst_ontarget_${PN}-cfg () {
+ touch /etc/aliases
+ newaliases
- fi
+ # generate virtual_alias, default is hash
+ touch /etc/postfix/virtual_alias
+ postmap /etc/postfix/virtual_alias
}
PACKAGES =+ "${PN}-cfg"