All of lore.kernel.org
 help / color / mirror / Atom feed
* BitBake dies when "stampfile" variable is "None"
@ 2012-10-09 15:20 Patrick Turley
  2012-10-09 15:38 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Turley @ 2012-10-09 15:20 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 4691 bytes --]

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.


[-- Attachment #2: Type: text/html, Size: 14224 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: BitBake dies when "stampfile" variable is "None"
  2012-10-09 15:20 BitBake dies when "stampfile" variable is "None" Patrick Turley
@ 2012-10-09 15:38 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-10-09 15:38 UTC (permalink / raw)
  To: Patrick Turley; +Cc: bitbake-devel

On Tue, 2012-10-09 at 15:20 +0000, Patrick Turley wrote:
> 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.

Try setting the STAMP variable...

Cheers,

Richard





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-09 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-09 15:20 BitBake dies when "stampfile" variable is "None" Patrick Turley
2012-10-09 15:38 ` Richard Purdie

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.