Re: [OE-core] [RFC v3 1/2] bitbake-layers: Add ability to update the reference of repositories

2024-01-16 Thread Alexander Kanavin
On Tue, 16 Jan 2024 at 12:02, Jermain Horsman  wrote:
> I did implement a new version, it is available on the mailing list,
> it should include all other feedback as well.

Thanks for persevering; the last version is good, so please re-submit
it without the RFC.

Once it lands we can think of further tweaks, but I think this would
cover the majority of situations where people want custom or floating
references for some of the repos.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193857): 
https://lists.openembedded.org/g/openembedded-core/message/193857
Mute This Topic: https://lists.openembedded.org/mt/103598114/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [RFC v3 1/2] bitbake-layers: Add ability to update the reference of repositories

2024-01-16 Thread Jermain Horsman
> Is comma (,) as a separator okay? Maybe : is better?

In my opinion a comma suggest a list, whereas a semicolon
suggests a relation, so I've opted to use ':'.

I did implement a new version, it is available on the mailing list,
it should include all other feedback as well.

Sincerely,

Jermain Horsman

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193853): 
https://lists.openembedded.org/g/openembedded-core/message/193853
Mute This Topic: https://lists.openembedded.org/mt/103598114/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [RFC v3 1/2] bitbake-layers: Add ability to update the reference of repositories

2024-01-09 Thread Alexander Kanavin
On Mon, 8 Jan 2024 at 15:42, Jermain Horsman  wrote:

All the new options need longer, more detailed descriptions.

> +parser.add_argument('--update', '-u',
> +action='store_true',
> +help='Updates an existing layers setup.')

"Updates an existing layer setup json file with custom references
provided via --repository and --reference options instead of writing a
new json file."

> +parser.add_argument('--repository', '-p',
> +action='append',
> +help='Repository to customize, this requires a reference to be 
> specified.\nThis option can be used multiple times.')

"Repository for which a custom reference provided with --reference
would be used. This option...".

> +parser.add_argument('--reference', '-r',
> +help="Reference to use when updating repositories.\nThe value 
> can be any git reference, however it is up to the user to provide a valid 
> value.\nThis option is only useful when using '--update'.")

"A custom reference to use for a repository (by default the currently
checked out commit id would be written out). This value can be any
reference that 'git checkout' would accept, and is not checked for
validity."

Drop the "This option is only useful when using '--update'." because
it's not accurate I think?

> I've named this option '--repository' as I would like to use '--update' with 
> '--repository', without '--reference'
> at some point, in which case '--use-custom-reference' does not seem 
> appropriate.

To be honest I think we should actually combine --repository and
-reference into one:

--use-custom-reference repo,reference

That way each repo can have its own reference, and all customization
can be done with a single command line invocation, which separate
--repository and --reference options do not allow. And this leaves
space for other options to be added later on.

Is comma (,) as a separator okay? Maybe : is better?

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193449): 
https://lists.openembedded.org/g/openembedded-core/message/193449
Mute This Topic: https://lists.openembedded.org/mt/103598114/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [RFC v3 1/2] bitbake-layers: Add ability to update the reference of repositories

2024-01-08 Thread Jermain Horsman
There are a few additional remarks that I'd like some input on.

> +logger.error("No repository specified. Please provide one 
> using '--repository REPOSITORY'.")
> +raise Exception("No repository specified. Please provide one 
> using '--repository REPOSITORY'.")

I've included both an error message and an exception here, the exception is 
what was used elsewhere already.
However, this doesn't provide clear feedback on what exactly is wrong, using an 
error message will provide clear
feedback in my opinion. (It's a very obvious red message after all, and not 
just a traceback that needs to be analysed.)
On the other hand, only  using an error message isn’t quite sufficient either, 
as it will not exit with an error code.

> +parser.add_argument('--repository', '-p',

I've named this option '--repository' as I would like to use '--update' with 
'--repository', without '--reference'
at some point, in which case '--use-custom-reference' does not seem appropriate.

I'm open to suggestions and I'd like to know what people think about this.

Sincerely,

Jermain Horsman

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193411): 
https://lists.openembedded.org/g/openembedded-core/message/193411
Mute This Topic: https://lists.openembedded.org/mt/103598114/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-