Commit Graph

570 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 902b5da3f6 misc: Update the email address to a working one.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:36:54 +00:00
Chris Larson 36318110da Fix IndexError encountered when a 'depends' flag references a nonexistant task
(Bitbake rev: 4b0fd70539e73d99282fa89d47ad2d5f642ca4f4)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:36:54 +00:00
Chris Larson 151c4a7a33 Drop the 'ui failed to start' message, as the ui_init does more in knotty
(Bitbake rev: 39087138ffd5d427f07ecaa580a40885c5ffaff3)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:36:54 +00:00
Chris Larson bac0c60b61 Make realfile optional for better_exec, using the existing fn in the code object
(Bitbake rev: 499a2d28d578cdd6df7cd30ccb79cc2b2796fb65)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:36:54 +00:00
Chris Larson 96e7518472 When shutting down, send SIGTERM, not SIGINT
SIGINT should be from the user, not a script.  It also doesn't work as
reliably to shut down processes, as it's not always interpreted as a
termination request.  In addition, it causes KeyboardInterrupt exceptions in
the worker processes, which can interfere with our exception handling.

(Bitbake rev: e5f6e0e9de4c6d1dfdd269d2bf7f83c00c415a27)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-31 10:34:08 +00:00
Yu Ke 6ee0c26e21 bb.utils: check if lock file is writable, to fix bug 606
Bug 606 report that if $DL_DIR is read-only, do_fetch will
simply hang without any error message.

The root cause is that: bb.fetch.go()->bb.utils.lockfile()
will try to lock file ${DL_DIR}/xxxxx.lock. Since ${DL_DIR}
is read-only, it will cause IOError exception. Although
lockfile() can catch the exception, currently code simply
ignore all the exception and continue the loop. it make
sense if the exception is caused by locking contention,
but in the read-only $DL_DIR case, it cause endless waiting
unfortunately.

So this patch add read-only check for lockfile to avoid the
silent hang.

Fix [BUGID #606]

Signed-off-by: Yu Ke <ke.yu@intel.com>
2010-12-30 09:28:45 +00:00
Joshua Lock ab83f5f266 bitbake/depexp: fix early exit
Stupdi typo/thinko from me had depexp exiting once recipes had parsed
as I'd used a return the while loop where I'd meant a continue...

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-22 18:36:37 +00:00
Richard Purdie 3bda5b1301 bitbake/fetch: Fix fetch error
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-21 15:15:42 +00:00
Kevin Tian 05963b0a1b runqueue.py: set BB_TASKHASH approriately after moving to fork()
In previous exec() model, cooker is re-initialized from scratch with environmental
variable exported accordingly. Now in fork() model, environmental variables are
not exported again, and thus original method to export BB_TASKHASH doesn't apply
now which breaks all sstate packages. Now we can set data variable directly instead.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-21 08:48:17 +00:00
Richard Purdie 2d1007b33f bitbake/fetch: Only checksum downloads when they're first downloaded and a checksum is present
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-21 00:52:10 +00:00
Richard Purdie 52aada2eaf bitbake/runqueue.py: Somehow the python environment mapping is failing so do it manually
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-21 00:51:24 +00:00
Richard Purdie d4ba59c87e bitbake/fetch: Add missing return so if a checksum isn't present, it isn't checked
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-20 17:38:03 +00:00
Richard Purdie 7abdf3e5c3 bitbake/fetch: Checksum validity fixes
If the checksum check failed, the .md5 stamp file would still have been created
meaning subsequent builds would proceed with the corrupt file. Reorder the calls
to avoid this. Also raise a specific error for the checksum not specified error
case.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-20 16:04:51 +00:00
Yu Ke b8d69d6f6e FetchData: add SRC_URI checksum
This patch add the per-recipe SRC_URI checksum verification.

- SRC_URI format
The format of SRC_URI checksum follow OE definition:

1. SRC_URI has single src
SRC_URI = "http://some.domain/file.tar.gz"
SRC_URI[md5sum] = "xxxxxxxxxxxxxxx"
SRC_URI[sha256sum] = "xxxxxxxxxxxxxxxxxxxxxx"

2. SRC_URI has multiple src, every src need specify name
SRC_URI = "http://some.domain/file1.tar.gz;name=name1 \
           http://some.domain/file2.tar.gz;name=name2 "
SRC_URI[name1.md5sum] = "xxxxxxxxxxxxxxx"
SRC_URI[name1.sha256sum] = "xxxxxxxxxxxxxxxxxxxxxx"
SRC_URI[name2.md5sum] = "xxxxxxxxxxxxxxx"
SRC_URI[name2.sha256sum] = "xxxxxxxxxxxxxxxxxxxxxx"

- SRC_URI checking invocation:
the checksum checking is invoked in do_fetch phase,
so it can be invoked manually by

# bitbake -f -c fetch <recipe_name>

if recipes has no SRC_URI checksum item, bitbake will show warning:
"
WARNING: Missing SRC_URI checksum for xxxx.tar.gz, consider to add
SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072"
SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768"
"
thus recipe author can add it to recpie file after SRC_URI

- control variable BB_STRICT_CHECKSUM
when SRC_URI checksum is missing, this variable decide pass or not
if BB_STRICT_CHECKSUM = "1", bitbake should fatal in this case, otherwise bitbake just pass

Signed-off-by: Yu Ke <ke.yu@intel.com>
2010-12-20 15:24:52 +00:00
Kevin Tian 834f0c5a8d siggen.py: print taskname when seeing mismatched hash in cache
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-20 14:50:22 +00:00
Richard Purdie 1f3e313fd5 bitbake Revert bitbake exec() and go back to fork() for performace wins (first draft)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-17 18:25:06 +00:00
Richard Purdie a86f960f65 bitbake/runqueue: Revert previous setscene noexec changes and ensure setscene stamp exists for setscene noexec tasks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-17 10:47:02 +00:00
Richard Purdie 56ef2a01be bitbake/runqueue: Clean up message log levels
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-17 10:47:02 +00:00
Kevin Tian aa1a780d84 siggen.py: make sure stamp directory existing
or else "bitbake -S" from scratch may report "No such file or directory" error.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-16 15:33:44 +00:00
Richard Purdie ace52b0da3 bitbake/runqueue.py: We should just failoutright in scenequeue for noexec tasks, not skip them so stamps are created
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-16 15:14:13 +00:00
Kevin Tian bb783afd4d runqueue.py: use correct task ID when checking validity of setscene tasks
sstate hash validation is done at initialization of RunQueueExecuteScenequeue.
However the index of 'valid' list returned from the validation doesn't
correspond to setscene task ID. It's just an intermediate namespace between
runqueue and sstate hash func. Use it as setscene task ID fully mess the flow.
Previously this doesn't cause trouble because all setscene tasks are passed. Commit
58396a5d24 add 'noexec' concept to setscene
tasks which grabs some tasks out of the list and thus trigger this problem

Without this fix there're ~50 recipes (gzip-native, glib, ...) rebuilt weirdly
with a minimal build, even though existing sstate packages could accelerate them.

there's another typo using wrong task ID in a debug message which further hide
this issue

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-14 22:40:16 +00:00
Paul Eggleton 80e6408b9f bitbake: add optional expansion to getVarFlag()
Add a parameter to getVarFlag() to auto-expand the value of the flag. This
makes getVarFlag() more consistent with getVar(), and allows expansion of
vardeps and vardepsexclude (which has been done in this commit).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2010-12-14 22:36:19 +00:00
Paul Eggleton a52e4063f4 bitbake: allow excluding dependencies of variables
Adds a vardepsexclude flag that can be used to exclude a dependency of
a variable (the opposite of vardeps). This will allow the exclusion of
variables from the hash generation much more selectively than blanket
whitelisting using BB_HASHBASE_WHITELIST.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2010-12-14 22:35:50 +00:00
Richard Purdie c47cfc56c7 bitbake/bitbake-runtask: Since the parent has set the environment up cleanly we don't need to filter this ourselves anymore
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-10 12:40:23 +00:00
Richard Purdie 0ba9a9fffe bitbake: Overhaul environment handling
Currently, anything whitelisted in the environment makes it into the worker
processes. This is undesireable and the worker environment should be as
clean as possible. This patch adapts bitbake sosme variables are loaded into
bitbake's datastore but not exported by default. Any variable can be exported
by setting its export flag.

Currently, this code only finalises the environment in he worker as doing so
in the server means variables are unavailable in the worker. If we switch
back to fork() calls instead of exec() this code will need revisting.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-09 13:16:14 +00:00
Joshua Lock c538ef33aa bitbake/cooker: fix idle command processing in servers
idle command processing in each of the servers does not handle an explicit
None return value, which means the goggle UI ends up repeatedly adding
"Tasks Summary:" rows to the list.

This patch modifies BBCooker.buildTargets.buildTargetsIdle to return False
when BuildCompleted is fired, as is done in BBCooker.buildFile.buildFileIdle.
It may be that the correct way to fix this is to change the idle command
processing in the servers.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-09 12:41:44 +00:00
Joshua Lock 5526a64f4e bitbake/goggle: add a ProgressBar for parse progress
Construct a ProgressBar and pass it to the RunningBuild.handle_event() so
that goggle users are notified of metadata parsing progress.

UI's with status make users less nervous

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 13:53:06 +00:00
Joshua Lock 48e27575eb bitbake/goggle: automatically show most recently added message
It seems likely that the user would want to view the most recently emitted
messages so this patch sets the message dislay treeview to scroll to any
newly added rows.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:53:05 +00:00
Joshua Lock b9617bf6e1 bitbake/xmlrpc: Modify xmlrpc server to work with Python 2.7
Python 2.7's library changes some of xmlrpclib's internal implementation such
that interacting with a proxy to BitBakes SimpleXMLRPCServer would cause
BitBake to crash.

The issue was traced to changes in the xmlrpclib.Transport implementation and
Python bug #8194 (http://bugs.python.org/issue8194).

This patch introduces a workaround by create a subclass of
xmlrpclib.Transport, which overrides the offending methods with the Python
2.6.6 implementation copy and pasted from the Python 2.6.6 xmlrpclib, and
using this BBTransport implementation for both xmlrpclib.Server objects we
create.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:51:59 +00:00
Joshua Lock 84384aa8a9 bitbake/crumbs: add optional pbar parameter to RunningBuild.handle_event()
Defaults to None, but if set will pass the ParseProgress sofar and total to
pbar's update() method.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:51:16 +00:00
Joshua Lock 1307d64286 bitbake/depexp: Factor ProgressBar into a separate class in crumbs/
ProgressBar will be useful in other UI elements so make it it's own class.
Make ProgressBar a subclass of gtk.Dialog, rather than gtk.Window, so that we
can suggest the window manager parent the ProgressBar to the widget passed at
as parent.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:50:55 +00:00
Joshua Lock 8cbaa9f0d9 bitbake/goggle: interaction tweaks
Set the goggle window to a more sane default size (640x480) and hook up the
close button.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:50:38 +00:00
Joshua Lock cb6eff7c80 bitbake/crumbs: fix the event name determination
Due to some recent change *somewhere* we need to explicitly look at the
name attribute on the instances class, rather than the name attribute of
the instance.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:50:09 +00:00
Joshua Lock bd8ff30da0 bitbake/crumbs: do the test for ignored messages sooner
Move the test for ignored messages to the start of the message handling loop to
avoid doing work for messages which are only going to be ignored.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:49:38 +00:00
Joshua Lock 96da2ea1f9 bitbake/crumbs: Fix crumbs UI for bitbake event class name changes
Some of the events we where trying to look for have had their class names
changed, fix these references.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-12-07 12:49:09 +00:00
Kevin Tian 4336d676d4 siggen.py: fix the wrong usage on BB_TASKHASH_WHITELIST
BB_TASKHASH_WHITELIST is expected to filter out native tasks from the
dependency list for target recipe's checksum. However current code
actually implements the opposite. All native sstate packages end up
to have empty task dependency while target sstate packages still have
native tasks counted into the checksum.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-07 12:45:08 +00:00
Richard Purdie 7aacc310b5 bitbake/data_smart: Refactor _append/_prepend code to remove duplication
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-07 12:25:24 +00:00
Richard Purdie c354955d26 bitbake/data_smart: Fix append/prepend/override ordering issue
Where a variable name consisted of an append/prepend combined with an override
and there was also an append/prepend to the variable, the override could be lost
if the override was not in OVERRIDES.

For example:

FOO = "A"
FOO_append = "B"
FOO_append_virtclass-native = "C"

could result in "AB" even though virtclass-native was in OVERRIDES.

With this patch applied, the result is "ABC" as would be expected.

The problem was the deletion of the _append/_prepend flag was happening
if *any* append/prepend was procesed, the result should really be that
it should contain any unprocessed append/prepend.

Kevin Tian deserves credit for looking into this and working out the
problem here.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-07 12:16:16 +00:00
Kevin Tian ccd590bf9d siggen.py: set 'runtaskdeps' correctly
Now 'runtaskdeps' is assigned before taskhash whitelist is filtered out, and thus
always contains original task dependencies. This causes problem to diagnose sstate
related problem. So fix it by appending filtered dep to 'runtaskdeps' in the fly.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-06 01:15:39 +00:00
Richard Purdie a0033b622e bitbake/utils.py: Improve traceback to be more helpful/clear to users
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-05 22:52:44 +00:00
Richard Purdie 1a0c39e050 bitbake/utils.py: Ensure the last lines of functions are printed in tracebacks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-05 22:51:38 +00:00
Richard Purdie 58396a5d24 bitbake/runqueue: Teach scenequeue about noexec tasks (since they don't do anything we can assume they're always successful
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 13:54:32 -08:00
Richard Purdie d4125bcac0 bitbake: Simplfy pre and post cooker hooks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 13:54:31 -08:00
Richard Purdie a39f335f59 bitbake/runqueue.py: Fix stamp handling for noexec tasks
This means the noexec messages are only shown once as the stamp files are now
correctly created.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 12:10:17 +00:00
Kevin Tian eaa188f3b9 siggen.py: fix comparison around runtaskdeps
two dep lists should be sorted before the comparison, or else it just
causes false-positive confusion.

Also fix 'taskdeps' to 'runtaskdeps' when printing out the difference.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-11-15 23:04:06 +00:00
Joshua Lock 9545130576 bitbake-runtask-strace: simple shell script to wrap tasks in a strace call
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-11-14 21:08:27 -08:00
Richard Purdie 05ba6fc7cb bitbake: Rewrite profiling code so its functional for both none and xmlrpc backends
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-13 21:23:54 +08:00
Richard Purdie 89929e1f28 bitbake/fetch: Allow checking of a single url at a time (massive sstate speed improvement)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-13 20:10:53 +08:00
Richard Purdie caa7fe2284 bitbake/fetch: Fix handling of mirrors when checking for url validity
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-13 20:10:04 +08:00
Richard Purdie 7333328c48 Revert "bitbake/fetch/local: Also check DL_DIR for files since they could already exists there"
These changes were incorrect.

This reverts commit ae98f7eacb.
2010-11-13 20:03:13 +08:00