Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] msmtp: fix postinstall to avoid do_rootfs failure
@ 2019-07-15  5:35 Chen Qi
  2019-07-15  5:35 ` [PATCH 1/1] " Chen Qi
  0 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2019-07-15  5:35 UTC (permalink / raw)
  To: openembedded-core

*** BLURB HERE ***
The following changes since commit 80ab79168ede2786868cbd354f0950c949f73527:

  gnome-themes-standard: remove (2019-07-11 09:32:50 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/msmtp-lsb
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/msmtp-lsb

Chen Qi (1):
  msmtp: fix postinstall to avoid do_rootfs failure

 meta/recipes-extended/msmtp/msmtp_1.8.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] msmtp: fix postinstall to avoid do_rootfs failure
  2019-07-15  5:35 [PATCH 0/1] msmtp: fix postinstall to avoid do_rootfs failure Chen Qi
@ 2019-07-15  5:35 ` Chen Qi
  2019-07-15  6:17   ` Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2019-07-15  5:35 UTC (permalink / raw)
  To: openembedded-core

When lsb is enabled, that is, 'linuxstdbase' is in OVERRIDES,
do_rootfs would fail if both 'msmtp' and 'postfix' are installed.
This is because they both try to create /usr/lib/sendmail link if
it does not exist. So we need to fix the check to avoid non-zero
exit status.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-extended/msmtp/msmtp_1.8.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/msmtp/msmtp_1.8.4.bb b/meta/recipes-extended/msmtp/msmtp_1.8.4.bb
index 888c1bb..bd8552c 100644
--- a/meta/recipes-extended/msmtp/msmtp_1.8.4.bb
+++ b/meta/recipes-extended/msmtp/msmtp_1.8.4.bb
@@ -25,5 +25,5 @@ ALTERNATIVE_PRIORITY = "100"
 
 pkg_postinst_${PN}_linuxstdbase () {
 	# /usr/lib/sendmial is required by LSB core test
-	[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+	[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/ || true
 }
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] msmtp: fix postinstall to avoid do_rootfs failure
  2019-07-15  5:35 ` [PATCH 1/1] " Chen Qi
@ 2019-07-15  6:17   ` Adrian Bunk
  2019-07-15  6:40     ` ChenQi
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2019-07-15  6:17 UTC (permalink / raw)
  To: Chen Qi; +Cc: openembedded-core

On Mon, Jul 15, 2019 at 01:35:15PM +0800, Chen Qi wrote:
> When lsb is enabled, that is, 'linuxstdbase' is in OVERRIDES,
> do_rootfs would fail if both 'msmtp' and 'postfix' are installed.
> This is because they both try to create /usr/lib/sendmail link if
> it does not exist. So we need to fix the check to avoid non-zero
> exit status.
>...

This would make it random (depending on installation order) which is 
linked to, and it could also make ${sbindir}/sendmail and 
$D/usr/lib/sendmail point to different programs.

It would be better to make $D/usr/lib/sendmail also an alternative in 
all packages that provide sendmail.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] msmtp: fix postinstall to avoid do_rootfs failure
  2019-07-15  6:17   ` Adrian Bunk
@ 2019-07-15  6:40     ` ChenQi
  2019-07-15  6:44       ` Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: ChenQi @ 2019-07-15  6:40 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: openembedded-core

On 07/15/2019 02:17 PM, Adrian Bunk wrote:
> On Mon, Jul 15, 2019 at 01:35:15PM +0800, Chen Qi wrote:
>> When lsb is enabled, that is, 'linuxstdbase' is in OVERRIDES,
>> do_rootfs would fail if both 'msmtp' and 'postfix' are installed.
>> This is because they both try to create /usr/lib/sendmail link if
>> it does not exist. So we need to fix the check to avoid non-zero
>> exit status.
>> ...
> This would make it random (depending on installation order) which is
> linked to, and it could also make ${sbindir}/sendmail and
> $D/usr/lib/sendmail point to different programs.
>
> It would be better to make $D/usr/lib/sendmail also an alternative in
> all packages that provide sendmail.
>
> cu
> Adrian
>
I don't think we should mix linuxstdbase and ALTERNATIVES setting. It 
makes things complicated.
As ALTERNATIVES_PRIORITY is higher in postfix, I'll just remove the 
check in postfix and use 'ln -sf' directly.
Can you accept this solution?

Regards,
Chen Qi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] msmtp: fix postinstall to avoid do_rootfs failure
  2019-07-15  6:40     ` ChenQi
