[oe-commits] [meta-openembedded] 62/62: postfix.inc: make deterministic build

git at git.openembedded.org git at git.openembedded.org
Thu Oct 24 08:04:29 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit c3258069e17572da563c4d21e64897e89daa96ff
Author: Hongxu Jia <hongxu.jia at windriver.com>
AuthorDate: Tue Oct 22 15:14:14 2019 +0800

    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 at windriver.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../recipes-daemons/postfix/postfix.inc            | 25 ++++++----------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index de45e08..64c20d0 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"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list