[OE-core] [PATCH] update-rc.d.bbclass: check that init script exists before running it

Markus Lehtonen markus.lehtonen at linux.intel.com
Thu Oct 6 13:46:56 UTC 2016


On Thu, 2016-10-06 at 11:12 +0100, Phil Blundell wrote:
> On Thu, 2016-10-06 at 11:49 +0300, Markus Lehtonen wrote:
> > On Wed, 2016-10-05 at 16:51 +0200, Andreas Oberritter wrote:
> > > Hello Markus,
> > > 
> > > On 05.10.2016 16:11, Markus Lehtonen wrote:
> > > > Check that the init script that is going to be called in the
> > > > prerm()
> > > > script really exists. There might be a packaging bug or the
> > > > script
> > > > might've been removed already earlier in prerm().
> > > 
> > > isn't it called prerm in the first place because it's not supposed
> > > to
> > > remove any packaged files?
> > 
> > In the case of this bug it does not remove any packaged files. Update
> > -alternatives removes a symlink (created by itself)
> 
> That arguably is a bug in u-a, which probably ought to be removing the
> symlink in postrm not prerm.  

It was moved to prerm earlier to fix some other problems:
http://git.openembedded.org/openembedded-core/commit/meta/classes/update-al
ternatives.bbclass?id=2a5484a90513b58c829a916bfe5268a0fde3512a

So I think moving it back and forth between prerm and postrm doesn't get us
anywhere :)


Thanks,
  Markus



> If it removes the symlink too early and
> prevents u-rc.d from running "stop" on it then you may end up with
> dangling daemon processes still running after the package has been
> uninstalled.  But...
> 
> > I think that the pre post etc scripts should basically never fail.
> 
> ... this is essentially true, and having u-rc.d's own prerm fail
> because of a bug in u-a definitely isn't going to improve the
> situation.  So I think your patch is a good one.
> 
> p.
> 
> > 




More information about the Openembedded-core mailing list