Message ID | 20230621142212.985096-1-ross.burton@arm.com |
---|---|
State | Accepted, archived |
Commit | d606ad5c237d0e28f09f0aa783e83846cbca8d21 |
Headers | show |
Series | base: improve LICENSE_FLAGS_DETAILS output | expand |
Hi Ross, I'm currently writing the doc patch for LICENSE_FLAGS_DETAILS. However, I don't find the current behavior optimal... On 21.06.23 at 16:22, ross.burton@arm.com wrote: > From: Ross Burton <ross.burton@arm.com> > > Don't prefix the output of LICENSE_FLAGS_DETAILS with "For further > details, see" so that recipes can put arbitrary text in their license > details instead of being limited to a specific sentence structure. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > meta/classes-global/base.bbclass | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass > index 976a2ddee4b..cbda8d12f09 100644 > --- a/meta/classes-global/base.bbclass > +++ b/meta/classes-global/base.bbclass > @@ -520,7 +520,7 @@ python () { > message = "Has a restricted license '%s' which is not listed in your LICENSE_FLAGS_ACCEPTED." % unmatched > details = d.getVarFlag("LICENSE_FLAGS_DETAILS", unmatched) > if details: > - message += " For further details, see %s." % details > + message += details What about message += ' ' + details instead? Otherwise, you have to add a leading space to LICENSE_FLAGS_DETAILS. What do you think? Happy to send a patch if that helps... Cheers Michael.
On 8 Sep 2023, at 12:00, Michael Opdenacker <michael.opdenacker@bootlin.com> wrote: > > Hi Ross, > > I'm currently writing the doc patch for LICENSE_FLAGS_DETAILS. > However, I don't find the current behavior optimal... > > On 21.06.23 at 16:22, ross.burton@arm.com wrote: >> From: Ross Burton <ross.burton@arm.com> >> Don't prefix the output of LICENSE_FLAGS_DETAILS with "For further >> details, see" so that recipes can put arbitrary text in their license >> details instead of being limited to a specific sentence structure. >> Signed-off-by: Ross Burton <ross.burton@arm.com> >> --- >> meta/classes-global/base.bbclass | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass >> index 976a2ddee4b..cbda8d12f09 100644 >> --- a/meta/classes-global/base.bbclass >> +++ b/meta/classes-global/base.bbclass >> @@ -520,7 +520,7 @@ python () { >> message = "Has a restricted license '%s' which is not listed in your LICENSE_FLAGS_ACCEPTED." % unmatched >> details = d.getVarFlag("LICENSE_FLAGS_DETAILS", unmatched) >> if details: >> - message += " For further details, see %s." % details >> + message += details > > What about > message += ' ' + details > instead? > > Otherwise, you have to add a leading space to LICENSE_FLAGS_DETAILS. > What do you think? Throwing in a newline or a space seems sensible, yes. Want to send a patch? FWIW the recipes in meta-arm put a newline at the beginning, so adding a blank line if details is set seems fairly sensible. Ross
On 08.09.23 at 13:11, Ross Burton wrote: > On 8 Sep 2023, at 12:00, Michael Opdenacker <michael.opdenacker@bootlin.com> wrote: >> Hi Ross, >> >> I'm currently writing the doc patch for LICENSE_FLAGS_DETAILS. >> However, I don't find the current behavior optimal... >> >> On 21.06.23 at 16:22, ross.burton@arm.com wrote: >>> From: Ross Burton <ross.burton@arm.com> >>> Don't prefix the output of LICENSE_FLAGS_DETAILS with "For further >>> details, see" so that recipes can put arbitrary text in their license >>> details instead of being limited to a specific sentence structure. >>> Signed-off-by: Ross Burton <ross.burton@arm.com> >>> --- >>> meta/classes-global/base.bbclass | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass >>> index 976a2ddee4b..cbda8d12f09 100644 >>> --- a/meta/classes-global/base.bbclass >>> +++ b/meta/classes-global/base.bbclass >>> @@ -520,7 +520,7 @@ python () { >>> message = "Has a restricted license '%s' which is not listed in your LICENSE_FLAGS_ACCEPTED." % unmatched >>> details = d.getVarFlag("LICENSE_FLAGS_DETAILS", unmatched) >>> if details: >>> - message += " For further details, see %s." % details >>> + message += details >> What about >> message += ' ' + details >> instead? >> >> Otherwise, you have to add a leading space to LICENSE_FLAGS_DETAILS. >> What do you think? > Throwing in a newline or a space seems sensible, yes. Want to send a patch? > > FWIW the recipes in meta-arm put a newline at the beginning, so adding a blank line if details is set seems fairly sensible. Thanks Ross, good idea! I sent a patch, but been in a rush, forgot to add you to a "Reported-by" line. Thanks again Michael.
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 976a2ddee4b..cbda8d12f09 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -520,7 +520,7 @@ python () { message = "Has a restricted license '%s' which is not listed in your LICENSE_FLAGS_ACCEPTED." % unmatched details = d.getVarFlag("LICENSE_FLAGS_DETAILS", unmatched) if details: - message += " For further details, see %s." % details + message += details bb.debug(1, "Skipping %s: %s" % (pn, message)) raise bb.parse.SkipRecipe(message)