[oe-commits] [meta-openembedded] 12/15: postfix: fix pkg_postinst_${PN}

git at git.openembedded.org git at git.openembedded.org
Fri Sep 14 04:50:45 UTC 2018


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 935bf7361718e2524f20dc325a01a8ce1da10b1d
Author: Mingli Yu <Mingli.Yu at windriver.com>
AuthorDate: Thu Sep 13 17:34:52 2018 +0800

    postfix: fix pkg_postinst_${PN}
    
    "exit 0" will break the postinst logic
    below the line "exit 0" such as:
    
    ===
    update-alternatives --install /usr/sbin/sendmail sendmail /usr/sbin/sendmail.postfix 120
    update-alternatives --install /usr/bin/mailq mailq /usr/bin/mailq.postfix 120
    update-alternatives --install /usr/bin/newaliases newaliases /usr/bin/newaliases.postfix 120
    ===
    
    It's enough to call "$INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}"
    , so remove it to guarantee the postinstall logic is correct
    
    Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta-networking/recipes-daemons/postfix/postfix.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index 49f9f7b..882b27b 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -246,10 +246,10 @@ pkg_postinst_${PN} () {
         # 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}
-            exit 0
+        else
+            touch $D/etc/postfix/virtual_alias
+            postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
         fi
-        touch $D/etc/postfix/virtual_alias
-        postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
 
     fi
 }

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


More information about the Openembedded-commits mailing list