@ 2019-07-15  6:44       ` Adrian Bunk
  2019-07-15  8:38         ` ChenQi
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2019-07-15  6:44 UTC (permalink / raw)
  To: ChenQi; +Cc: openembedded-core

On Mon, Jul 15, 2019 at 02:40:28PM +0800, ChenQi wrote:
> On 07/15/2019 02:17 PM, Adrian Bunk wrote:
> > On Mon, Jul 15, 2019 at 01:35:15PM +0800, Chen Qi wrote:
> > > When lsb is enabled, that is, 'linuxstdbase' is in OVERRIDES,
> > > do_rootfs would fail if both 'msmtp' and 'postfix' are installed.
> > > This is because they both try to create /usr/lib/sendmail link if
> > > it does not exist. So we need to fix the check to avoid non-zero
> > > exit status.
> > > ...
> > This would make it random (depending on installation order) which is
> > linked to, and it could also make ${sbindir}/sendmail and
> > $D/usr/lib/sendmail point to different programs.
> > 
> > It would be better to make $D/usr/lib/sendmail also an alternative in
> > all packages that provide sendmail.
> > 
> > cu
> > Adrian
> > 
> I don't think we should mix linuxstdbase and ALTERNATIVES setting. It makes
> things complicated.
> As ALTERNATIVES_PRIORITY is higher in postfix, I'll just remove the check in
> postfix and use 'ln -sf' directly.
> Can you accept this solution?

I do not see how this solves your problem if msmtp gets installed
after postfix.

Is it actually required to have these packages installed at the same 
time in LSB?

If not, something like
  RCONFLICTS_linuxstdbase = "postfix"
might work. (untested)

> Regards,
> Chen Qi

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] msmtp: fix postinstall to avoid do_rootfs failure
  2019-07-15  6:44       ` Adrian Bunk
@ 2019-07-15  8:38         ` ChenQi
  0 siblings, 0 replies; 6+ messages in thread
From: ChenQi @ 2019-07-15  8:38 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: openembedded-core

On 07/15/2019 02:44 PM, Adrian Bunk wrote:
> On Mon, Jul 15, 2019 at 02:40:28PM +0800, ChenQi wrote:
>> On 07/15/2019 02:17 PM, Adrian Bunk wrote:
>>> On Mon, Jul 15, 2019 at 01:35:15PM +0800, Chen Qi wrote:
>>>> When lsb is enabled, that is, 'linuxstdbase' is in OVERRIDES,
>>>> do_rootfs would fail if both 'msmtp' and 'postfix' are installed.
>>>> This is because they both try to create /usr/lib/sendmail link if
>>>> it does not exist. So we need to fix the check to avoid non-zero
>>>> exit status.
>>>> ...
>>> This would make it random (depending on installation order) which is
>>> linked to, and it could also make ${sbindir}/sendmail and
>>> $D/usr/lib/sendmail point to different programs.
>>>
>>> It would be better to make $D/usr/lib/sendmail also an alternative in
>>> all packages that provide sendmail.
>>>
>>> cu
>>> Adrian
>>>
>> I don't think we should mix linuxstdbase and ALTERNATIVES setting. It makes
>> things complicated.
>> As ALTERNATIVES_PRIORITY is higher in postfix, I'll just remove the check in
>> postfix and use 'ln -sf' directly.
>> Can you accept this solution?
> I do not see how this solves your problem if msmtp gets installed
> after postfix.
>
> Is it actually required to have these packages installed at the same
> time in LSB?
>
> If not, something like
>    RCONFLICTS_linuxstdbase = "postfix"
> might work. (untested)
>
>> Regards,
>> Chen Qi
> cu
> Adrian
>
Hi Adrian,

I've sent out V2 using alternatives.

Best Regards,

Chen Qi



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-15  8:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-15  5:35 [PATCH 0/1] msmtp: fix postinstall to avoid do_rootfs failure Chen Qi
2019-07-15  5:35 ` [PATCH 1/1] " Chen Qi
2019-07-15  6:17   ` Adrian Bunk
2019-07-15  6:40     ` ChenQi
2019-07-15  6:44       ` Adrian Bunk
2019-07-15  8:38         ` ChenQi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox