Commit Graph

10706 Commits

Author SHA1 Message Date
Yu Ke 30d27115ec base.bbclass: add lock file for do_unpack task
This patch intend to fix the random unpack failure of linux-libc-headers-yocto
and linux-yocto.

The root cause of the unpack failure is that: these two recpies has the same URL, thus
has the same dest file during the fetch and unpack phase:
do_fetch  : create tar ball ${DL_DIR}/git_git.pokylinux.org.linux-yocto-2.6.37.tar.gz
do_unpack : extract tar ball ${DL_DIR}/git_git.pokylinux.org.linux-yocto-2.6.37.tar.gz
fetch phase is protected by lockfile, so it works fine. but unpack phase is not lock protected,
thus there is race condition like: when linux-yocto do_unpack is extracting the tar ball,
linux-libc-headers-yocto do_fetch starts to create tar ball thus overwrite linux-yocto's
tar ball and cause linux-yocto do_unpack failure

To fix this issue, do_unpack also need to be protected by lock

Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-04 09:46:37 -08:00
Koen Kooi ca148f4627 sstate.bbclass: fix multimachine builds when PACKAGE_ARCH = MACHINE_ARCH
previously you could only build one set of packages for multiple machines:

MACHINE=foo bitbake task-base
MACHINE=bar bitbake task-base

would only create task-base packages for foo, but not for both foo and bar.
Doing MACHINE=bar bitbake task-base -c cleanall would remove the packages for foo.

The solution is to use MULTIMACH_ARCH as suggested by Richard Purdie.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-04 09:46:26 -08:00
Bernhard Reutner-Fischer 641fc9bad0 ConfHandler: commentary typo fixes
(Bitbake rev: 089dc31932a85455ed0fec8209d0451af4310f94)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 15:00:25 +00:00
Bernhard Reutner-Fischer c0a11db877 event: fix unicode handler registration
(Bitbake rev: 413af91e56a6d2368f6cbe22c0e2a337e1289e55)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 15:00:22 +00:00
Bernhard Reutner-Fischer aae8532528 cache: defer marking fn as clean
Only mark fn as clean if it is clean.
This saves us from removing (prematurely added) fn from our clean set
and saves me a few percent of runtime (and misleading debugging output
from remove()).

(Bitbake rev: 884365228fcaac07421ac1440d4946693fb628c5)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 15:00:18 +00:00
Bernhard Reutner-Fischer c9d4807662 BBHandler: use basename directly in handler()
(Bitbake rev: 739a8ce6ac688061afd55cd3c980d0e9e45c5930)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 15:00:15 +00:00
Bernhard Reutner-Fischer 83f0b79f43 data: fewer newlines for (un)export
Previously we emitted two newlines for export and unexport.
One newline for export and unexport is enough (and makes the scripts
look better and a tad smaller).

(Bitbake rev: ba060160fdf1278a273fb2b77d36b8c681807ecf)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 15:00:11 +00:00
Bernhard Reutner-Fischer 9ed8e9f371 parse: Use constants from stat instead of magic numbers
(Bitbake rev: bcabe2dfb587042e139890329ff52d9bb9201cf4)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 15:00:07 +00:00
Richard Purdie 0090a798eb bitbake: Sync a load of whitespace and other non-functionality changes with bitbake uptream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:54 +00:00
Richard Purdie e8c48e668c bitbake/contrib: Sync with bitbake upstream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:54 +00:00
Chris Larson 043adbfa09 process: fix handling of the input argument
When using a logfile, we weren't sending input to the child process.

(Bitbake rev: 5ec4ca7e45bdf6d259503fc67155395e89ba6329)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:53 +00:00
Bob Foerster 572bf4b382 depexp: add sorting of all package lists
Without sorting, it's very difficult to find the information you're
looking for.  Now, the lists are all sorted alphabetically for easy
viewing.

(Bitbake rev: 80e3d3a130b9dee72c11c6946bb5ff7705111d7c)

