* [PATCH 1/2] bitbake.conf: Use the new variable override syntax in a comment @ 2021-08-26 17:28 Peter Kjellerstedt 2021-08-26 17:28 ` [PATCH 2/2] buildhistory-collect-srcrevs: Adapt to the new variable override syntax Peter Kjellerstedt 0 siblings, 1 reply; 4+ messages in thread From: Peter Kjellerstedt @ 2021-08-26 17:28 UTC (permalink / raw) To: openembedded-core It is probably a good idea if the comment that describes how variable overrides work use the new override syntax... Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- meta/conf/bitbake.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 46c8d08620..2140d498f7 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -743,11 +743,11 @@ DISTRO_NAME ??= "OpenEmbedded" # Overrides are processed left to right, so the ones that are named later take precedence. # You generally want them to go from least to most specific. This means that: -# A variable '<foo>_arm' overrides a variable '<foo>' when ${TARGET_ARCH} is arm. -# A variable '<foo>_qemuarm' overrides '<foo>' and overrides '<foo>_arm' when ${MACHINE} is 'qemuarm'. -# If you use combination ie '<foo>_qemuarm_arm', then '<foo>_qemuarm_arm' will override -# '<foo>_qemuarm' and then '<foo>' will be overriden with that value from '<foo>_qemuarm'. -# And finally '<foo>_forcevariable' overrides any standard variable, with the highest priority. +# A variable '<foo>:arm' overrides a variable '<foo>' when ${TARGET_ARCH} is arm. +# A variable '<foo>:qemuarm' overrides '<foo>' and overrides '<foo>:arm' when ${MACHINE} is 'qemuarm'. +# If you use combination ie '<foo>:qemuarm:arm', then '<foo>:qemuarm:arm' will override +# '<foo>:qemuarm' and then '<foo>' will be overriden with that value from '<foo>:qemuarm'. +# And finally '<foo>:forcevariable' overrides any standard variable, with the highest priority. # This works for functions as well, they are really just variables. # OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable" ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] buildhistory-collect-srcrevs: Adapt to the new variable override syntax 2021-08-26 17:28 [PATCH 1/2] bitbake.conf: Use the new variable override syntax in a comment Peter Kjellerstedt @ 2021-08-26 17:28 ` Peter Kjellerstedt 2021-08-26 17:45 ` [OE-core] " Martin Jansa 0 siblings, 1 reply; 4+ messages in thread From: Peter Kjellerstedt @ 2021-08-26 17:28 UTC (permalink / raw) To: openembedded-core Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- scripts/buildhistory-collect-srcrevs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/buildhistory-collect-srcrevs b/scripts/buildhistory-collect-srcrevs index bca01a922b..6c919299a6 100755 --- a/scripts/buildhistory-collect-srcrevs +++ b/scripts/buildhistory-collect-srcrevs @@ -53,7 +53,7 @@ def main(): sys.exit(1) if options.forcevariable: - forcevariable = '_forcevariable' + forcevariable = ':forcevariable' else: forcevariable = '' @@ -78,14 +78,14 @@ def main(): value = splitval[1].strip('" \t\n\r') if line.startswith('# SRCREV = '): orig_srcrev = value - elif line.startswith('# SRCREV_'): + elif line.startswith('# SRCREV:'): splitval = line.split('=') - name = splitval[0].split('_')[1].strip() + name = splitval[0].split(':')[1].strip() orig_srcrevs[name] = value elif line.startswith('SRCREV ='): srcrev = value - elif line.startswith('SRCREV_'): - name = splitval[0].split('_')[1].strip() + elif line.startswith('SRCREV:'): + name = splitval[0].split(':')[1].strip() srcrevs[name] = value if srcrev and (options.reportall or srcrev != orig_srcrev): all_srcrevs[curdir].append((pn, None, srcrev)) @@ -99,7 +99,7 @@ def main(): print('# %s' % curdir) for pn, name, srcrev in srcrevs: if name: - print('SRCREV_%s_pn-%s%s = "%s"' % (name, pn, forcevariable, srcrev)) + print('SRCREV:%s:pn-%s%s = "%s"' % (name, pn, forcevariable, srcrev)) else: print('SRCREV:pn-%s%s = "%s"' % (pn, forcevariable, srcrev)) ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH 2/2] buildhistory-collect-srcrevs: Adapt to the new variable override syntax 2021-08-26 17:28 ` [PATCH 2/2] buildhistory-collect-srcrevs: Adapt to the new variable override syntax Peter Kjellerstedt @ 2021-08-26 17:45 ` Martin Jansa 2021-08-26 17:57 ` Peter Kjellerstedt 0 siblings, 1 reply; 4+ messages in thread From: Martin Jansa @ 2021-08-26 17:45 UTC (permalink / raw) To: Peter Kjellerstedt; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 2591 bytes --] Is this one correct? The '_' in SRCREV_%s should IMHO stay and only the '_' in _pn should be replaced with ':'. As the first case in the SRC_URI element name, not an override. On Thu, Aug 26, 2021 at 7:28 PM Peter Kjellerstedt < peter.kjellerstedt@axis.com> wrote: > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> > --- > scripts/buildhistory-collect-srcrevs | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/scripts/buildhistory-collect-srcrevs > b/scripts/buildhistory-collect-srcrevs > index bca01a922b..6c919299a6 100755 > --- a/scripts/buildhistory-collect-srcrevs > +++ b/scripts/buildhistory-collect-srcrevs > @@ -53,7 +53,7 @@ def main(): > sys.exit(1) > > if options.forcevariable: > - forcevariable = '_forcevariable' > + forcevariable = ':forcevariable' > else: > forcevariable = '' > > @@ -78,14 +78,14 @@ def main(): > value = splitval[1].strip('" \t\n\r') > if line.startswith('# SRCREV = '): > orig_srcrev = value > - elif line.startswith('# SRCREV_'): > + elif line.startswith('# SRCREV:'): > splitval = line.split('=') > - name = splitval[0].split('_')[1].strip() > + name = splitval[0].split(':')[1].strip() > orig_srcrevs[name] = value > elif line.startswith('SRCREV ='): > srcrev = value > - elif line.startswith('SRCREV_'): > - name = splitval[0].split('_')[1].strip() > + elif line.startswith('SRCREV:'): > + name = splitval[0].split(':')[1].strip() > srcrevs[name] = value > if srcrev and (options.reportall or srcrev != > orig_srcrev): > all_srcrevs[curdir].append((pn, None, srcrev)) > @@ -99,7 +99,7 @@ def main(): > print('# %s' % curdir) > for pn, name, srcrev in srcrevs: > if name: > - print('SRCREV_%s_pn-%s%s = "%s"' % (name, pn, > forcevariable, srcrev)) > + print('SRCREV:%s:pn-%s%s = "%s"' % (name, pn, > forcevariable, srcrev)) > else: > print('SRCREV:pn-%s%s = "%s"' % (pn, forcevariable, > srcrev)) > > > > > [-- Attachment #2: Type: text/html, Size: 3590 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH 2/2] buildhistory-collect-srcrevs: Adapt to the new variable override syntax 2021-08-26 17:45 ` [OE-core] " Martin Jansa @ 2021-08-26 17:57 ` Peter Kjellerstedt 0 siblings, 0 replies; 4+ messages in thread From: Peter Kjellerstedt @ 2021-08-26 17:57 UTC (permalink / raw) To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 2948 bytes --] Hmm, you are of course correct. New patch coming. //Peter From: Martin Jansa <martin.jansa@gmail.com> Sent: den 26 augusti 2021 19:45 To: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org> Subject: Re: [OE-core] [PATCH 2/2] buildhistory-collect-srcrevs: Adapt to the new variable override syntax Is this one correct? The '_' in SRCREV_%s should IMHO stay and only the '_' in _pn should be replaced with ':'. As the first case in the SRC_URI element name, not an override. On Thu, Aug 26, 2021 at 7:28 PM Peter Kjellerstedt <peter.kjellerstedt@axis.com<mailto:peter.kjellerstedt@axis.com>> wrote: Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com<mailto:peter.kjellerstedt@axis.com>> --- scripts/buildhistory-collect-srcrevs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/buildhistory-collect-srcrevs b/scripts/buildhistory-collect-srcrevs index bca01a922b..6c919299a6 100755 --- a/scripts/buildhistory-collect-srcrevs +++ b/scripts/buildhistory-collect-srcrevs @@ -53,7 +53,7 @@ def main(): sys.exit(1) if options.forcevariable: - forcevariable = '_forcevariable' + forcevariable = ':forcevariable' else: forcevariable = '' @@ -78,14 +78,14 @@ def main(): value = splitval[1].strip('" \t\n\r') if line.startswith('# SRCREV = '): orig_srcrev = value - elif line.startswith('# SRCREV_'): + elif line.startswith('# SRCREV:'): splitval = line.split('=') - name = splitval[0].split('_')[1].strip() + name = splitval[0].split(':')[1].strip() orig_srcrevs[name] = value elif line.startswith('SRCREV ='): srcrev = value - elif line.startswith('SRCREV_'): - name = splitval[0].split('_')[1].strip() + elif line.startswith('SRCREV:'): + name = splitval[0].split(':')[1].strip() srcrevs[name] = value if srcrev and (options.reportall or srcrev != orig_srcrev): all_srcrevs[curdir].append((pn, None, srcrev)) @@ -99,7 +99,7 @@ def main(): print('# %s' % curdir) for pn, name, srcrev in srcrevs: if name: - print('SRCREV_%s_pn-%s%s = "%s"' % (name, pn, forcevariable, srcrev)) + print('SRCREV:%s:pn-%s%s = "%s"' % (name, pn, forcevariable, srcrev)) else: print('SRCREV:pn-%s%s = "%s"' % (pn, forcevariable, srcrev)) [-- Attachment #2: Type: text/html, Size: 7821 bytes --] ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-26 17:57 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-08-26 17:28 [PATCH 1/2] bitbake.conf: Use the new variable override syntax in a comment Peter Kjellerstedt 2021-08-26 17:28 ` [PATCH 2/2] buildhistory-collect-srcrevs: Adapt to the new variable override syntax Peter Kjellerstedt 2021-08-26 17:45 ` [OE-core] " Martin Jansa 2021-08-26 17:57 ` Peter Kjellerstedt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox