[oe] [meta-networking][PATCH] postfix: fix pkg_postinst_${PN}

Yu, Mingli mingli.yu at windriver.com
Thu Sep 13 09:30:25 UTC 2018



On 2018年09月13日 16:32, ChenQi wrote:
> On 09/13/2018 04:23 PM, mingli.yu at windriver.com wrote:
>> From: Mingli Yu <Mingli.Yu at windriver.com>
>>
>> "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>
>> ---
>>   meta-networking/recipes-daemons/postfix/postfix.inc | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc
>> b/meta-networking/recipes-daemons/postfix/postfix.inc
>> index 49f9f7b1f..71d7ef5df 100644
>> --- a/meta-networking/recipes-daemons/postfix/postfix.inc
>> +++ b/meta-networking/recipes-daemons/postfix/postfix.inc
>> @@ -246,7 +246,6 @@ 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
>>           fi
>>           touch $D/etc/postfix/virtual_alias
>>           postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
> I guess you need to use the if...else... block here.

Thanks Qi, Will send out v2 to update the logic.

Thanks,

>
> Regards,
> Chen Qi
>



More information about the Openembedded-devel mailing list