base.bbclass: show layer's branches/revisions in the banner info
cover base.bbclass: show layer's branches/revisions in the banner info
The following changes since commit a1f79a7896b6411669b3ccada6204d2695e80fc5:
runqueue.py: Add umask task control (2011-06-24 12:23:12 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dcui/banner
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/banner
Dexuan Cui (1):
base.bbclass: show layer's branches/revisions in the banner info
meta/classes/base.bbclass | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/1 base.bbclass: show layer's branches/revisions in the banner info
--- meta/classes/base.bbclass | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
meta/classes/base.bbclass +13 -1
@@ -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
Signature · 1 line
1.7.4.1
Op 28 jun 2011, om 07:37 heeft Dexuan Cui het volgende geschreven:
Quoted 21 lines
Signed-off-by Dexuan Cui <[email protected]>---
meta/classes/base.bbclass | 14 +++++++++++++-1 files changed, 13 insertions(+), 1 deletions(-)meta/classes/base.bbclass +8
-0@@ -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", \
meta/classes/base.bbclass python base_eventhandler() { · line 184
Quoted 10 lines
meta/classes/base.bbclass +5
-1+ 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" meta-oe_BRANCH = "master" meta-oe_REVISION = "9e3f9dddd2d498a603c0e9eb8bf77d3476a21940" meta-efl_BRANCH = "master" meta-efl_REVISION = "9e3f9dddd2d498a603c0e9eb8bf77d3476a21940" meta-gpe_BRANCH = "master" meta-gpe_REVISION = "9e3f9dddd2d498a603c0e9eb8bf77d3476a21940" meta-gnome_BRANCH = "master" meta-gnome_REVISION = "9e3f9dddd2d498a603c0e9eb8bf77d3476a21940" meta-texasinstruments_BRANCH = "master" meta-texasinstruments_REVISION = "04f274735bfc4aab757d25490df52641523bad5e" meta-efikamx_BRANCH = "master" meta-efikamx_REVISION = "70cff8742d629fd32463e3ef1bddb83f04d08dc5" meta-nslu2_BRANCH = "master" meta-nslu2_REVISION = "aaf918b85d7a8155d6e7c0ff042808346998fbea" meta-htc_BRANCH = "master" meta-htc_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-nokia_BRANCH = "master" meta-nokia_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-openmoko_BRANCH = "master" meta-openmoko_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-palm_BRANCH = "master" meta-palm_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-zaurus_BRANCH = "master" meta-zaurus_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-sugarbay_BRANCH = "master" meta-sugarbay_REVISION = "50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-crownbay_BRANCH = "master" meta-crownbay_REVISION = "50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-emenlow_BRANCH = "master" meta-emenlow_REVISION = "50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-fishriver_BRANCH = "master" meta-fishriver_REVISION = "50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-jasperforest_BRANCH = "master" meta-jasperforest_REVISION = "50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-n450_BRANCH = "master" meta-n450_REVISION = "50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-ettus_BRANCH = "master" meta-ettus_REVISION = "c34c30fa29f7ab484cc90efb9713325da8e01460" meta-openpandora_BRANCH = "master" meta-openpandora_REVISION = "edaf6e751f873ed7a82c1116d3d58b9a070052dc" meta-archos_BRANCH = "master" meta-archos_REVISION = "413933fb5f62574e38a9a1e38905ba6e9c1be4ad" 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?
regards,
Koen
Quoted 11 lines · On Tuesday 28 June 2011 07:45:09 Koen Kooi wrote:
So it works as expected, but the output is a bit confusing. I have a few (conflicting) suggestions:
1) replace
_BRANCHand_REVISIONwith ' 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"
I'd go with option 2 over 1, personally - the list gets rather long on something like Angstrom, better to keep it short.
Quoted 15 lines
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"
Quoted 3 lines
etc.
What do you think about that?
Sounds good to me.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 9 lines · Paul Eggleton
Quoted 8 lines · On Tuesday 28 June 2011 07:45:09 Koen Kooi wrote:
So it works as expected, but the output is a bit confusing. I have a few (conflicting) suggestions:
1) replace
_BRANCHand_REVISIONwith ' branch' and ' revision', e.g.:meta-archos branch = "master" meta-archos revision = "413933fb5f62574e38a9a1e38905ba6e9c1be4ad"
Quoted 6 lines
Quoted 3 lines
2) for the extra layers put branch and revision on a single line:
meta-archos = "master/413933fb5f62574e38a9a1e38905ba6e9c1be4ad"I'd go with option 2 over 1, personally - the list gets rather long on something like Angstrom, better to keep it short.
I would say to do it uniformly and treat oe-core as one of layers too when emitting this info
Quoted 14 lines · Khem Raj
Quoted 13 lines · Paul Eggleton
Quoted 12 lines · On Tuesday 28 June 2011 07:45:09 Koen Kooi wrote:
So it works as expected, but the output is a bit confusing. I have a few (conflicting) suggestions:
1) replace
_BRANCHand_REVISIONwith ' 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:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
meta-archos =
"master/413933fb5f62574e38a9a1e38905ba6e9c1be4ad"I'd go with option 2 over 1, personally - the list gets rather long on something like Angstrom, better to keep it short.
I would say to do it uniformly and treat oe-core as one of layers too when emitting this info
Ok. I'll make a new version for this.
BTW: meta and mete-yocto belong to the same git repo actually, so do you think showing them in one line like this
meta,meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
is better than showing 2 lines like this:
meta = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
?
Thanks,
-- Dexuan
Op 29 jun 2011, om 18:14 heeft Cui, Dexuan het volgende geschreven:
Quoted 26 lines
Quoted 14 lines · Khem Raj
Quoted 13 lines · Paul Eggleton
Quoted 12 lines · On Tuesday 28 June 2011 07:45:09 Koen Kooi wrote:
So it works as expected, but the output is a bit confusing. I have a few (conflicting) suggestions:
1) replace
_BRANCHand_REVISIONwith ' 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:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
meta-archos =
"master/413933fb5f62574e38a9a1e38905ba6e9c1be4ad"I'd go with option 2 over 1, personally - the list gets rather long on something like Angstrom, better to keep it short.
I would say to do it uniformly and treat oe-core as one of layers too when emitting this info
Ok. I'll make a new version for this.
BTW: meta and mete-yocto belong to the same git repo actually, so do you think showing them in one line like this
Quoted 6 lines
meta,meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
is better than showing 2 lines like this:
meta = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
That breaks with repos like meta-intel and meta-oe. Maybe something like this:
BB_VERSION = "1.13.2" TARGET_ARCH = "arm" TARGET_OS = "linux-gnueabi" MACHINE = "archosa32" DISTRO = "angstrom" DISTRO_VERSION = "v2011.06-core" TARGET_FPU = "hard" METADATA_BRANCH = "master" METADATA_REVISION = "16f84804cfbe472833ff00bfd2694947eabf8e20" meta-angstrom = "master:fd68a073e9669fdee0a9dc0483b3d39d3e3e0b46" meta-oe = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669" meta-efl same meta-gpe same meta-gnome same meta-texasinstruments = "master:2e16e2fbd93bc00bc0a0afaf86975da7778eaa43" meta-efikamx = "master:70cff8742d629fd32463e3ef1bddb83f04d08dc5" meta-nslu2 = "master:aaf918b85d7a8155d6e7c0ff042808346998fbea" meta-htc = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-nokia same meta-openmoko same meta-palm same meta-zaurus same meta-sugarbay = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-crownbay same meta-emenlow same meta-fishriver same meta-jasperforest same meta-n450 same meta-ettus = "master:c34c30fa29f7ab484cc90efb9713325da8e01460" meta-openpandora = "master:edaf6e751f873ed7a82c1116d3d58b9a070052dc" meta-archos = "master:4b689944d968b0ef4d0e9928e76c54f8a76a919a"
regards,
Koen
Quoted 8 lines · Koen Kooi
Op 29 jun 2011, om 18:14 heeft Cui, Dexuan het volgende geschreven:
Quoted 6 lines
Quoted 2 lines · Khem Raj
Quoted 1 line · Paul Eggleton
On Tuesday 28 June 2011 07:45:09 Koen Kooi wrote:
BTW: meta and mete-yocto belong to the same git repo actually, so do you think showing them in one line like this
Quoted 8 lines
Quoted 6 lines
meta,meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
is better than showing 2 lines like this:
meta = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"That breaks with repos like meta-intel and meta-oe. Maybe something
Could you please explain a bit more?
Quoted 24 lines
like this:
METADATA_BRANCH= "master"METADATA_REVISION=
"16f84804cfbe472833ff00bfd2694947eabf8e20" meta-angstrom = "master:fd68a073e9669fdee0a9dc0483b3d39d3e3e0b46" meta-oe = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669" meta-efl same
meta-gpe same
meta-gnome same
meta-texasinstruments =
"master:2e16e2fbd93bc00bc0a0afaf86975da7778eaa43" meta-efikamx = "master:70cff8742d629fd32463e3ef1bddb83f04d08dc5" meta-nslu2 = "master:aaf918b85d7a8155d6e7c0ff042808346998fbea" meta-htc = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-nokia same
meta-openmoko samemeta-palm same meta-zaurus same meta-sugarbay ="master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-crownbay same
meta-emenlow same
meta-fishriver same
Quoted 6 lines
meta-jasperforest same meta-n450 same meta-ettus ="master:c34c30fa29f7ab484cc90efb9713325da8e01460" meta-openpandora = "master:edaf6e751f873ed7a82c1116d3d58b9a070052dc" meta-archos = "master:4b689944d968b0ef4d0e9928e76c54f8a76a919a"
I think the below is a better format(but the line may be too long?)?
meta,meta-yocto = "master:16f84804cfbe472833ff00bfd2694947eabf8e20"
meta-angstrom = "master:fd68a073e9669fdee0a9dc0483b3d39d3e3e0b46"
meta-oe,meta-efl,meta-gpe,meta-gnome = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669"
meta-texasinstruments = "master:2e16e2fbd93bc00bc0a0afaf86975da7778eaa43" meta-efikamx = "master:70cff8742d629fd32463e3ef1bddb83f04d08dc5" meta-nslu2 = "master:aaf918b85d7a8155d6e7c0ff042808346998fbea" meta-htc,meta-nokia,meta-openmoko,meta-palm,meta,zaurus = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-sugarbay,meta-crownbay,meta-emenlow,meta-fishriver,meta-jasperforest,meta-n450, = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-ettus = "master:c34c30fa29f7ab484cc90efb9713325da8e01460" meta-openpandora = "master:edaf6e751f873ed7a82c1116d3d58b9a070052dc" meta-archos = "master:4b689944d968b0ef4d0e9928e76c54f8a76a919a"
Thanks,
-- Dexuan
Quoted 49 lines · Dexuan
Quoted 8 lines · Koen Kooi
Op 29 jun 2011, om 18:14 heeft Cui, Dexuan het volgende geschreven:
Quoted 6 lines
Quoted 2 lines · Khem Raj
Quoted 1 line · Paul Eggleton
On Tuesday 28 June 2011 07:45:09 Koen Kooi wrote:
BTW: meta and mete-yocto belong to the same git repo actually, so do you think showing them in one line like this
Quoted 8 lines
Quoted 6 lines
meta,meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
is better than showing 2 lines like this:
meta = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"That breaks with repos like meta-intel and meta-oe. Maybe something
Could you please explain a bit more?
Quoted 24 lines
like this:
METADATA_BRANCH= "master"METADATA_REVISION=
"16f84804cfbe472833ff00bfd2694947eabf8e20" meta-angstrom = "master:fd68a073e9669fdee0a9dc0483b3d39d3e3e0b46" meta-oe = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669" meta-efl same
meta-gpe same
meta-gnome same
meta-texasinstruments =
"master:2e16e2fbd93bc00bc0a0afaf86975da7778eaa43" meta-efikamx = "master:70cff8742d629fd32463e3ef1bddb83f04d08dc5" meta-nslu2 = "master:aaf918b85d7a8155d6e7c0ff042808346998fbea" meta-htc = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-nokia same
meta-openmoko samemeta-palm same meta-zaurus same meta-sugarbay ="master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-crownbay same
meta-emenlow same
meta-fishriver sameQuoted 6 lines
meta-jasperforest same meta-n450 same meta-ettus ="master:c34c30fa29f7ab484cc90efb9713325da8e01460" meta-openpandora = "master:edaf6e751f873ed7a82c1116d3d58b9a070052dc" meta-archos = "master:4b689944d968b0ef4d0e9928e76c54f8a76a919a"
Quoted 1 line
I think the below is a better format(but the line may be too long?)?
You could list the layers line by line and then = "rev" after the last layer from same repo
Quoted 18 lines
meta,meta-yocto = "master:16f84804cfbe472833ff00bfd2694947eabf8e20"
meta-angstrom = "master:fd68a073e9669fdee0a9dc0483b3d39d3e3e0b46"
meta-oe,meta-efl,meta-gpe,meta-gnome = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669"meta-texasinstruments = "master:2e16e2fbd93bc00bc0a0afaf86975da7778eaa43" meta-efikamx = "master:70cff8742d629fd32463e3ef1bddb83f04d08dc5" meta-nslu2 = "master:aaf918b85d7a8155d6e7c0ff042808346998fbea" meta-htc,meta-nokia,meta-openmoko,meta-palm,meta,zaurus = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-sugarbay,meta-crownbay,meta-emenlow,meta-fishriver,meta-jasperforest,meta-n450, = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-ettus = "master:c34c30fa29f7ab484cc90efb9713325da8e01460" meta-openpandora = "master:edaf6e751f873ed7a82c1116d3d58b9a070052dc" meta-archos = "master:4b689944d968b0ef4d0e9928e76c54f8a76a919a"Thanks,
-- Dexuan
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
-Khem
Op 29 jun 2011, om 18:44 heeft Cui, Dexuan het volgende geschreven:
Quoted 11 lines
Quoted 10 lines · Koen Kooi
Op 29 jun 2011, om 18:14 heeft Cui, Dexuan het volgende geschreven:
Quoted 8 lines
Quoted 2 lines · Khem Raj
Quoted 1 line · Paul Eggleton
On Tuesday 28 June 2011 07:45:09 Koen Kooi wrote:
BTW: meta and mete-yocto belong to the same git repo actually, so do you think showing them in one line like this
meta,meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
is better than showing 2 lines like this:
meta = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"
meta-yocto = "master:2c2d9d7c0e942b6748bc8bd7d5980113bae9a836"That breaks with repos like meta-intel and meta-oe. Maybe something
Could you please explain a bit more?
That will become very wide with meta-intel and meta-oe and friends. I know my terminals are >200 chars wide, but not everyone is weird that way :) Just look at the line below:
Quoted 1 line
meta-sugarbay,meta-crownbay,meta-emenlow,meta-fishriver,meta-jasperforest,meta-n450, = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db"
Quoted 43 lines · Koen Kooi
Op 28 jun 2011, om 07:37 heeft Dexuan Cui het volgende geschreven:
Quoted 21 lines
Signed-off-by Dexuan Cui <[email protected]>---
meta/classes/base.bbclass | 14 +++++++++++++-1 files changed, 13 insertions(+), 1 deletions(-)meta/classes/base.bbclass +8
-0@@ -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", \meta/classes/base.bbclass python base_eventhandler() { · line 184
Quoted 10 lines
meta/classes/base.bbclass +5
-1+ 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 statusmsgI 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"
...
Quoted 33 lines
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
_BRANCHand_REVISIONwith ' 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"
Quoted 3 lines
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
Quoted 7 lines
regards,
Koen
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 41 lines · Mark Hatle
Quoted 31 lines · Koen Kooi
Op 28 jun 2011, om 07:37 heeft Dexuan Cui het volgende geschreven:
.......
So it works as expected, but the output is a bit confusing. I have a few (conflicting) suggestions:1) replace
_BRANCHand_REVISIONwith ' 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 =Quoted 8 lines
"
364ca0d2d0399c8cc6d3b3fc28308e1e14673544"
meta-angstrom_BRANCH = "master"
meta-angstrom_REVISION =
"c19c342c62416752117c2dce4696840bc864f647"etc.
What do you think about that?
Quoted 9 lines
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
Hi, thank you very much for the suggestions! I worked out a vesion 2 patch that combines 2 and 3:
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/banner_v2&id=2c2d9d7c0e942b6748bc8bd7d5980113bae9a836
Please note I use a colon mark rather than a slash mark for better readabability since a branch name can contain colon.
An output result in my side is:
OE Build Configuration:
BB_VERSION = "1.13.1" TARGET_ARCH = "i586" TARGET_OS = "linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "1.0+snapshot-20110628" TARGET_FPU = "" METADATA_BRANCH = "dcui/banner_v2" METADATA_REVISION = "2c2d9d7c0e942b6748bc8bd7d5980113bae9a836" meta-sugarbay = "dcui/test1:76d1178ba1a43cf6457c89717134aeb9f1275fae"
Please let me know if this new output looks ok.
BTW, Koen, even with this v2 patch, the list looks still pretty long in your side. I noticed there are some layers with the same revision: e.g.,
meta-htc_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-nokia_BRANCH = "master" meta-nokia_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-openmoko_BRANCH = "master" meta-openmoko_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-palm_BRANCH = "master" meta-palm_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-zaurus_BRANCH = "master" meta-zaurus_REVISION = "f37d05ca7450f85642cea0e43a75df10663bd8f6"
I guess they actually belong to the same repo.
In this case, maybe we can further improve the output format to:
meta-htc,nokia,openmoko,palm,zaurus:f37d05ca7450f85642cea0e43a75df10663bd8f6 ?
Thanks,
-- Dexuan
Op 28 jun 2011, om 16:52 heeft Cui, Dexuan het volgende geschreven:
Quoted 49 lines
Quoted 48 lines · Mark Hatle
Quoted 31 lines · Koen Kooi
Op 28 jun 2011, om 07:37 heeft Dexuan Cui het volgende geschreven:
.......
So it works as expected, but the output is a bit confusing. I have a few (conflicting) suggestions:1) replace
_BRANCHand_REVISIONwith ' 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 =Quoted 8 lines
"
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.
Quoted 6 lines
Quoted 2 lines
--Mark
Hi, thank you very much for the suggestions! I worked out a vesion 2 patch that combines 2 and 3:
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/banner_v2&id=2c2d9d7c0e942b6748bc8bd7d5980113bae9a836
Could you in the future please base them on oe-core instead of poky? I just did 'git merge 2c2d9d7c0e942b6748bc8bd7d5980113bae9a836' and git blew up.
Quoted 9 lines · Koen Kooi
Op 28 jun 2011, om 16:52 heeft Cui, Dexuan het volgende geschreven:
Quoted 3 lines
Hi, thank you very much for the suggestions! I worked out a vesion 2 patch that combines 2 and 3:
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/banner_v2&id=2c2d9d7c0e942b6748bc8bd7d5980113bae9a836Could you in the future please base them on oe-core instead of poky? I just did 'git merge
2c2d9d7c0e942b6748bc8bd7d5980113bae9a836' and git blew up.
Sorry... but to basing them on oe-core, do I need the permission to push my commits to my own branch in git://git.openembedded.org/openembedded-core-contrib? I suppose so and I should put my public key somewhere into the server?
Thanks,
-- Dexuan
Quoted 1 line · Dexuan
Sorry... but to basing them on oe-core, do I need the permission to push my commits to my own branch in
git://git.openembedded.org/openembedded-core-contrib? I suppose so and I should put my public key somewhere into the server?
You don't need to do that. You can just make a repo on github or gitorious (or your own server, or even one of the yocto hosts) and clone oe-core into it.
p.
Quoted 11 lines · Dexuan
Quoted 9 lines · Koen Kooi
Op 28 jun 2011, om 16:52 heeft Cui, Dexuan het volgende geschreven:
Quoted 3 lines
Hi, thank you very much for the suggestions! I worked out a vesion 2 patch that combines 2 and 3:
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/banner_v2&id=2c2d9d7c0e942b6748bc8bd7d5980113bae9a836Could you in the future please base them on oe-core instead of poky? I just did 'git merge
2c2d9d7c0e942b6748bc8bd7d5980113bae9a836' and git blew up.Sorry... but to basing them on oe-core, do I need the permission to push my commits to my own branch in
git://git.openembedded.org/openembedded-core-contrib? I suppose so and I should put my public key somewhere into the server?
You can push oe-core (based) changes to the poky-contrib tree. Many of us do this regularly.
I base my changes usually on oe-core, unless they contain poky specific code.. I push both types to the same poky-contrib repository (in different branches of course).
(I also always avoid "merge", and always use cherry-pick when pulling code from someone else's branches into my own..)
--Mark
Quoted 6 lines
Thanks,
-- Dexuan
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 19 lines · Mark Hatle
Quoted 7 lines · Dexuan
Quoted 6 lines · Koen Kooi
Op 28 jun 2011, om 16:52 heeft Cui, Dexuan het volgende geschreven:
Quoted 3 lines
Hi, thank you very much for the suggestions! I worked out a vesion 2 patch that combines 2 and 3:
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/banner_v2&id=2c2d9d7c0e942b6748bc8bd7d5980113bae9a836Quoted 7 lines
Quoted 3 lines
Could you in the future please base them on oe-core instead of poky? I just did 'git merge
2c2d9d7c0e942b6748bc8bd7d5980113bae9a836' and git blew up.Sorry... but to basing them on oe-core, do I need the permission to push my commits to my own branch in
git://git.openembedded.org/openembedded-core-contrib? I suppose so and I should put my public key somewhere into the server?You can push oe-core (based) changes to the poky-contrib tree. Many of us do this regularly.
Quoted 6 lines
I base my changes usually on oe-core, unless they contain poky specific code.. I push both types to the same poky-contrib repository (in different branches of course).
(I also always avoid "merge", and always use cherry-pick when pulling code from someone else's branches into my own..)
Thank Mark and Phil a lot for the explanation! I'll base my change to oe-core in future.
Thanks,
-- Dexuan
Op 28 jun 2011, om 17:33 heeft Mark Hatle het volgende geschreven:
Quoted 16 lines · Dexuan
Quoted 11 lines
Quoted 9 lines · Koen Kooi
Op 28 jun 2011, om 16:52 heeft Cui, Dexuan het volgende geschreven:
Quoted 3 lines
Hi, thank you very much for the suggestions! I worked out a vesion 2 patch that combines 2 and 3:
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/banner_v2&id=2c2d9d7c0e942b6748bc8bd7d5980113bae9a836Could you in the future please base them on oe-core instead of poky? I just did 'git merge
2c2d9d7c0e942b6748bc8bd7d5980113bae9a836' and git blew up.Sorry... but to basing them on oe-core, do I need the permission to push my commits to my own branch in
git://git.openembedded.org/openembedded-core-contrib? I suppose so and I should put my public key somewhere into the server?You can push oe-core (based) changes to the poky-contrib tree. Many of us do this regularly.
Quoted 6 lines
I base my changes usually on oe-core, unless they contain poky specific code.. I push both types to the same poky-contrib repository (in different branches of course).
(I also always avoid "merge", and always use cherry-pick when pulling code from someone else's branches into my own..)
I tend to do that as well, but I was paying attention to the yocto phone call instead of the console :)
Op 28 jun 2011, om 16:27 heeft Mark Hatle het volgende geschreven:
Quoted 80 lines · Koen Kooi
Quoted 43 lines
Op 28 jun 2011, om 07:37 heeft Dexuan Cui het volgende geschreven:
Quoted 21 lines
Signed-off-by Dexuan Cui <[email protected]>---
meta/classes/base.bbclass | 14 +++++++++++++-1 files changed, 13 insertions(+), 1 deletions(-)meta/classes/base.bbclass +8
-0@@ -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", \meta/classes/base.bbclass python base_eventhandler() { · line 184
Quoted 10 lines
meta/classes/base.bbclass +5
-1+ 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 statusmsgI 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"...
Quoted 35 lines
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
_BRANCHand_REVISIONwith ' 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.
Quoted 8 lines
Quoted 1 line
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.
The current patch outputs the following:
OE Build Configuration:
BB_VERSION = "1.13.2" TARGET_ARCH = "arm" TARGET_OS = "linux-gnueabi" MACHINE = "beagleboard" DISTRO = "angstrom" DISTRO_VERSION = "v2011.06-core" TARGET_FPU = "hard" METADATA_BRANCH = "master" METADATA_REVISION = "f1c2bfb82e0d11955cb8dc6b2f7aca9e291e1269" meta-angstrom = "master:a3bb1d65ae008b32a20701f479dea59e8268f806" meta-oe = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669" meta-efl = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669" meta-gpe = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669" meta-gnome = "master:8a12ecca32766ecdceb72cae76e93f8aadcf3669" meta-texasinstruments = "master:2e16e2fbd93bc00bc0a0afaf86975da7778eaa43" meta-efikamx = "master:70cff8742d629fd32463e3ef1bddb83f04d08dc5" meta-nslu2 = "master:aaf918b85d7a8155d6e7c0ff042808346998fbea" meta-htc = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-nokia = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-openmoko = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-palm = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-zaurus = "master:f37d05ca7450f85642cea0e43a75df10663bd8f6" meta-sugarbay = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-crownbay = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-emenlow = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-fishriver = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-jasperforest = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-n450 = "master:50661bf038a34702f3aa139c3ea0d67fbb0ce5db" meta-ettus = "master:c34c30fa29f7ab484cc90efb9713325da8e01460" meta-openpandora = "master:edaf6e751f873ed7a82c1116d3d58b9a070052dc" meta-archos = "master:413933fb5f62574e38a9a1e38905ba6e9c1be4ad"
Still a mouthfull, but easy to digest IMO