[oe-commits] [meta-openembedded] 18/21: postfix: adapt pkg_postinst to postinst_intercept

git at git.openembedded.org git at git.openembedded.org
Sat Feb 24 04:47:19 UTC 2018


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

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

commit c53f29df7097de8cecdfe7c4d4fb1b0524bc227e
Author: Slater, Joseph <joe.slater at windriver.com>
AuthorDate: Thu Feb 8 12:22:49 2018 -0800

    postfix: adapt pkg_postinst to postinst_intercept
    
    Request delay to first boot if newaliases fails on host.
    Check for linuxstdbase before we might fail.
    
    Signed-off-by: Joe Slater <joe.slater at windriver.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-networking/recipes-daemons/postfix/postfix.inc | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index fa5eef9..09447d5 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -239,15 +239,20 @@ pkg_postinst_${PN} () {
         touch /etc/postfix/virtual_alias
         postmap /etc/postfix/virtual_alias
     else
-        touch $D/etc/aliases
-        newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
-        touch $D/etc/postfix/virtual_alias
-        postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
-
         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
+            $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
+            exit 0
+        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