Was there a reason why this wasn't merged in the end (other than being sent as RFC)?
We're using git describe in webOS for long time (through our bbclass: https://github.com/webosose/meta-webosose/blob/master/meta-webos/classes/webos_base.bbclass#L114 ) I would be happy to drop it from our bbclass to use this shared function. Regards, On Tue, Nov 7, 2023 at 4:27 PM Jermain Horsman <[email protected]> wrote: > From: Jermain Horsman <[email protected]> > > Includes a function to determine the default remote. > > Signed-off-by: Jermain Horsman <[email protected]> > --- > meta/lib/oe/buildcfg.py | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/meta/lib/oe/buildcfg.py b/meta/lib/oe/buildcfg.py > index f9cb0cc74c..2ca654e56e 100644 > --- a/meta/lib/oe/buildcfg.py > +++ b/meta/lib/oe/buildcfg.py > @@ -50,6 +50,22 @@ def get_metadata_git_remote_url(path, remote): > uri = '' > return uri.strip() > > +def get_metadata_git_default_remote(path): > + remotes = get_metadata_git_remotes(path) > + if len(remotes) == 1: > + default_remote = remotes[0] > + else: > + try: > + default_remote, _ = bb.process.run('git config --local > checkout.defaultRemote', cwd=path) > + except bb.process.ExecutionError: > + default_remote = "" > + if not default_remote: > + try: > + default_remote, _ = bb.process.run('git config > checkout.defaultRemote', cwd=path) > + except bb.process.ExecutionError: > + default_remote = "" > + return default_remote.strip() > + > def get_metadata_git_describe(path): > try: > describe, _ = bb.process.run('git describe --tags', cwd=path) > -- > 2.42.0.windows.2 > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#195832): https://lists.openembedded.org/g/openembedded-core/message/195832 Mute This Topic: https://lists.openembedded.org/mt/102444609/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
