From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] base.bbclass: show layer's branches/revisions in the banner info
Date: Tue, 28 Jun 2011 09:27:50 -0500 [thread overview]
Message-ID: <4E09E4E6.9040703@windriver.com> (raw)
In-Reply-To: <3819C41B-FF96-45FD-8265-8EFC9F73E771@dominion.thruhere.net>
On 6/28/11 1:45 AM, Koen Kooi wrote:
>
> Op 28 jun 2011, om 07:37 heeft Dexuan Cui het volgende geschreven:
>
>> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
>> ---
>> meta/classes/base.bbclass | 14 +++++++++++++-
>> 1 files changed, 13 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> index 119b052..4766c77 100644
>> --- a/meta/classes/base.bbclass
>> +++ b/meta/classes/base.bbclass
>> @@ -165,9 +165,21 @@ python base_eventhandler() {
>> note(msg)
>>
>> if name.startswith("BuildStarted"):
>> + corebase = data.getVar("COREBASE", e.data, 1)
>> + corelayers = [corebase + "/meta", corebase + "/meta-yocto"]
>> + layers = (data.getVar("BBLAYERS", e.data, 1) or "").split()
>> + layers = [i for i in layers if i not in corelayers]
>> + fmt_str = "%-27s = \"%s\""
>> + layer_branches = [fmt_str % (os.path.basename(i)+"_BRANCH", \
>> + base_get_metadata_git_branch(i, None).strip()) for i in layers]
>> + layer_revisions = [fmt_str % (os.path.basename(i)+"_REVISION", \
>> + base_get_metadata_git_revision(i, None)) for i in layers]
>> bb.data.setVar( 'BB_VERSION', bb.__version__, e.data )
>> statusvars = ['BB_VERSION', 'METADATA_BRANCH', 'METADATA_REVISION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TARGET_FPU']
>> - statuslines = ["%-17s = \"%s\"" % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars]
>> + statuslines = [fmt_str % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars]
>> + for i in range(len(layer_branches)):
>> + statuslines.insert(3+2*i, layer_branches[i])
>> + statuslines.insert(3+2*i+1, layer_revisions[i])
>> statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines)
>> print statusmsg
>
> I tried this patch and I get:
>
> OE Build Configuration:
> BB_VERSION = "1.13.1"
> METADATA_BRANCH = "master"
> METADATA_REVISION = "364ca0d2d0399c8cc6d3b3fc28308e1e14673544"
> meta-angstrom_BRANCH = "master"
> meta-angstrom_REVISION = "c19c342c62416752117c2dce4696840bc864f647"
...
> TARGET_ARCH = "arm"
> TARGET_OS = "linux-gnueabi"
> MACHINE = "beagleboard"
> DISTRO = "angstrom"
> DISTRO_VERSION = "v2011.06-core"
> TARGET_FPU = "hard"
>
> So it works as expected, but the output is a bit confusing. I have a few (conflicting) suggestions:
>
> 1) replace _BRANCH and _REVISION with ' branch' and ' revision', e.g.:
>
> meta-archos branch = "master"
> meta-archos revision = "413933fb5f62574e38a9a1e38905ba6e9c1be4ad"
>
> 2) for the extra layers put branch and revision on a single line:
>
> meta-archos = "master/413933fb5f62574e38a9a1e38905ba6e9c1be4ad"
>
> 3) Move the revision info down, e..g
>
> OE Build Configuration:
> BB_VERSION = "1.13.1"
> TARGET_ARCH = "arm"
> TARGET_OS = "linux-gnueabi"
> MACHINE = "beagleboard"
> DISTRO = "angstrom"
> DISTRO_VERSION = "v2011.06-core"
> TARGET_FPU = "hard"
> METADATA_BRANCH = "master"
> METADATA_REVISION = "364ca0d2d0399c8cc6d3b3fc28308e1e14673544"
> meta-angstrom_BRANCH = "master"
> meta-angstrom_REVISION = "c19c342c62416752117c2dce4696840bc864f647"
>
> etc.
>
> What do you think about that?
I think my preference is either 3 or a combination of 2 & 3.
To me the important bits are the configuration settings, followed by the
components that are being used as a secondary concern. It will all help in
debugging and issue, but if the target/distro isn't correct then it doesn't
matter what the rest is.
--Mark
> regards,
>
> Koen
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
next prev parent reply other threads:[~2011-06-28 14:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 5:37 [PATCH 0/1] base.bbclass: show layer's branches/revisions in the banner info Dexuan Cui
2011-06-28 5:37 ` [PATCH 1/1] " Dexuan Cui
2011-06-28 6:45 ` Koen Kooi
2011-06-28 11:07 ` Paul Eggleton
2011-06-29 1:01 ` Khem Raj
2011-06-29 16:14 ` Cui, Dexuan
2011-06-29 16:19 ` Koen Kooi
2011-06-29 16:44 ` Cui, Dexuan
2011-06-29 18:32 ` Khem Raj
2011-06-29 21:16 ` Koen Kooi
2011-06-28 14:27 ` Mark Hatle [this message]
2011-06-28 14:52 ` Cui, Dexuan
2011-06-28 15:10 ` Koen Kooi
2011-06-28 15:21 ` Cui, Dexuan
2011-06-28 15:24 ` Phil Blundell
2011-06-28 15:33 ` Mark Hatle
2011-06-28 15:45 ` Cui, Dexuan
2011-06-28 15:51 ` Koen Kooi
2011-06-28 15:13 ` Koen Kooi
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=4E09E4E6.9040703@windriver.com \
--to=mark.hatle@windriver.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