From: Robert Yang <liezhi.yang@windriver.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/1] buildcfg: Print bitbake branch and revision when it is in a separate repo
Date: Wed, 4 Sep 2024 22:03:44 +0800 [thread overview]
Message-ID: <f761db35-c3d0-4391-b79b-52012c1696e0@windriver.com> (raw)
In-Reply-To: <CANNYZj-MPo05EF2qRezSXKpK6L8Djg0CZxBv--ozuLM42JbGUg@mail.gmail.com>
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]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
next prev parent reply other threads:[~2024-09-04 14:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-09-11 13:12 ` Robert Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f761db35-c3d0-4391-b79b-52012c1696e0@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox