bitbake.git
8 years agobitbake docs: use dblatex to build the pdf bitbake manual
Darren Hart [Wed, 9 Mar 2011 20:55:20 +0000 (12:55 -0800)]
bitbake docs: use dblatex to build the pdf bitbake manual

Fix [BUGID #593]

The current manual build fails for printing formats which use latex as an
intermediate format. This bug has been reported in multiple locations and I
haven't found a solution posted to any of them.

Using --with-dblatex uses dblatex to make the conversion and successfully
generates the pdf. It adds a dependency on dblatex and its dependencies.

(From Poky rev: b26640f30a4c80fcedda0d19bcf96ed412062a33)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocorrect typo in ??= documentation
Darren Hart [Wed, 13 Apr 2011 00:11:52 +0000 (17:11 -0700)]
correct typo in ??= documentation

??= is a lazy version of ?=

(From Poky rev: 2ee0be82d065aeee716a9c0289bf111ea121e6dc)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogit fetcher: make tag back to work, fix Yocto bug 972
Yu Ke [Mon, 18 Apr 2011 05:53:53 +0000 (13:53 +0800)]
git fetcher: make tag back to work, fix Yocto bug 972

In current git fetcher, tag does not work due to commit http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=5920e85c561624e657c126df58f5c378a8950bbc. Tag is not in sha256 form, so it will be treated invalid, and silently replaced by latest revision.

To fix it, this patch treat tag name as branches name, thus it will be handled correctly later. Thanks Richard for reviewing and proposing the better approach.

Fix [YOCTO #972]

CC: Richard Purdie <richard.purdie@linuxfoundation.org>
(From Poky rev: a2030c8d1a58c79428cba80158982aea4d2d9f6d)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/codeparser: Correctly handle a missing/empty cache file
Richard Purdie [Thu, 5 May 2011 18:27:46 +0000 (19:27 +0100)]
bitbake/codeparser: Correctly handle a missing/empty cache file

(From Poky rev: 72875493b8bbb5d6793380ee71c6bca4f438ca04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cache.py: Ensure skipped recipes make it into the cache to avoid reparsing
Richard Purdie [Sun, 10 Apr 2011 17:55:48 +0000 (10:55 -0700)]
bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid reparsing

(From Poky rev: 001a555c2f755d4f8a69b113656d9307ca7ee597)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker/codeparser: Ensure the code parser cache is saved for each parsing...
Richard Purdie [Sun, 10 Apr 2011 17:52:29 +0000 (10:52 -0700)]
bitbake/cooker/codeparser: Ensure the code parser cache is saved for each parsing process

Before this change, the codeparser cache was only being saved for the main
server process. This is suboptimal as it leaves code being re-evaluated at
task execution time and increases parse time.

We use the multiprocess Finalize() functionality to ensure each process
saves out its cache. We need to update the cache save function to be multiprocess
friendly with locking.

(From Poky rev: c8928e93dd8a08d6768623f6491c9ba31d0aa06f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/ast.py: Only run finalise() for the specified variant
Richard Purdie [Sun, 10 Apr 2011 17:50:16 +0000 (10:50 -0700)]
bitbake/ast.py: Only run finalise() for the specified variant

Allows the heavy finalise function to only be run for the case we're
interested in when running tasks, saving some processing time.

(From Poky rev: 9211fd9c375489c73924fd43f1f8a0da2c4290bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomanual: fix typo
Bernhard Reutner-Fischer [Mon, 2 May 2011 09:45:56 +0000 (11:45 +0200)]
manual: fix typo

"is used signify" -> "is used to signify"

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
8 years agobuild: run fakeroot if FAKEROOT is set
Chris Larson [Fri, 8 Apr 2011 14:10:40 +0000 (07:10 -0700)]
build: run fakeroot if FAKEROOT is set

FAKEROOT contains the fakeroot command to be run.  This should not be set for
those using pseudo + FAKEROOTENV, but should be set for people like upstream
OE, and its value should be 'fakeroot' for them, for compatibility with the
old mechanisms.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agofetch.git: fix a remnant wrt persist + keyerror
Christopher Larson [Thu, 7 Apr 2011 03:34:53 +0000 (20:34 -0700)]
fetch.git: fix a remnant wrt persist + keyerror

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agopersist_data: implement comparison, same as dict
Chris Larson [Mon, 4 Apr 2011 16:36:45 +0000 (09:36 -0700)]
persist_data: implement comparison, same as dict

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agopersist_data: make SQLTable a context manager
Chris Larson [Thu, 10 Feb 2011 00:57:03 +0000 (17:57 -0700)]
persist_data: make SQLTable a context manager

This can be used for more control over the underlying transactions.  Unlike
the context manager of, say, a file object, we can still use the object even
after the end of a given with block, as the context manager exit only ensures
we've committed to the database, not that we have closed the database.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agopersist_data: don't allow non-string keys/values
Chris Larson [Mon, 4 Apr 2011 16:37:07 +0000 (09:37 -0700)]
persist_data: don't allow non-string keys/values

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agopersist_data: add has_key
Chris Larson [Mon, 4 Apr 2011 16:36:22 +0000 (09:36 -0700)]
persist_data: add has_key

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agopersist_data: raise KeyError on missing elements
Chris Larson [Mon, 4 Apr 2011 16:36:10 +0000 (09:36 -0700)]
persist_data: raise KeyError on missing elements

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agosetup.py: install fetch2 module
Martin Jansa [Thu, 3 Mar 2011 18:07:41 +0000 (18:07 +0000)]
setup.py: install fetch2 module

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agosetup.py: also install bitbake-{layers,diffsigs} scripts
Martin Jansa [Thu, 3 Mar 2011 22:52:48 +0000 (22:52 +0000)]
setup.py: also install bitbake-{layers,diffsigs} scripts

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: fix -b with BBCLASSEXTEND
Chris Larson [Mon, 4 Apr 2011 21:37:59 +0000 (14:37 -0700)]
cooker: fix -b with BBCLASSEXTEND

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoevent: improve output for syntax errors in handlers
Chris Larson [Mon, 4 Apr 2011 20:51:51 +0000 (13:51 -0700)]
event: improve output for syntax errors in handlers

Note: this includes IndentationError, which is a subclass of SyntaxError.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoevent: improve output when eventhandler exec fails
Chris Larson [Mon, 4 Apr 2011 18:31:39 +0000 (11:31 -0700)]
event: improve output when eventhandler exec fails

- Name the event handler by its actual name, so the traceback shows it rather
  than 'tmpHandler'.
- Rather than immediately aborting when encountering an event handler error,
  display an error message and try to continue.
- Show a traceback for ordinary exceptions, skipping the first entry in the
  traceback, so it only shows the useful information.
- Show an error, but no traceback, for SystemExit with a code other than 0.
- For for SystemExit with a code of 0, simply continue silently.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoevent: register event handler functions, not code objects
Chris Larson [Mon, 4 Apr 2011 16:41:41 +0000 (09:41 -0700)]
event: register event handler functions, not code objects

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobuild.py: Merge fakeroot changes from Poky
Mark Hatle [Fri, 1 Apr 2011 21:30:11 +0000 (16:30 -0500)]
build.py: Merge fakeroot changes from Poky

Changes imported from poky repository, master branch as of commit:
bcc817ee058bbab91d6e88a3e1e867a4ff09aeca

In Poky fakeroot processing is handled exclusively by FAKEROOTENV.  The
fakeroot binary itself is never invoked directly.  (This is due to Poky
using pseudo, a fakeroot replacement that is more efficiently run by
setting environment variables.)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobuild: don't choke if olddir no longer exists
Chris Larson [Fri, 25 Mar 2011 16:11:34 +0000 (09:11 -0700)]
build: don't choke if olddir no longer exists

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobuild: fix dir removal traceback
Chris Larson [Fri, 25 Mar 2011 15:58:52 +0000 (08:58 -0700)]
build: fix dir removal traceback

This one is to cover the case where the current directory vanishes out from
under us, so os.getcwd() raises an OSError.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobuild: in exec_func, mkdirhier ${T}
Chris Larson [Fri, 25 Mar 2011 14:55:26 +0000 (07:55 -0700)]
build: in exec_func, mkdirhier ${T}

This should fix the -c clean traceback people are seeing.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agorunqueue: simplify fakeroot environment handling
Chris Larson [Fri, 18 Mar 2011 16:42:33 +0000 (09:42 -0700)]
runqueue: simplify fakeroot environment handling

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobuild: add missing bit necessary for mhatle's fakeroot fix
Chris Larson [Fri, 18 Mar 2011 16:56:50 +0000 (09:56 -0700)]
build: add missing bit necessary for mhatle's fakeroot fix

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agorunqueue.py: Enable PSEUDO (fakeroot) before the fork
Mark Hatle [Thu, 17 Mar 2011 23:10:18 +0000 (19:10 -0400)]
runqueue.py: Enable PSEUDO (fakeroot) before the fork

PSEUDO when used as the fakeroot program is usually preloaded into memory,
but disabled by default.  The trigger for enabling it is a set of environment
variables and a fork() or exec*() operation.

We need to setup the environment, specifically PSEUDO_DISABLED=0, prior to
the fork() so that python tasks can be run under PSEUDO control.

This patch is based on the work in Poky primarily from Richard Purdie.

See the following Poky commits for detailed history on this change:

commit 1f3e313fd5cc5ae8ea838bf8fcdedace3cb72584
Author: Richard Purdie <rpurdie@linux.intel.com>
Date:   Wed Dec 8 00:08:04 2010 +0000

    bitbake Revert bitbake exec() and go back to fork() for performace wins (first draft)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
commit 52aada2eaf08d57d5f715f155f2d878831dbaab0
Author: Richard Purdie <rpurdie@linux.intel.com>
Date:   Tue Dec 21 00:51:24 2010 +0000

    bitbake/runqueue.py: Somehow the python environment mapping is failing so do it manually

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
commit 1b08a7eb8b708f4d0fc119cf89deb450fa62fea1
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Mon Feb 28 15:31:20 2011 +0000

    bitbake/cache/runqueue.py: Move workload for recipe parsing to the child process

    Parsing the recipe in the parent before forking off the child worker
    can mean the parent doesn't hit the idle loop and becomes a bottleneck
    when lauching many short lived processes.

    The reason we need this in the parent is to figure out the fakeroot
    environmental options. To address this, add the fakeroot variables
    to the cache and move recipe loadData into the child task.

    For a poky-image-sato build this results in about a 2 minute speedup
    (1.8%).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Integrated and merged into bitbake upstream

Signed-off-by: Mark Hatle <Mark.Hatle@windriver.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoInitial work on getting bitbake working under pypy
Chris Larson [Wed, 16 Mar 2011 15:07:29 +0000 (08:07 -0700)]
Initial work on getting bitbake working under pypy

- use os.chmod, not os.fchmod, as the latter is missing under pypy
- rearrange our imports a bit
- don't die if sqlite3 is missing shared cache support

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoMore 'is' fixups
Chris Larson [Wed, 16 Mar 2011 15:07:37 +0000 (08:07 -0700)]
More 'is' fixups

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoFix more incorrect usages of 'is'
Chris Larson [Tue, 8 Mar 2011 19:07:24 +0000 (12:07 -0700)]
Fix more incorrect usages of 'is'

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocodeparser: use ==, not 'is' to compare strings
Chris Larson [Tue, 8 Mar 2011 18:54:45 +0000 (11:54 -0700)]
codeparser: use ==, not 'is' to compare strings

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocodeparser: fix ShellSyntaxError usage
Chris Larson [Wed, 16 Mar 2011 14:38:18 +0000 (07:38 -0700)]
codeparser: fix ShellSyntaxError usage

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobb.siggen: import os
Chris Larson [Tue, 8 Mar 2011 23:29:22 +0000 (16:29 -0700)]
bb.siggen: import os

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoutils: fix typo in lockfile
Chris Larson [Tue, 8 Mar 2011 16:39:40 +0000 (09:39 -0700)]
utils: fix typo in lockfile

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agolockfile: ask for forgiveness, not permission
Chris Larson [Tue, 8 Mar 2011 16:33:40 +0000 (09:33 -0700)]
lockfile: ask for forgiveness, not permission

Create the lockfile directory if it doesn't exist, rather than erroring out if
it doesn't exist (was also racy).

Also improve the wording of the error message shown when the lockfile's
directory is not writable.

Note for the future, this function should be improved, particularly with
regard to its exception handling. It should be catching the *exact*
exception(s) it will encounter when the file is locked, and continuing in that
case only. If it did that, there'd be no need for the proactive directory
writability check, as bb.utils.lockfile() would raise an appropriate IOError
for that case.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agohob: adjust for master's eventHandler API
Chris Larson [Mon, 7 Mar 2011 23:01:21 +0000 (16:01 -0700)]
hob: adjust for master's eventHandler API

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agogoggle: exit quietly on ^C
Chris Larson [Mon, 7 Mar 2011 22:54:29 +0000 (15:54 -0700)]
goggle: exit quietly on ^C

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobitbake/cache: bump cache version after recent changes
Joshua Lock [Thu, 24 Feb 2011 16:02:13 +0000 (16:02 +0000)]
bitbake/cache: bump cache version after recent changes

(From Poky rev: 08c7a59b5a5d24cf8c03b9da8278d30c0c175f5e)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/progress: make progress dialog modal for parent window
Joshua Lock [Wed, 2 Feb 2011 20:14:41 +0000 (20:14 +0000)]
bitbake/progress: make progress dialog modal for parent window

(From Poky rev: f258cedfe8432d61eebd21a239381e9510be7109)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoAdd new UI hob, a prototype Gtk+ GUI for creating images
Joshua Lock [Wed, 2 Feb 2011 13:02:43 +0000 (13:02 +0000)]
Add new UI hob, a prototype Gtk+ GUI for creating images

Hob is a first stab at implementing an interactive GUI for BitBake.

(From Poky rev: 6dbceb0be9a1b8d7d5124b4fbd74f18609bc6146)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: don't drop possible_world ref count
Joshua Lock [Wed, 2 Feb 2011 12:48:10 +0000 (12:48 +0000)]
bitbake/cooker: don't drop possible_world ref count

We need this if we want to run the buildWorldTargetList function more than
once, for example in a UI where we can change the MACHINE and DISTRO as much
as we like before triggering a build.

(From Poky rev: c2814caa5d80d3a1097c83b82b7a3f8eeb8da548)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/progress: add method to pulse the progress bar
Joshua Lock [Tue, 1 Feb 2011 15:23:47 +0000 (15:23 +0000)]
bitbake/progress: add method to pulse the progress bar

When we're running a long operation with indeterminate duration it's useful
to use the gtk.ProgressBar's pulse method to show that something is happening
but we don't know how long it will take.

(From Poky rev: fb62c54e13e875dd81e0b5220c54a7753b4d5fa2)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/crumbs: update documentation header
Joshua Lock [Wed, 19 Jan 2011 17:20:46 +0000 (17:20 +0000)]
bitbake/crumbs: update documentation header

(From Poky rev: 7f8aa691c52547ee5f1272a7931ca9cccd1a120a)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/event: fix some whitespace issues
Joshua Lock [Thu, 13 Jan 2011 18:30:02 +0000 (18:30 +0000)]
bitbake/event: fix some whitespace issues

(From Poky rev: b14cda62d075d1213fc4769aa6b3622a491b57d5)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agointroduce crumbs.TaskListModel a gtk.ListStore subclass
Joshua Lock [Wed, 12 Jan 2011 12:24:04 +0000 (12:24 +0000)]
introduce crumbs.TaskListModel a gtk.ListStore subclass

Provide a gtk.ListStore subclass which includes a function,
populate(), which takes as input the data emitted by
bb.event.TargetsTreeGenerated and fills the ListStore model
appropriately.
Furthermore convenience functions are provided by which the caller can
get gtk.TreeModel subclasses which provide filtered views of the data.

(From Poky rev: 9b43eaff99615d8bd58b2f3a54c280e5470d3a9c)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/[cooker|cache]: cache summary, license and group. Add to targets tree
Joshua Lock [Fri, 7 Jan 2011 12:57:18 +0000 (12:57 +0000)]
bitbake/[cooker|cache]: cache summary, license and group. Add to targets tree

Add summary, license and group metadata to RecipeInfo and the cache.
Unfortunately this impacts parse speed but gives us a much richer set of
metadata to expose through UI's which can be accessed via the
generateTargetsTree command.

(From Poky rev: a13304e1c6500db95823961a5a34849db46037e3)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: reduce code duplication
Joshua Lock [Fri, 7 Jan 2011 12:00:09 +0000 (12:00 +0000)]
bitbake/cooker: reduce code duplication

Move runqueua and taskdata initialisation into a new function,
prepareTreeData(), so that generateDepTreeData() and
generateTargetsTreeData() are not duplicating the same logic.

(From Poky rev: 3c1a3b0724d5175e81ec81cce448d5b618d21958)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: add generateTargetsTree method
Joshua Lock [Fri, 7 Jan 2011 11:45:00 +0000 (11:45 +0000)]
bitbake/cooker: add generateTargetsTree method

The generateTargetsTree() command needs to return a model which includes more
metadata than the one generated by generateDepTree().

This patch adds a new method generateTargetsTreeData() to the cooker, based
on generateDepData(), and switches generateTargetsTree() to use it.

(From Poky rev: dcfc5ae7b1f5925587b0675e1cba6c60f098267c)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoimplement command to find configuration files for a config variable
Joshua Lock [Tue, 4 Jan 2011 20:28:20 +0000 (20:28 +0000)]
implement command to find configuration files for a config variable

Some configuration variables (MACHINE, MACHINE-SDK and DISTRO) set which
confguration files bitbake should use.
The added command , findConfigFiles, enables a UI to query which files are
suitable values for a specified parameter.

(From Poky rev: 3939a216a53f58831e640e85ed95f7edff3ca76f)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoimplement command to get all possible targets and their dependencies
Joshua Lock [Tue, 4 Jan 2011 20:08:51 +0000 (20:08 +0000)]
implement command to get all possible targets and their dependencies

Add a new command generateTargetsTree() which returns a dependency tree of
possible targets (tasks and recipes) as well as their dependency information.

Optional parameter 'klass' also ensures any recipes which inherit the
specified class path (i.e. 'classes/image.bbclass') are included in the model

(From Poky rev: 1b3eb0c35f504e8f652303a4b238034ecc5c5d02)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cache: store a list of inherited files in the cache
Joshua Lock [Tue, 4 Jan 2011 17:34:30 +0000 (17:34 +0000)]
bitbake/cache: store a list of inherited files in the cache

(From Poky rev: 920c402342bd490cd94b365c3e151de735dec0d6)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoserver: use local fixed _bootstrap when appropriate
Chris Larson [Sun, 27 Feb 2011 22:11:18 +0000 (15:11 -0700)]
server: use local fixed _bootstrap when appropriate

When running on python versions 2.6.0 through 2.6.2, we use a local copy
of the python 2.6.6 _bootstrap method of Process, to ensure that we have
the fix for http://bugs.python.org/issue5313. This avoids the "hang" of
the bitbake process at 0% progress during the parsing on older distros
like Fedora 12.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobitbake-layers: drop 2.6 from #!, per Joshua Lock
Chris Larson [Thu, 3 Mar 2011 14:15:47 +0000 (07:15 -0700)]
bitbake-layers: drop 2.6 from #!, per Joshua Lock

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agofetch, fetch2: Get rid of DeprecationWarning notice
Khem Raj [Wed, 2 Mar 2011 08:33:49 +0000 (08:33 +0000)]
fetch, fetch2: Get rid of DeprecationWarning notice

* This patch fixes a cosmetic issue currently we get with master

WARNING: /home/kraj/work/bitbake/lib/bb/fetch2/__init__.py:733:
DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead.  bb.mkdirhier("%s/%s" % (rootdir, destdir))

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobitbake/utils.py: Allow join_deps to return a list that isn't comman separated
Richard Purdie [Fri, 25 Feb 2011 16:31:40 +0000 (16:31 +0000)]
bitbake/utils.py: Allow join_deps to return a list that isn't comman separated

(From Poky rev: 2069a29a8256bc94e6c1137da78d7b129a8cd4e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild: add missing newline
Chris Larson [Sat, 26 Feb 2011 00:05:56 +0000 (17:05 -0700)]
build: add missing newline

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobuild: switch to old cwd handling
Chris Larson [Fri, 25 Feb 2011 22:36:15 +0000 (15:36 -0700)]
build: switch to old cwd handling

We want this to ensure the user can run the run. script from anywhere.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: use BBHandler.inherit for INHERIT
Chris Larson [Thu, 24 Feb 2011 20:16:43 +0000 (13:16 -0700)]
cooker: use BBHandler.inherit for INHERIT

Ideally we'd avoid direct BBHandler usage, but honestly, to say the whole
bb.parse abstraction is incredibly leaky is an understatement.  If we try to
make handle() not reparse classes, things get ugly fairly quickly, as
inherit() calls handle() itself after adding the class to the inherit cache.

This change fixes it so we no longer risk reparsing a class if:

- it's listed in INHERIT multiple times
- it's listed in INHERIT and is 'inherit'ed from a class in INHERIT

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: simplify self.configuration.data vs data usage
Chris Larson [Wed, 23 Feb 2011 17:17:53 +0000 (10:17 -0700)]
cooker: simplify self.configuration.data vs data usage

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobuild.py: Operate logfile handling at the task level
Richard Purdie [Thu, 24 Feb 2011 22:02:19 +0000 (22:02 +0000)]
build.py: Operate logfile handling at the task level

Previously, not all task output could end up in the logfile and
sub functions run using exec_func() calls would end up logging to
/dev/null. This is extrememly confusing for users who want to find
the output from a given task as there are several possible log files,
or it might not be there at all.

This patch changes exec_task() to redirect standard output/error
to the logfile along with any python logging output. This change is
applied for all python/shell tasks so it doesn't matter whether output
comes from os.system() calls or wherever, the logs are always correct.

This also removed the ton of log files previous code could generate
in ${T}, again making this simpler for users.

Based upon patches from Poky.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild.py: Improve exec_task standalone usage
Richard Purdie [Thu, 24 Feb 2011 21:53:59 +0000 (21:53 +0000)]
build.py: Improve exec_task standalone usage

This commit consolidates all the task execution code and exception
handling into one place, the exec_task funciton where it should be.

This function now returns an exit code value and handles all exceptions.

This ensures the task success/failure/invalid events are always sent.

TaskInvalid also becomes an event rather than being an exception.

Based upon changes in Poky.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/data_smart: Improve Variable expansion error handling
Richard Purdie [Wed, 23 Feb 2011 13:13:31 +0000 (13:13 +0000)]
bitbake/data_smart: Improve Variable expansion error handling

If expanding a variable triggers an exception the caller currently has no
way to supress the error message or otherwise handle the siutation. An
example of where this is a problem is "bitbake -e" showing tracebacks and
errors for variables like SRCPV in OE/Poky.

Secondly in a chained expansion fails, log mesages are recorded for
every step of the expansion, not just the innermost error which is
where the real failure occured.

To fix this we introduce a new exception ExpansionError which callers
can handle as appropriate.

(From Poky rev: 101b599110f7bc29f52a14a968f30323aeb797ca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/data_smart: Improve the way lazyassignment works
Richard Purdie [Wed, 23 Feb 2011 11:48:01 +0000 (11:48 +0000)]
bitbake/data_smart: Improve the way lazyassignment works

Currently, if a variable has been set with ??= and the code looks it up
before the data finalisation phase, no value is found. This is causes
serious problems for anonymous python functions which manipulate data, or
for the fetcher revision handling code where revisions can be set with
??=.

There is also a significant performance implication for processing lazy
assignment in finalise.

Moving the check for a default value into getVarFlag addresses both
the timing issue and the performace. This change gives a 7% real time
performance improvement to parsing the Poky metadata. The cost of the
check at this point is minimal since we have all the data flags available.

This should also fix Yocto bug 752.

(From Poky rev: 6ea24f04cd635295d826f03d9c7d8a08cc1d5b31)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Ensure SRCREV_pn-PN is checked for a revision when the SRC_URI is...
Richard Purdie [Wed, 23 Feb 2011 11:47:50 +0000 (11:47 +0000)]
bitbake/fetch2: Ensure SRCREV_pn-PN is checked for a revision when the SRC_URI is unnamed

(From Poky rev: 707132c60a84cdcf50da056c68f2da7402d3b2e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: Fix parsing failure zombie problem
Richard Purdie [Wed, 23 Feb 2011 11:09:07 +0000 (11:09 +0000)]
bitbake/cooker: Fix parsing failure zombie problem

When parsing if a SystemExit event is triggered, it causes the parsing thread to
exit and the main process hangs waiting for it to finish indefintely. Add code to
catch BaseExceptions and raise these with the main process gracefully instead
of just hanging indefinitely with zombie processes.

(From Poky rev: 56a92105fe6b779c69bccd44c2cff8f21cafdfbd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fecth2: Ensure BB_FETCH_PREMIRRORONLY being set as false is handled correctly
Richard Purdie [Wed, 16 Feb 2011 12:35:35 +0000 (12:35 +0000)]
bitbake/fecth2: Ensure BB_FETCH_PREMIRRORONLY being set as false is handled correctly

(From Poky rev: 3ef2d39dbf8a573acfbf633c1d5d7cb3cee18788)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Revert part of the unpack change until the issues with it are resolved
Richard Purdie [Sun, 13 Feb 2011 00:05:06 +0000 (00:05 +0000)]
bitbake/fetch2: Revert part of the unpack change until the issues with it are resolved

(From Poky rev: b9a97e07b48b20b00feff5b8c7196c3a3b7762b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2: unpack revision
Mark Hatle [Fri, 11 Feb 2011 17:43:54 +0000 (11:43 -0600)]
fetch2: unpack revision

Revise the unpack function to have a way to disable the unpack.  This is
based on the work from "Andreas Oberritter <obi@opendreambox.org>", see
http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=2bdfe8519eda8067845019a699acdf19a21ba380

In addition, the to_boolean function comes from the work of
"Chris Larson <chris_larson@mentor.com>", see
http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=900cc29b603691eb3a077cb660545ead3715ed54

(From Poky rev: 3faa635fd408695dd5b754fda3f6060dd670b81d)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Add explict network access exception and handling to give users usabl...
Richard Purdie [Fri, 11 Feb 2011 22:08:21 +0000 (22:08 +0000)]
bitbake/fetch2: Add explict network access exception and handling to give users usable error messages

(From Poky rev: 029f19bd3d4dc09fb48bf6e5322d48bb84c4eb34)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Fix patch merge error
Richard Purdie [Fri, 11 Feb 2011 16:24:26 +0000 (16:24 +0000)]
bitbake/fetch2: Fix patch merge error

(From Poky rev: 132ec8d3b7e5916c64de85b248632021f51701d3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Add some debug output so its clear when PREMIRRORS, upstream and...
Richard Purdie [Fri, 11 Feb 2011 16:16:51 +0000 (16:16 +0000)]
bitbake/fetch2: Add some debug output so its clear when PREMIRRORS, upstream and MIRRORS are being used

(From Poky rev: a72d49478e57b05b99cb1b3beec62a9e79a24e7a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Ensure network access status is reset for each loop iteration in...
Richard Purdie [Fri, 11 Feb 2011 16:15:36 +0000 (16:15 +0000)]
bitbake/fetch2: Ensure network access status is reset for each loop iteration in download()

(From Poky rev: 20afb21a375b6a5f0d4ff6e269eeee121d6f087a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2/wget: Fix missing string parameter reference
Richard Purdie [Fri, 11 Feb 2011 12:16:44 +0000 (12:16 +0000)]
bitbake/fetch2/wget: Fix missing string parameter reference

(From Poky rev: 05d8b6422dc3154b2890f8db3f919faec4457d6f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Ensure failed fetch attempts are logged in the debug logs
Richard Purdie [Fri, 11 Feb 2011 12:14:20 +0000 (12:14 +0000)]
bitbake/fetch2: Ensure failed fetch attempts are logged in the debug logs

(From Poky rev: ea70c4362fdb81bc9467975c145c48196c45e3af)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Correctly handle git mirror tarball fetching
Richard Purdie [Fri, 11 Feb 2011 12:06:44 +0000 (12:06 +0000)]
bitbake/fetch2: Correctly handle git mirror tarball fetching

(From Poky rev: 7f30131faaa5e3fdb1191c9da95c5683cefafeb5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Pass over malformatted (empty) mirror url lines
Richard Purdie [Fri, 11 Feb 2011 12:04:59 +0000 (12:04 +0000)]
bitbake/fetch2: Pass over malformatted (empty) mirror url lines

(From Poky rev: 20ab1cb0ca10b0c7724f2154fe5b54c939b8a887)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Fix message about md5 checksums when sha256 is incorrect
Richard Purdie [Fri, 11 Feb 2011 21:59:23 +0000 (21:59 +0000)]
bitbake/fetch2: Fix message about md5 checksums when sha256 is incorrect

(From Poky rev: 4a226460d5e158e8adbf74a68717cb9a923e8009)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoprocess.py: Avoid deprecation warning
Richard Purdie [Mon, 14 Feb 2011 16:32:07 +0000 (16:32 +0000)]
process.py: Avoid deprecation warning

bitbake/lib/bb/process.py:15: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

(From Poky rev: 6cb8fd6def4912e4aa76330649ba42a9ed2694fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/build.py: When looking up extra stamp info for setscene tasks, use the real...
Richard Purdie [Thu, 27 Jan 2011 11:20:50 +0000 (11:20 +0000)]
bitbake/build.py: When looking up extra stamp info for setscene tasks, use the real taskname

(Fixed based on a bug reported by Dongxiao Xu <dongxiao.xu@intel.com>)

(From Poky rev: c34913ea5a4f20ce4bca3c68a65e9f64f1e3910c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/unlockfile: Fix exception handling
Richard Purdie [Wed, 26 Jan 2011 12:20:14 +0000 (12:20 +0000)]
bitbake/unlockfile: Fix exception handling

(From Poky rev: 5f866ac84f72699139be1d98f010017c7b71f0f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/utils: Ignore OSError in unlockfile
Richard Purdie [Mon, 24 Jan 2011 14:26:50 +0000 (14:26 +0000)]
bitbake/utils: Ignore OSError in unlockfile

(From Poky rev: 74783fec56d6ced1a793b36410233472e7daf445)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosiggen.py: better print for task hash comparison
Kevin Tian [Thu, 20 Jan 2011 05:54:51 +0000 (13:54 +0800)]
siggen.py: better print for task hash comparison

current bitbake-diffsigs simply print out the whole 'runtaskdeps' when there's mismatch, which
is not very readable. On the other hand, 'runtaskhashes' comparison is broken which assumes
same key existing in two sides. This commit provides better output by figuring out differences
from addition, removal or hash change.

(From Poky rev: bcb18738361ee2394bc266911e9e75d5bf1c10cd)

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofix parameter order for flaglist()
Dongxiao Xu [Thu, 20 Jan 2011 13:02:11 +0000 (21:02 +0800)]
fix parameter order for flaglist()

(From Poky rev: 5da9423217a5cd204d17a0f7bbe248082a1b257c)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/providers.py: Fix runtime providers problems
Richard Purdie [Thu, 20 Jan 2011 22:44:33 +0000 (22:44 +0000)]
bitbake/providers.py: Fix runtime providers problems

Take a real world testcase where you have two recipes, each of which
contains PACKAGES_DYNAMIC = "gdk-pixbuf-loaders-*" and recipes which
RDEPEND on some gdk-pixbuf-loaders-xxx package. To select between these
you need to set a PREFERRED_PROVIDER.

These are specified in the PN namespace so the locgical conclusion is
that setting PREFERRED_PROVIDER_gdk-pixbuf = "gtk+" should work. It
doesn't and instead checks crazy things.

The code was correctly finding the two possible providers, gtk+ and
gdk-pixbuf. It was however only accepting PREFERRED_PROVIDER_gtk+
= "gdk-pixbuf" to resolve this problem which reads as the exact
opposite to what was wanted.

This patch changes the code to do something that makes sense. I suspect
that before these changes it was pretty much a null operation rubber
stamping the single provider case. For Poky at least it exposes a few
cases where -nativesdk recipes were providing the same things as their
normal counterparts but these are genuine bugs in the metadata.

I've also attempted to make the multiple provider error message human
readable as I counldn't understand it and I doubt anyone else could
either.

(From Poky rev: d4f537965b3a530ca7ed3bce206abbff810031e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/utils.py: Teach unlockfile about shared mode lockfiles
Richard Purdie [Wed, 19 Jan 2011 13:30:14 +0000 (13:30 +0000)]
bitbake/utils.py: Teach unlockfile about shared mode lockfiles

(From Poky rev: fd88588df029604689db9b0e30c55aad68392a5d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/utils.py: Add option of holding shared lockfiles
Richard Purdie [Wed, 19 Jan 2011 11:01:54 +0000 (11:01 +0000)]
bitbake/utils.py: Add option of holding shared lockfiles

(From Poky rev: 7857834691868b7f48f732ee78d8770f5473ff68)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoIntroduce stamp-extra-info task flag into stamp filenames
Dongxiao Xu [Tue, 18 Jan 2011 08:18:18 +0000 (16:18 +0800)]
Introduce stamp-extra-info task flag into stamp filenames

For certain tasks, we need additional information in build stamp file
other than the task name and file name. stamp-extra-info is introduced as
a task flag which is appended to the stamp file name.

[Code simplifcations/tweaks from Richard]

(From Poky rev: 80cf3e405c923ed95dd09936739e816dbdd92299)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/build.py: Rename message field to avoid DeprecationWarning: BaseException...
Richard Purdie [Mon, 17 Jan 2011 15:52:06 +0000 (15:52 +0000)]
bitbake/build.py: Rename message field to avoid DeprecationWarning: BaseException.message warning

(From Poky rev: 0388f0758f84c7a8ec975d9be7e384cb65d9af4c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/siggen.py: Fix whitelisted variable handling
Richard Purdie [Wed, 12 Jan 2011 15:58:48 +0000 (15:58 +0000)]
bitbake/siggen.py: Fix whitelisted variable handling

Even when a variable was whitelisted, any dependencies of that variable
could still creep into the task hash due to the way the whitelisting
code worked. This patch changes thing to ensure that when whitelisted,
that whitelisting applies to the variable and any dependencies it has.

(From Poky rev: 25b3d39612c0bea1d136e346d938abde56aa699f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoIncrement version for development version
Richard Purdie [Fri, 18 Feb 2011 17:06:45 +0000 (17:06 +0000)]
Increment version for development version

8 years agoRelease 1.12.0 1.12.0
Richard Purdie [Fri, 18 Feb 2011 17:03:42 +0000 (17:03 +0000)]
Release 1.12.0

8 years agouihelper: import bb.build, kill commented lines
Chris Larson [Wed, 16 Feb 2011 22:58:07 +0000 (15:58 -0700)]
uihelper: import bb.build, kill commented lines

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: don't choke if we have nothing to parse
Chris Larson [Wed, 16 Feb 2011 22:50:50 +0000 (17:50 -0500)]
cooker: don't choke if we have nothing to parse

If all our recipes were cached, there's no reason to fire off any parsing
progress events at all.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agosiggen: add bb.data, bb.parse imports
Chris Larson [Wed, 16 Feb 2011 22:41:37 +0000 (15:41 -0700)]
siggen: add bb.data, bb.parse imports

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agorunqueue: simplify RunQueueStats.copy
Chris Larson [Wed, 16 Feb 2011 22:24:24 +0000 (15:24 -0700)]
runqueue: simplify RunQueueStats.copy

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agorunqueue: pass a copy of the RunQueueStats to events
Chris Larson [Wed, 16 Feb 2011 22:18:06 +0000 (15:18 -0700)]
runqueue: pass a copy of the RunQueueStats to events

This avoids cases where the stats are modified after the event is fired but
before it's dispatched to the UI.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoserver: clean up call of write_profile_stats
Chris Larson [Wed, 16 Feb 2011 00:07:00 +0000 (17:07 -0700)]
server: clean up call of write_profile_stats

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoserver: add profiling support to ProcessServer
Chris Larson [Tue, 15 Feb 2011 23:59:56 +0000 (16:59 -0700)]
server: add profiling support to ProcessServer

Based on poky's support, particularly the format of the processed log file and
the log message shown to the user regarding the files written.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoEnable some DeprecationWarnings
Chris Larson [Sat, 12 Feb 2011 04:26:51 +0000 (21:26 -0700)]
Enable some DeprecationWarnings

We'll be skipping the Pending Deprecation step given our release process.

Signed-off-by: Chris Larson <chris_larson@mentor.com>