Re: [PATCH 3/3] meta: Manual override fixes

Andre McCurdy

On Wed, Jul 28, 2021 at 1:24 PM Richard Purdie
<richard.purdie@...> wrote:

On Wed, 2021-07-28 at 21:00 +0100, Richard Purdie via wrote:
On Wed, 2021-07-28 at 12:32 -0700, Andre McCurdy wrote:
On Wed, Jul 28, 2021 at 7:15 AM Richard Purdie
<richard.purdie@...> wrote:

The automated conversion of OE-Core to use the new override sytax isn't
perfect. This patches some mis-converted lines and some lines which were missed
by the automation.

Signed-off-by: Richard Purdie <richard.purdie@...>
@@ -86,7 +86,7 @@ python systemd_populate_packages() {
bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)

paths_escaped = ' '.join(shlex.quote(s) for s in d.getVar('SYSTEMD_SERVICE:' + pkg).split())
- d.setVar('SYSTEMD_SERVICE:ESCAPED_' + pkg, paths_escaped)
+ d.setVar('SYSTEMD_SERVICE_ESCAPED:' + pkg, paths_escaped)
This is manually fixing the misconversion of _ESCAPED to :ESCAPED,
right? If so then does it mean a bug in the automatic conversion
script since overrides can't be uppercase?
There are several bugs in the script, yes. The question is how far to go
in trying to address them and this wasn't a common issue.
In case it isn't clear, this isn't as easy as you might first think. We need
to convert SYSTEMD_SERVICE_${PN} which has uppercase characters in it. Can it
be fixed? Probably, yes. Is it worth the effort/complexity? Maybe not.
I haven't read the script but doesn't it distinguish between things
following an _ which might be an override (and will never be all
uppercase) and the variable name which is being overridden (which may
be uppercase)?

Since the script will be reused many times for many private layers I'd
say making it as robust as possible is a worthy goal.

Join to automatically receive all group messages.