* Problem with METADATA_* vars
@ 2011-02-18 9:34 Koen Kooi
2011-02-18 10:01 ` Stefan Schmidt
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Koen Kooi @ 2011-02-18 9:34 UTC (permalink / raw)
To: poky
[-- Attachment #1: Type: text/plain, Size: 4415 bytes --]
Hi,
I have a simple recipe that does:
export METADATA_REVISION
export METADATA_BRANCH
export TARGET_SYS
do_install() {
install -d ${D}${sysconfdir}
echo "Angstrom ${DISTRO_VERSION}" > ${D}${sysconfdir}/angstrom-version
echo "Built from branch: ${METADATA_BRANCH}" >>
${D}${sysconfdir}/angstrom-version
echo "Revision: ${METADATA_REVISION}" >>
${D}${sysconfdir}/angstrom-version
echo "Target system: ${TARGET_SYS}" >>
${D}${sysconfdir}/angstrom-version
[..]
}
It builds fine when doing 'bitbake angstrom-version', but when doing
'bitbake console-image', which includes angstrom-version I get:
tr: write error: Broken pipe
ERROR: Error evaluating '${@base_detect_branch(d)}'
Traceback (most recent call last):
File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117, in
expandWithRefs
s = __expand_python_regexp__.sub(varparse.python_sub, s)
File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76, in
python_sub
value = utils.better_eval(codeobj, DataContext(self.d))
File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in
better_eval
return eval(source, _context, locals)
File "METADATA_BRANCH", line 1, in <module>
File "metadata_scm.bbclass", line 7, in base_detect_branch
File "metadata_scm.bbclass", line 2, in base_get_metadata_git_branch
IOError: [Errno 4] Interrupted system call
NOTE: Error expanding variable METADATA_BRANCH
Traceback (most recent call last):
File "/OE/tentacle/sources/bitbake/lib/bb/server/none.py", line 128, in
idle_commands
retval = function(self, data, False)
File "/OE/tentacle/sources/bitbake/lib/bb/cooker.py", line 700, in
buildTargetsIdle
retval = rq.execute_runqueue()
File "/OE/tentacle/sources/bitbake/lib/bb/runqueue.py", line 952, in
execute_runqueue
retval = self.rqexe.execute()
File "/OE/tentacle/sources/bitbake/lib/bb/runqueue.py", line 1304, in
execute
pid, pipein, pipeout = self.fork_off_task(fn, task, taskname)
File "/OE/tentacle/sources/bitbake/lib/bb/runqueue.py", line 1063, in
fork_off_task
the_data = bb.cache.Cache.loadDataFull(fn,
self.cooker.get_file_appends(fn), self.cooker.configuration.data)
File "/OE/tentacle/sources/bitbake/lib/bb/cache.py", line 285, in
loadDataFull
bb_data = cls.load_bbfile(fn, appends, cfgData)
File "/OE/tentacle/sources/bitbake/lib/bb/cache.py", line 515, in
load_bbfile
bb_data = parse.handle(bbfile, bb_data)
File "/OE/tentacle/sources/bitbake/lib/bb/parse/__init__.py", line 80, in
handle
return h['handle'](fn, data, include)
File "/OE/tentacle/sources/bitbake/lib/bb/parse/parse_py/BBHandler.py",
line 159, in handle
return ast.multi_finalize(fn, d)
File "/OE/tentacle/sources/bitbake/lib/bb/parse/ast.py", line 383, in
multi_finalize
finalize(fn, d)
File "/OE/tentacle/sources/bitbake/lib/bb/parse/ast.py", line 335, in
finalize
bb.parse.siggen.finalise(fn, d, variant)
File "/OE/tentacle/sources/bitbake/lib/bb/siggen.py", line 118, in
finalise
taskdeps = self._build_data(fn, d)
File "/OE/tentacle/sources/bitbake/lib/bb/siggen.py", line 70, in
_build_data
tasklist, gendeps = bb.data.generate_dependencies(d)
File "/OE/tentacle/sources/bitbake/lib/bb/data.py", line 328, in
generate_dependencies
deps[dep] = build_dependencies(dep, keys, shelldeps, d)
File "/OE/tentacle/sources/bitbake/lib/bb/data.py", line 298, in
build_dependencies
parser = d.expandWithRefs(d.getVar(key, False), key)
File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117, in
expandWithRefs
s = __expand_python_regexp__.sub(varparse.python_sub, s)
File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76, in
python_sub
value = utils.better_eval(codeobj, DataContext(self.d))
File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in
better_eval
return eval(source, _context, locals)
File "METADATA_BRANCH", line 1, in <module>
File "metadata_scm.bbclass", line 7, in base_detect_branch
File "metadata_scm.bbclass", line 2, in base_get_metadata_git_branch
IOError: [Errno 4] Interrupted system call
This started happening after
http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/meta-angstrom/commit/?id=d14b9341ccae0bbd01700d1ef54a1c0a0fb98628but
I'm not sure if that's the cause.
regards,
Koen
[-- Attachment #2: Type: text/html, Size: 5217 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Problem with METADATA_* vars
2011-02-18 9:34 Problem with METADATA_* vars Koen Kooi
@ 2011-02-18 10:01 ` Stefan Schmidt
2011-02-18 11:11 ` Koen Kooi
2011-02-18 11:10 ` Richard Purdie
2011-02-22 22:06 ` Chris Larson
2 siblings, 1 reply; 6+ messages in thread
From: Stefan Schmidt @ 2011-02-18 10:01 UTC (permalink / raw)
To: poky
Hello.
On Fri, 2011-02-18 at 10:34, Koen Kooi wrote:
>
> I have a simple recipe that does:
>
> export METADATA_REVISION
> export METADATA_BRANCH
> export TARGET_SYS
>
> do_install() {
> install -d ${D}${sysconfdir}
> echo "Angstrom ${DISTRO_VERSION}" > ${D}${sysconfdir}/angstrom-version
> echo "Built from branch: ${METADATA_BRANCH}" >>
> ${D}${sysconfdir}/angstrom-version
> echo "Revision: ${METADATA_REVISION}" >>
> ${D}${sysconfdir}/angstrom-version
> echo "Target system: ${TARGET_SYS}" >>
> ${D}${sysconfdir}/angstrom-version
>
> [..]
> }
>
> It builds fine when doing 'bitbake angstrom-version', but when doing
> 'bitbake console-image', which includes angstrom-version I get:
>
> tr: write error: Broken pipe
> ERROR: Error evaluating '${@base_detect_branch(d)}'
Hmm, I somehow remeber something like this also in OE. Can you give it a try
with removing the explicit export in the recipe? Its a bit of guessing as I
don't have all the details in mind anymore. :)
regards
Stefan Schmidt
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Problem with METADATA_* vars
2011-02-18 10:01 ` Stefan Schmidt
@ 2011-02-18 11:11 ` Koen Kooi
0 siblings, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2011-02-18 11:11 UTC (permalink / raw)
To: Stefan Schmidt; +Cc: poky@yoctoproject.org
that gives me mixed results, let me test a bit more
Op 18 feb. 2011 om 10:01 heeft Stefan Schmidt <stefan@datenfreihafen.org> het volgende geschreven:
> Hello.
>
> On Fri, 2011-02-18 at 10:34, Koen Kooi wrote:
>>
>> I have a simple recipe that does:
>>
>> export METADATA_REVISION
>> export METADATA_BRANCH
>> export TARGET_SYS
>>
>> do_install() {
>> install -d ${D}${sysconfdir}
>> echo "Angstrom ${DISTRO_VERSION}" > ${D}${sysconfdir}/angstrom-version
>> echo "Built from branch: ${METADATA_BRANCH}" >>
>> ${D}${sysconfdir}/angstrom-version
>> echo "Revision: ${METADATA_REVISION}" >>
>> ${D}${sysconfdir}/angstrom-version
>> echo "Target system: ${TARGET_SYS}" >>
>> ${D}${sysconfdir}/angstrom-version
>>
>> [..]
>> }
>>
>> It builds fine when doing 'bitbake angstrom-version', but when doing
>> 'bitbake console-image', which includes angstrom-version I get:
>>
>> tr: write error: Broken pipe
>> ERROR: Error evaluating '${@base_detect_branch(d)}'
>
> Hmm, I somehow remeber something like this also in OE. Can you give it a try
> with removing the explicit export in the recipe? Its a bit of guessing as I
> don't have all the details in mind anymore. :)
>
> regards
> Stefan Schmidt
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with METADATA_* vars
2011-02-18 9:34 Problem with METADATA_* vars Koen Kooi
2011-02-18 10:01 ` Stefan Schmidt
@ 2011-02-18 11:10 ` Richard Purdie
2011-02-18 12:10 ` Richard Purdie
2011-02-22 22:06 ` Chris Larson
2 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2011-02-18 11:10 UTC (permalink / raw)
To: Koen Kooi; +Cc: poky
On Fri, 2011-02-18 at 10:34 +0100, Koen Kooi wrote:
> Hi,
>
> I have a simple recipe that does:
>
> export METADATA_REVISION
> export METADATA_BRANCH
> export TARGET_SYS
>
> do_install() {
> install -d ${D}${sysconfdir}
> echo "Angstrom ${DISTRO_VERSION}" >
> ${D}${sysconfdir}/angstrom-version
> echo "Built from branch: ${METADATA_BRANCH}" >>
> ${D}${sysconfdir}/angstrom-version
> echo "Revision: ${METADATA_REVISION}" >>
> ${D}${sysconfdir}/angstrom-version
> echo "Target system: ${TARGET_SYS}" >>
> ${D}${sysconfdir}/angstrom-version
>
> [..]
> }
>
> It builds fine when doing 'bitbake angstrom-version', but when doing
> 'bitbake console-image', which includes angstrom-version I get:
>
> tr: write error: Broken pipe
> ERROR: Error evaluating '${@base_detect_branch(d)}'
> Traceback (most recent call last):
> File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117,
> in expandWithRefs
> s = __expand_python_regexp__.sub(varparse.python_sub, s)
> File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76,
> in python_sub
> value = utils.better_eval(codeobj, DataContext(self.d))
> File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in
> better_eval
> return eval(source, _context, locals)
> File "METADATA_BRANCH", line 1, in <module>
> File "metadata_scm.bbclass", line 7, in base_detect_branch
> File "metadata_scm.bbclass", line 2, in base_get_metadata_git_branch
> IOError: [Errno 4] Interrupted system call
I'm going to guess its:
http://git.pokylinux.org/cgit.cgi/poky/commit/?id=03d40a4a7bd60dcbc21f5a06c0f4f53cb47de0f3
at fault. I'm going to rework that so the handler is only activated at
idle sleep time.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Problem with METADATA_* vars
2011-02-18 11:10 ` Richard Purdie
@ 2011-02-18 12:10 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-02-18 12:10 UTC (permalink / raw)
To: Koen Kooi; +Cc: poky
On Fri, 2011-02-18 at 11:10 +0000, Richard Purdie wrote:
> On Fri, 2011-02-18 at 10:34 +0100, Koen Kooi wrote:
> > It builds fine when doing 'bitbake angstrom-version', but when doing
> > 'bitbake console-image', which includes angstrom-version I get:
> >
> > tr: write error: Broken pipe
> > ERROR: Error evaluating '${@base_detect_branch(d)}'
> > Traceback (most recent call last):
> > File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 117,
> > in expandWithRefs
> > s = __expand_python_regexp__.sub(varparse.python_sub, s)
> > File "/OE/tentacle/sources/bitbake/lib/bb/data_smart.py", line 76,
> > in python_sub
> > value = utils.better_eval(codeobj, DataContext(self.d))
> > File "/OE/tentacle/sources/bitbake/lib/bb/utils.py", line 387, in
> > better_eval
> > return eval(source, _context, locals)
> > File "METADATA_BRANCH", line 1, in <module>
> > File "metadata_scm.bbclass", line 7, in base_detect_branch
> > File "metadata_scm.bbclass", line 2, in base_get_metadata_git_branch
> > IOError: [Errno 4] Interrupted system call
>
> I'm going to guess its:
>
> http://git.pokylinux.org/cgit.cgi/poky/commit/?id=03d40a4a7bd60dcbc21f5a06c0f4f53cb47de0f3
>
> at fault. I'm going to rework that so the handler is only activated at
> idle sleep time.
http://git.pokylinux.org/cgit.cgi/poky/commit/?id=359a4d8bf72867b4d5f3daaf8c4f14a82a810107
should fix this...
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with METADATA_* vars
2011-02-18 9:34 Problem with METADATA_* vars Koen Kooi
2011-02-18 10:01 ` Stefan Schmidt
2011-02-18 11:10 ` Richard Purdie
@ 2011-02-22 22:06 ` Chris Larson
2 siblings, 0 replies; 6+ messages in thread
From: Chris Larson @ 2011-02-22 22:06 UTC (permalink / raw)
To: Koen Kooi; +Cc: poky
On Fri, Feb 18, 2011 at 2:34 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> I have a simple recipe that does:
>
> export METADATA_REVISION
> export METADATA_BRANCH
> export TARGET_SYS
>
> do_install() {
> install -d ${D}${sysconfdir}
> echo "Angstrom ${DISTRO_VERSION}" > ${D}${sysconfdir}/angstrom-version
> echo "Built from branch: ${METADATA_BRANCH}" >>
> ${D}${sysconfdir}/angstrom-version
> echo "Revision: ${METADATA_REVISION}" >>
> ${D}${sysconfdir}/angstrom-version
> echo "Target system: ${TARGET_SYS}" >>
> ${D}${sysconfdir}/angstrom-version
>
> [..]
> }
I realize this isn't a fix for the problem you're reporting, but your
exports are completely unnecessary here. Your uses of ${} inside a
shell function are expanded by bitbake, not the shell.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-02-22 22:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18 9:34 Problem with METADATA_* vars Koen Kooi
2011-02-18 10:01 ` Stefan Schmidt
2011-02-18 11:11 ` Koen Kooi
2011-02-18 11:10 ` Richard Purdie
2011-02-18 12:10 ` Richard Purdie
2011-02-22 22:06 ` Chris Larson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.