* [PATCH 0/1] buildcfg: Print bitbake branch and revision when it is in a separate repo
@ 2024-09-04 13:23 liezhi.yang
2024-09-04 13:23 ` [PATCH 1/1] " liezhi.yang
0 siblings, 1 reply; 5+ messages in thread
From: liezhi.yang @ 2024-09-04 13:23 UTC (permalink / raw)
To: openembedded-core
From: Robert Yang <liezhi.yang@windriver.com>
The following changes since commit 94ff1be36a1eeef7ddceb4fcf20425a03cd052de:
devtool: remove obsolete SRCTREECOVEREDTASKS handling (2024-09-04 12:36:43 +0100)
are available in the Git repository at:
https://github.com/robertlinux/yocto rbt/buildcfg
https://github.com/robertlinux/yocto/tree/rbt/buildcfg
Robert Yang (1):
buildcfg: Print bitbake branch and revision when it is in a separate
repo
meta/lib/oe/buildcfg.py | 6 ++++++
1 file changed, 6 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/1] buildcfg: Print bitbake branch and revision when it is in a separate repo 2024-09-04 13:23 [PATCH 0/1] buildcfg: Print bitbake branch and revision when it is in a separate repo liezhi.yang @ 2024-09-04 13:23 ` liezhi.yang 2024-09-04 13:36 ` [OE-core] " Alexander Kanavin 0 siblings, 1 reply; 5+ messages in thread From: liezhi.yang @ 2024-09-04 13:23 UTC (permalink / raw) To: openembedded-core From: Robert Yang <liezhi.yang@windriver.com> Clone https://git.openembedded.org/bitbake into poky/bitbake Before the patch: meta meta-poky meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" Now: bitbake = "master:5bd0c65c217394cde4c8e382eba6cf7f4b909c97" meta meta-poky meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- meta/lib/oe/buildcfg.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/lib/oe/buildcfg.py b/meta/lib/oe/buildcfg.py index 4b22f18f36..5e2de15127 100644 --- a/meta/lib/oe/buildcfg.py +++ b/meta/lib/oe/buildcfg.py @@ -73,6 +73,12 @@ def is_layer_modified(path): def get_layer_revisions(d): layers = (d.getVar("BBLAYERS") or "").split() + # bitbake may in a separate git repo + bitbake_dir = bb.__file__.rsplit('/', 3)[0] + bitbake_git_dir = os.path.join(bitbake_dir, '.git') + if os.path.exists(bitbake_git_dir): + layers.insert(0, bitbake_dir) + revisions = [] for i in layers: revisions.append((i, os.path.basename(i), get_metadata_git_branch(i).strip(), get_metadata_git_revision(i), is_layer_modified(i))) -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 1/1] buildcfg: Print bitbake branch and revision when it is in a separate repo 2024-09-04 13:23 ` [PATCH 1/1] " liezhi.yang @ 2024-09-04 13:36 ` Alexander Kanavin 2024-09-04 14:03 ` Robert Yang 2024-09-11 13:12 ` Robert Yang 0 siblings, 2 replies; 5+ messages in thread From: Alexander Kanavin @ 2024-09-04 13:36 UTC (permalink / raw) To: liezhi.yang; +Cc: openembedded-core I don't think putting this into get_layer_revisions() is correct. Bitbake is not a layer, and obtaining its revision should be in a separate pair of functions: is_bitbake_in_separate_repo() get_bitbake_revision() Alex On Wed, 4 Sept 2024 at 15:23, Robert Yang via lists.openembedded.org <liezhi.yang=windriver.com@lists.openembedded.org> wrote: > > From: Robert Yang <liezhi.yang@windriver.com> > > Clone https://git.openembedded.org/bitbake into poky/bitbake > Before the patch: > meta > meta-poky > meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" > > Now: > bitbake = "master:5bd0c65c217394cde4c8e382eba6cf7f4b909c97" > meta > meta-poky > meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > --- > meta/lib/oe/buildcfg.py | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/meta/lib/oe/buildcfg.py b/meta/lib/oe/buildcfg.py > index 4b22f18f36..5e2de15127 100644 > --- a/meta/lib/oe/buildcfg.py > +++ b/meta/lib/oe/buildcfg.py > @@ -73,6 +73,12 @@ def is_layer_modified(path): > > def get_layer_revisions(d): > layers = (d.getVar("BBLAYERS") or "").split() > + # bitbake may in a separate git repo > + bitbake_dir = bb.__file__.rsplit('/', 3)[0] > + bitbake_git_dir = os.path.join(bitbake_dir, '.git') > + if os.path.exists(bitbake_git_dir): > + layers.insert(0, bitbake_dir) > + > revisions = [] > for i in layers: > revisions.append((i, os.path.basename(i), get_metadata_git_branch(i).strip(), get_metadata_git_revision(i), is_layer_modified(i))) > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#204207): https://lists.openembedded.org/g/openembedded-core/message/204207 > Mute This Topic: https://lists.openembedded.org/mt/108264652/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 1/1] buildcfg: Print bitbake branch and revision when it is in a separate repo 2024-09-04 13:36 ` [OE-core] " Alexander Kanavin @ 2024-09-04 14:03 ` Robert Yang 2024-09-11 13:12 ` Robert Yang 1 sibling, 0 replies; 5+ messages in thread From: Robert Yang @ 2024-09-04 14:03 UTC (permalink / raw) To: Alexander Kanavin; +Cc: openembedded-core On 9/4/24 21:36, Alexander Kanavin wrote: > I don't think putting this into get_layer_revisions() is correct. > Bitbake is not a layer, and obtaining its revision should be in a > separate pair of functions: > > is_bitbake_in_separate_repo() > get_bitbake_revision() Makes sense, I will send a V2 for it. // Robert > > Alex > > On Wed, 4 Sept 2024 at 15:23, Robert Yang via lists.openembedded.org > <liezhi.yang=windriver.com@lists.openembedded.org> wrote: >> >> From: Robert Yang <liezhi.yang@windriver.com> >> >> Clone https://git.openembedded.org/bitbake into poky/bitbake >> Before the patch: >> meta >> meta-poky >> meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" >> >> Now: >> bitbake = "master:5bd0c65c217394cde4c8e382eba6cf7f4b909c97" >> meta >> meta-poky >> meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" >> >> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> >> --- >> meta/lib/oe/buildcfg.py | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/meta/lib/oe/buildcfg.py b/meta/lib/oe/buildcfg.py >> index 4b22f18f36..5e2de15127 100644 >> --- a/meta/lib/oe/buildcfg.py >> +++ b/meta/lib/oe/buildcfg.py >> @@ -73,6 +73,12 @@ def is_layer_modified(path): >> >> def get_layer_revisions(d): >> layers = (d.getVar("BBLAYERS") or "").split() >> + # bitbake may in a separate git repo >> + bitbake_dir = bb.__file__.rsplit('/', 3)[0] >> + bitbake_git_dir = os.path.join(bitbake_dir, '.git') >> + if os.path.exists(bitbake_git_dir): >> + layers.insert(0, bitbake_dir) >> + >> revisions = [] >> for i in layers: >> revisions.append((i, os.path.basename(i), get_metadata_git_branch(i).strip(), get_metadata_git_revision(i), is_layer_modified(i))) >> -- >> 2.25.1 >> >> >> -=-=-=-=-=-=-=-=-=-=-=- >> Links: You receive all messages sent to this group. >> View/Reply Online (#204207): https://lists.openembedded.org/g/openembedded-core/message/204207 >> Mute This Topic: https://lists.openembedded.org/mt/108264652/1686489 >> Group Owner: openembedded-core+owner@lists.openembedded.org >> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] >> -=-=-=-=-=-=-=-=-=-=-=- >> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 1/1] buildcfg: Print bitbake branch and revision when it is in a separate repo 2024-09-04 13:36 ` [OE-core] " Alexander Kanavin 2024-09-04 14:03 ` Robert Yang @ 2024-09-11 13:12 ` Robert Yang 1 sibling, 0 replies; 5+ messages in thread From: Robert Yang @ 2024-09-11 13:12 UTC (permalink / raw) To: Alexander Kanavin; +Cc: openembedded-core Hi Alexander, On 9/4/24 21:36, Alexander Kanavin wrote: > I don't think putting this into get_layer_revisions() is correct. > Bitbake is not a layer, and obtaining its revision should be in a > separate pair of functions: After more thoughts, I think always print bitbake branch and revision is better, this is can make the output consistent whenever bitbake is in a separate repo or not. I've sent a V2 for it. // Robert > > is_bitbake_in_separate_repo() > get_bitbake_revision() > > Alex > > On Wed, 4 Sept 2024 at 15:23, Robert Yang via lists.openembedded.org > <liezhi.yang=windriver.com@lists.openembedded.org> wrote: >> >> From: Robert Yang <liezhi.yang@windriver.com> >> >> Clone https://git.openembedded.org/bitbake into poky/bitbake >> Before the patch: >> meta >> meta-poky >> meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" >> >> Now: >> bitbake = "master:5bd0c65c217394cde4c8e382eba6cf7f4b909c97" >> meta >> meta-poky >> meta-yocto-bsp = "master:377fd06d86f5f3be80a927ee19c30d9557077a7f" >> >> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> >> --- >> meta/lib/oe/buildcfg.py | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/meta/lib/oe/buildcfg.py b/meta/lib/oe/buildcfg.py >> index 4b22f18f36..5e2de15127 100644 >> --- a/meta/lib/oe/buildcfg.py >> +++ b/meta/lib/oe/buildcfg.py >> @@ -73,6 +73,12 @@ def is_layer_modified(path): >> >> def get_layer_revisions(d): >> layers = (d.getVar("BBLAYERS") or "").split() >> + # bitbake may in a separate git repo >> + bitbake_dir = bb.__file__.rsplit('/', 3)[0] >> + bitbake_git_dir = os.path.join(bitbake_dir, '.git') >> + if os.path.exists(bitbake_git_dir): >> + layers.insert(0, bitbake_dir) >> + >> revisions = [] >> for i in layers: >> revisions.append((i, os.path.basename(i), get_metadata_git_branch(i).strip(), get_metadata_git_revision(i), is_layer_modified(i))) >> -- >> 2.25.1 >> >> >> -=-=-=-=-=-=-=-=-=-=-=- >> Links: You receive all messages sent to this group. >> View/Reply Online (#204207): https://lists.openembedded.org/g/openembedded-core/message/204207 >> Mute This Topic: https://lists.openembedded.org/mt/108264652/1686489 >> Group Owner: openembedded-core+owner@lists.openembedded.org >> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] >> -=-=-=-=-=-=-=-=-=-=-=- >> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-11 13:12 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-09-04 13:23 [PATCH 0/1] buildcfg: Print bitbake branch and revision when it is in a separate repo liezhi.yang 2024-09-04 13:23 ` [PATCH 1/1] " liezhi.yang 2024-09-04 13:36 ` [OE-core] " Alexander Kanavin 2024-09-04 14:03 ` Robert Yang 2024-09-11 13:12 ` Robert Yang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox