[oe] [meta-webserver][PATCH] meta-webserver: apache2 allow SYSTEMD_AUTO_ENABLE to be overwritten
Mark Asselstine
mark.asselstine at windriver.com
Mon Nov 20 23:02:58 UTC 2017
On Thursday, November 16, 2017 5:14:02 PM EST Patrick Ohly wrote:
> On Thu, 2017-11-16 at 15:00 -0500, Mark Asselstine wrote:
> > On Thursday, November 16, 2017 7:28:06 PM EST Patrick Ohly wrote:
> > > On Thu, 2017-11-16 at 10:19 -0500, Mark Asselstine wrote:
> > > > The current assignment does not allow a bbappend to be used to
> > > > overwrite the SYSTEMD_AUTO_ENABLE value in order to have apache2
> > > > auto
> > > > start.
> > >
> > > Why does SYSTEMD_AUTO_ENABLE_${PN} = "enable" in a apache2_*.bb not
> >
> > > work? It works fine for me with wpa-supplicant:
> > Sorry. You are correct the bbappend will overwrite it, but this
> > requires a bbappend. If this used "?=" you could achieve this in a
> > local.conf or similar.
>
> SYSTEMD_AUTO_ENABLE_pn-wpa-supplicant = "enable" in local.conf also
> overrides the = assignment in the .bb file.
>
> > In general if there is a possibility for a value to be desireable to
> > overwrite using "?=" makes sense. Thoughts?
>
> I thought the same for a while, but since then I've come around to the
> interpretation that for recipe-specific variables, using =? is mostly
> just a cosmetic thing. I can't think of a good example where it really
> matters in practice.
>
> It's different for global variables which might get set prior to
> parsing a recipe (distro config, local.conf). There it makes sense to
> not overwrite a potentially existing value.
I guess I am just in the habit of using the assignment operator which makes
the most sense (even just for readability sake). Sure in this case it can be
overwritten but like me I suspect others would have to actually attempt this
to convince themselves it works, whereas the early assignment operator would
have made it more explicit. Anyway, not worth pursuing any further.
The bigger question for me is why these recipes are disabling their auto start
out of the gate. If I do 'apt install apache2' on a Ubu box I expect that the
service will start automatically, and it does, so why do we force folks to
'work around' this recipe disabling apache2 from auto starting? (I have yet to
go back to look at the history to see if there is a legit reason)
MarkA
More information about the Openembedded-devel
mailing list