[bitbake-devel] BitBake dies when "stampfile" variable is "None"
Patrick Turley
PatrickTurley at gamestop.com
Tue Oct 9 15:20:53 UTC 2012
I've had a problem with the 1.15.2 version of BitBake and I'd like to see if a BitBake expert can short-circuit my investigation.
I am trying to create a "Hello, World!" BitBake project. That is, I want to create the smallest possible BitBake project with one layer and one recipe that does nothing except print "Hello, World!"
Because the project is *intended* to be small, the entire file tree fits very comfortably at the end of this message. Here's what works fine:
$ ../BitBake/bin/bitbake-layers show-layers
Parsing recipes..done.
layer path priority
==========================================================
LayerA /home/pturley/Workspace/Hello/LayerA 1
$ ../BitBake/bin/bitbake-layers show-recipes
Parsing recipes..done.
=== Available recipes: ===
a:
LayerA 1
When I tried this:
../BitBake/bin/bitbake -c listtasks a
I got a Python stack trace that ended here:
File "../BitBake/lib/bb/runqueue.py", line 902, in RunQueue.check_stamp_task(task=0, taskname='do_listtasks', recurse=False):
# If the stamp is missing its not current
> if not os.access(stampfile, os.F_OK):
logger.debug(2, "Stampfile %s not available", stampfile)
TypeError: coercing to Unicode: need string or buffer, NoneType found
I've done a bit of debugging, and I've discovered that this code doesn't expect the "stampfile" variable to be "None" (which it is). I made a very simple fix to get past the problem:
if not stampfile or not os.access(stampfile, os.F_OK):
I'd prefer to use BitBake "as-is," so I'd like to get to the root cause of the problem.
I *can* dig into the code and eventually find my way back to whatever is causing BitBake to trip over this condition. What would be *really* great, though, is if an expert just glanced at this message and said something like "Oh yeh - you just need to create directory 'X' and BitBake won't trip over this anymore."
------------------------------------------------------------
├── build
│ │
│ ├── classes
│ │ │
│ │ └── base.bbclass
│ │
│ │ +-----------------------------------------------
│ │ | addtask listtasks
│ │ |
│ │ | do_listtasks[nostamp] = "1"
│ │ |
│ │ | python do_listtasks() {
│ │ | import sys
│ │ | # emit variables and shell functions
│ │ | #bb.data.emit_env(sys.__stdout__, d)
│ │ | # emit the metadata which isnt valid shell
│ │ | for e in d.keys():
│ │ | if d.getVarFlag(e, 'task'):
│ │ | bb.plain("%s" % e)
│ │ | }
│ │ |
│ │ | addtask build
│ │ |
│ │ | do_build() {
│ │ | echo "Hello"
│ │ | }
│ │ +-----------------------------------------------
│ │
│ └── conf
│ │
│ ├── bblayers.conf
│ │
│ │ +-----------------------------------------------
│ │ | BBLAYERS ?= " \
│ │ | /home/pturley/Workspace/Hello/LayerA \
│ │ | "
│ │ +-----------------------------------------------
│ │
│ └── bitbake.conf
│
│ +-----------------------------------------------
│ | CACHE = "${TOPDIR}/cache"
│ +-----------------------------------------------
│
├── LayerA
│ │
│ ├── a.bb
│ │
│ │ +-----------------------------------------------
│ │ | DESCRIPTION = "Layer A Main Recipe"
│ │ | PN = 'a'
│ │ | PV = '1'
│ │ +-----------------------------------------------
│ │
│ └── conf
│ │
│ └── layer.conf
│
│ +-----------------------------------------------
│ | BBPATH .= ":${LAYERDIR}"
│ |
│ | BBFILES += "${LAYERDIR}/*.bb"
│ |
│ | BBFILE_COLLECTIONS += "A"
│ | BBFILE_PATTERN_A := "^${LAYERDIR}/"
│ +-----------------------------------------------
│
└── BitBake
The BitBake directory origin is:
http://git.openembedded.org/bitbake/
I have the 1.15.2 tag checked out, which is what
Yocto denzil uses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20121009/5d7a4a77/attachment-0001.html>
More information about the bitbake-devel
mailing list