Signed-off-by: Bob Foerster <robert@erafx.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:53 +00:00
Chris Larson 8eee4221db pysh: add missing os.path import
(Bitbake rev: 6fb448a6cfb00aeb5dfc6c047915e0941e754348)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:53 +00:00
Bernhard Reutner-Fischer 1949d4f5e8 runqueue: fix typo in documentation of calculate_task_weights
(Bitbake rev: 5cde120003af97a5cf5c6eff2a02bb1480f9414b)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:53 +00:00
Bernhard Reutner-Fischer 4d4d1355d0 runqueue: use fewer newlines in error path
(Bitbake rev: 7498466f0e42beea6f5f411209a892b636c7783c)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:53 +00:00
Chris Larson 4a6d4d258c logger usage cleanup
(Bitbake rev: 976e4f84a8147ad762442df7ff4820611a21d227)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:53 +00:00
Bernhard Reutner-Fischer e890b86ebd utils: fix typo in error message
(Bitbake rev: 99cdb61b30d0c75c8f831c78346cc9f8ca7945dd)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:53 +00:00
Chris Larson d951aa40a0 Move LAYERDIR expansion hack into DataSmart
(Bitbake rev: 40778a6e9e82c7ea4673a74fc19574430fa63e8d)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:52 +00:00
Chris Larson 717f13d63c parse: use bb.utils.which
(Bitbake rev: 2bc893dc407bf608cac7e12673161b75b712da83)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:52 +00:00
Chris Larson 760b82e732 Fix logging level names for post-server-ui-split
(Bitbake rev: dc5a5c39291ec223cd761dce59d29eee7316cb70)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:52 +00:00
Chris Larson 93e20c51c4 Use os.devnull, not /dev/null
(Bitbake rev: ce5ab0fc524a1c2c48c4c39d6fc8aae23019207b)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:52 +00:00
Bernhard Reutner-Fischer 4dc97cb845 utils: don't overwrite builtin dir() function
(Bitbake rev: 6dc863f714beda6ca7ff8cd3e830a9bc8a39123d)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:52 +00:00
Bernhard Reutner-Fischer 9bf3cf103c bzr: use utils.remove instead of os.system
(Bitbake rev: 0ef8a9b3780525a28567ebe42956e5cae79ada8c)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:52 +00:00
Chris Larson 240b597ff2 utils: drop unnecessary debug msgs from mkdirhier
(Bitbake rev: 4b36be445a05a544cd3a456acd1dcc8f962359e2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:51 +00:00
Bob Foerster 2735a70ece Show the user progress when loading the cache
(Bitbake rev: bdd7813d8eecf7b6b636322e748ca6bf69118513)

Signed-off-by: Bob Foerster <robert@erafx.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:51 +00:00
Chris Larson 89a1b59d9a knotty: exit with 1 if we see a critical log message
(Bitbake rev: d527ca441539618c990291fb8340f552ac760bce)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:51 +00:00
Chris Larson 2984877989 cooker: don't swallow recipe parse errors
(Bitbake rev: 1f5d49ce64e5e1c7705edbfa3c8e19649c21edd2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:51 +00:00
Andreas Oberritter 2f0c23d28d manual: document scmdata=keep for CVS, SVN and Git
(Bitbake rev: f42e6d33b986183eee2c74aa7b1bbc9b339276a9)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:51 +00:00
Andreas Oberritter bd34e7d6df fetchers: Add parameter scmdata=keep to include .git/ and others in generated tarballs.
* Allows generating version information from SCMs during build.
* Note that tar doesn't need to use --exclude '.git', because
  git checkout-index doesn't clone the repository.

(Bitbake rev: 05cbc1d1a01c667c77688f36fbc5b61c5f452a3a)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:51 +00:00
Chris Larson 7bbde5b149 build: fix FuncFailed for the no logfile case
(Bitbake rev: 3a4b5eb20e41bd3cecd9d7e8dff7d076d8a7bb9a)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:50 +00:00
Chris Larson ddf2c687d8 process: handle OSErrors other than file not found
(Bitbake rev: 7d80a5355cb540aae8d3082c1efebb72da4f93c6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:50 +00:00
Chris Larson 3d51fd2b7d build: ensure LogTee has a valid name property
(Bitbake rev: 0ebb46e25261cfc85aaef2790cba7c1ec057c306)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:50 +00:00
Chris Larson ea91b1dd87 Fix PWD issue with new exec_func_shell
The previous attempt was incorrect.  The issue isn't that subprocess fails to
set PWD, it's that PWD is in the metadata, inherited from the environment, and
is re-exported, overwriting the actual accurate one in the shell environment
with the old one from the metadata.  So, ensure that PWD in the metadata is
not exported.

We can ditch this when the environment handling is reworked (e.g. poky's
commit to do so).

(Bitbake rev: 2c8683234acf514706b2b69f5b29405485e664dd)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:50 +00:00
Chris Larson 9260c08e1d Ensure that the invalid UI error goes to stderr
(Bitbake rev: 76aeea2c23a518046d0b26f1a6fc43287a180a9d)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:50 +00:00
Chris Larson e05d6fa927 build: set PWD in the subprocess preexec hook
(Bitbake rev: efa5485c8f9d488ba058c40734cc55296d3de6eb)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:50 +00:00
Richard Purdie 2b7c2a8420 bitbake: Transfer noexec runqueue messages to the UI
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:49 +00:00
Chris Larson fcba92f354 Move the runq task start/failed messages to the UI
(Bitbake rev: ab831e867f09b47001cb8da2f8f060e04febf237)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:49 +00:00
Chris Larson 23735bb765 Silence python 2.7 nested context manager warning
(Bitbake rev: 1c38f19fb8da2e6c55394162d0142e7146387e54)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:49 +00:00
Chris Larson 098f63d672 Rename command events, adjust compareRevisions
- Moved the logic for comparing revisions from cooker into command
- Removed 'Cooker' from the event names
- Renamed the 'ExitCode' event into CommandExit, and changed CommandFailed to
  be a subclass of CommandExit

(Bitbake rev: c51ed5d7a9971fad6019dac6c35a71b8a54ab16a)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:49 +00:00
Chris Larson 5a92e67b86 event: use cPickle for events
(Bitbake rev: b16c0c1dc3b7e03b02555e9803767a0d695e67f1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:49 +00:00
Chris Larson d2123cc395 utils: fix 'lock' variable reference
(Bitbake rev: f57f8f3cc980e3ae1693c2e065227e951ed0b1c0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:49 +00:00
Chris Larson 212414b13f bb.event: fix MsgBase ref in fire_class_handlers
(Bitbake rev: db7f960e5f103a424a4319f1867fb540e643c1ec)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:48 +00:00
Chris Larson 3d3af810fa Kill the uncaught exception handler
We now wrap the main() in a try/except, ensuring that both the main portion of
bin/bitbake and the UI raising an exception will be shown to the user.  For
the server and workers, we can ensure in the server itself that exceptions are
handled correctly.

(Bitbake rev: 240d4a7ae80a6636c302ae84266ddfed7a7fcedd)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:48 +00:00
Chris Larson 6f80455777 build: fix -D with shell functions
(Bitbake rev: 1c8be64732fdf4f3a608c090b3dc92065d6058d6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:48 +00:00
Chris Larson aaa55880ac build: send logging messages to the log file for python functions
(Bitbake rev: ee1cce6ab21ddda60a7a070d03e98ff8485a5e71)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:48 +00:00
Chris Larson 25e519a80f utils: fix calls to close() in the lock/unlock functions
(Bitbake rev: 4262c26d36d1c1b6801ac422716a227c1f6b9589)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:48 +00:00
Chris Larson e2363f3cdd build: use a contextmanager for locks
Also don't bother passing logfile to exec_func_python, at least until we start
adding the logfile as a file handler to the bitbake logger.

(Bitbake rev: f99ee4680c9f67b7ed13fc06044ba2382f9a782c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:48 +00:00
Chris Larson b4eff9fcef build: use bb.process instead of os.system
(Bitbake rev: 53740977521bc81ffa37adfa7bbeb8f2a80ea165)

build: write logfiles per task, not per function
Based on d14f9bf6 from poky, reworked for master and other cleanup.

(Bitbake rev: beadff2eca1eb95f0411115dd72ddb4c3c44c604)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:48 +00:00
Chris Larson 87b6cdf547 process: add subprocess-based bits
(Bitbake rev: c63e55564a8840083dbd8634b10fe6f76d1f1354)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:47 +00:00
Chris Larson c8d2dad049 Rename the ui 'init' method to 'main'
As these may run the UI in a blocking fashion and then return the exit code,
'init' was an inappropriate name, and 'main' is more appropriate.

(Bitbake rev: 4d081a0ed759bd526ab01849d650bd9e8d80ddd1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:47 +00:00