From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
To: Andreas Oberritter <obi@opendreambox.org>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] update-rc.d.bbclass: check that init script exists before running it
Date: Thu, 06 Oct 2016 11:49:35 +0300 [thread overview]
Message-ID: <1475743775.13655.55.camel@linux.intel.com> (raw)
In-Reply-To: <b32b7b2f-68cc-31d6-d687-2eeb12aa196a@opendreambox.org>
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)
> And if there's a packaging bug, we should IMO better add a sanity check
> there and abort the build.
First of all, this does not fix a build-time, but a run-time problem. And,
I think that the pre post etc scripts should basically never fail.
[YOCTO #10299]
> >
> > Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
> > ---
> > meta/classes/update-rc.d.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update
> > -rc.d.bbclass
> > index dfef2a2..24da547 100644
> > --- a/meta/classes/update-rc.d.bbclass
> > +++ b/meta/classes/update-rc.d.bbclass
> > @@ -37,7 +37,7 @@ fi
> > }
> >
> > updatercd_prerm() {
> > -if [ -z "$D" ]; then
> > +if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
> > ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
> > fi
> > }
> >
>
next prev parent reply other threads:[~2016-10-06 8:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-05 14:11 [PATCH] update-rc.d.bbclass: check that init script exists before running it Markus Lehtonen
2016-10-05 14:51 ` Andreas Oberritter
2016-10-06 8:49 ` Markus Lehtonen [this message]
2016-10-06 10:12 ` Phil Blundell
2016-10-06 13:46 ` Markus Lehtonen
2016-10-06 15:12 ` Phil Blundell
2016-10-08 14:41 ` Andreas Oberritter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475743775.13655.55.camel@linux.intel.com \
--to=markus.lehtonen@linux.intel.com \
--cc=obi@opendreambox.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox