bitbake.git
7 years agoBump the version to 1.15.1 1.15.1
Richard Purdie [Fri, 20 Jan 2012 18:26:36 +0000 (18:26 +0000)]
Bump the version to 1.15.1

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoprserv: fix import of sqlite3
Martin Jansa [Sun, 15 Jan 2012 21:03:53 +0000 (22:03 +0100)]
prserv: fix import of sqlite3

* this is used in all other bitbake parts where sqlite3 is used, don't
  know why it wasn't used here, but it fails e.g. on Gentoo
  Traceback (most recent call last):
    File "bin/bitbake", line 39, in <module>
      from bb import cooker
    File "lib/bb/cooker.py", line 39, in <module>
      import prserv.serv
    File "lib/prserv/serv.py", line 4, in <module>
      import xmlrpclib,sqlite3
  ImportError: No module named sqlite3

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosetup.py: install prserv too
Martin Jansa [Sun, 15 Jan 2012 21:03:52 +0000 (22:03 +0100)]
setup.py: install prserv too

* otherwise cooker fails:
  Traceback (most recent call last):
    File /usr/bin/bitbake, line 39, in <module>
      from bb import cooker
    File /usr/lib64/python2.7/site-packages/bb/cooker.py, line 39, in <module>
      import prserv.serv
  ImportError: No module named prserv.serv

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosiggen.py: Abstract the runtime task dependency handling code in the generators
Richard Purdie [Fri, 20 Jan 2012 16:16:08 +0000 (16:16 +0000)]
siggen.py: Abstract the runtime task dependency handling code in the generators

This means that custom signature handlers can override specific parts
of the code without having to reimplement whole functions allowing them
more flexibility.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker.py: Allow siggen classes to be added by the metadata
Richard Purdie [Fri, 20 Jan 2012 16:15:18 +0000 (16:15 +0000)]
cooker.py: Allow siggen classes to be added by the metadata

By calling init_parser which sets up the siggen code after the ConfigParsed
event is fired, we can allow the metadata to add siggen classes which
was always what the code intended.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/fetch2: allow resuming interrupted fetch
Paul Eggleton [Mon, 16 Jan 2012 15:01:08 +0000 (15:01 +0000)]
bitbake/fetch2: allow resuming interrupted fetch

A lot of our checks in the fetcher code assume that if the downloaded
file exists, the download finished successfully; this meant that if
BitBake was interrupted in the middle of a fetch then it would not
resume the fetch the next time, but instead attempt to use the
half-fetched file and usually fail as a result.

Since we're already writing a ".done" stamp file when a fetch completes,
just check for its existence and assume the download didn't complete
successfully if it isn't present.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/runqueue: always log tasks summary
Paul Eggleton [Thu, 19 Jan 2012 14:36:03 +0000 (14:36 +0000)]
bitbake/runqueue: always log tasks summary

It's unclear from the history but at some point we stopped logging the
"Tasks Summary" NOTE when tasks failed. Reinstate this for failure, and
also make the count of attempted tasks include the failed task.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosiggen: Ensure correct runtask dependency output is shown for diffsigs
Richard Purdie [Thu, 19 Jan 2012 19:37:29 +0000 (19:37 +0000)]
siggen: Ensure correct runtask dependency output is shown for diffsigs

The actual task names are discounted for comparison of dependent tasks, only
the actual hashes are used. This updates the comparison code to account for
this change, attempting heuristic matching for more user friendly output but
falling back to showing the changed hashes directly. This avoids some confusing
output to users where it looked like tasks had changed when they had not and
actually had the same hash but a different taskname.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agousermanual: Correct "inherit" search to bbclass from oeclass
Darren Hart [Thu, 19 Jan 2012 21:46:38 +0000 (13:46 -0800)]
usermanual: Correct "inherit" search to bbclass from oeclass

Bitbake looks for bbclass now, not oeclass. Update the docs accordingly.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker: use futures rather than a multiprocessing pool
Christopher Larson [Mon, 9 Jan 2012 05:21:27 +0000 (23:21 -0600)]
cooker: use futures rather than a multiprocessing pool

This avoids some silent parser hangs we were seeing which were
near impossible to debug as no user feedback was given.

[RP: Tweak commit message]
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoAdd dependency on the backported python 3.2 concurrent.futures
Christopher Larson [Sun, 8 Jan 2012 23:17:23 +0000 (17:17 -0600)]
Add dependency on the backported python 3.2 concurrent.futures

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
7 years agobitbake/persist_data: Reconnect when DB is locked
Lianhao Lu [Mon, 16 Jan 2012 04:07:44 +0000 (12:07 +0800)]
bitbake/persist_data: Reconnect when DB is locked

[YOCTO #1761]
Reconnect to the backend Sqlite DB in 'database is locked' exception so
the timeout can be leveraged in each time retry.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/knotty: print task failure summary
Paul Eggleton [Fri, 13 Jan 2012 17:01:52 +0000 (17:01 +0000)]
bitbake/knotty: print task failure summary

Remove the error logged within cooker summarising the list of failed
tasks, and instead print this in the UI (knotty) where it belongs. This
also adds the actual name of the task that failed as well as the
corresponding recipe file that was being shown previously.

In addition, reformat the summary messages more tidily - no extra breaks
between lines and use correct English singular/plurals, with some
allowance for future translation.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/cooker: avoid printing stack trace for -b match error
Paul Eggleton [Fri, 13 Jan 2012 17:01:51 +0000 (17:01 +0000)]
bitbake/cooker: avoid printing stack trace for -b match error

Improves error output for matching problems when the -b / --buildfile
command line option is used.

Rename MultipleMatches exception to NoSpecificMatch (as it is also
raised when there are no matching recipes) and make it inherit from
BBHandledException so that it doesn't print a stack trace (we always log
an ERROR prior to raising it.)

In addition, improve the formatting of the error message - only call the
log function once rather than once for every match, and use a more
appropriate message if there are no matches.

Fixes [YOCTO #1141]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/fetch2: reduce output for fetch failures
Paul Eggleton [Fri, 13 Jan 2012 17:01:50 +0000 (17:01 +0000)]
bitbake/fetch2: reduce output for fetch failures

Make the warning for the initial fetch failure a single line - we don't
need the full command and output here yet, but write it into the log in
full as a debug message. However, if fetching from mirrors fails as well
then print out the full details for the first error that occurred as an
ERROR rather than a WARNING.

Since this is logged as an ERROR, combined with an earlier patch it
suppresses the full log which does make the output much more readable
for any fetch error.

Fixes [YOCTO #1832].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/knotty: avoid printing full task log when error already printed
Paul Eggleton [Fri, 13 Jan 2012 17:01:49 +0000 (17:01 +0000)]
bitbake/knotty: avoid printing full task log when error already printed

If a task has logged an ERROR then don't print the contents of the
task's log file in knotty (the default terminal UI).

As a side-effect we now also respect BBINCLUDELOGS in knotty; if it is
false we never print the log (but the pointer to the log file is always
printed).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/fetch2: correctly decode exit signal/status
Paul Eggleton [Fri, 13 Jan 2012 17:01:48 +0000 (17:01 +0000)]
bitbake/fetch2: correctly decode exit signal/status

The termination signal and exit code of the fetch process were not being
decoded correctly, resulting in bitbake reporting that the process
terminated with a signal of the exit code (if it was under 255). There
are functions in the Python os module to do this decoding correctly (for
Unix at least), so let's use them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/runqueue: avoid "failed" in task summary if nothing did
Paul Eggleton [Fri, 13 Jan 2012 17:01:47 +0000 (17:01 +0000)]
bitbake/runqueue: avoid "failed" in task summary if nothing did

Seeing the word "failed" alone without reading the whole context has
occasionally triggered an automatic assumption on the part of some users
(myself included) that something has gone wrong, even when this message
is telling you that "0 [tasks] failed". To avoid this let's just say
"all succeeded" in this case instead.

As a bonus this means you can now search the output for "fail" and not
find anything if all went well.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/fetch2: improve error formatting for fetcher errors
Paul Eggleton [Fri, 13 Jan 2012 17:01:46 +0000 (17:01 +0000)]
bitbake/fetch2: improve error formatting for fetcher errors

* The "name" argument to FuncFailed is rarely used as a name in actual
  usage within bitbake, so don't treat it as one in the output.
* Don't print URL for FetchError if it was not specified (i.e. don't
  output "Fetcher failure for URL 'None'")
* Don't include URL in "unable to fetch from any source" message since
  we supply it to FetchError and it will be printed anyway.
* Don't include URL in "checksum failed" message for the same reason

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/knotty: don't count errors as warnings in summary
Paul Eggleton [Fri, 13 Jan 2012 17:01:45 +0000 (17:01 +0000)]
bitbake/knotty: don't count errors as warnings in summary

The count of warnings being shown in the summary at the end was also
including the number of errors.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: Automatically start local PR service.
Lianhao Lu [Tue, 10 Jan 2012 06:13:50 +0000 (14:13 +0800)]
bitbake: Automatically start local PR service.

[YOCTO #1126]
A local PR service will be started and stopped automatically along
with the bitbake invocation/ternimation.

This local PR service will be started only and if only when the
PRSERV_HOST is set to 'localhost' and PRSERV_PORT is set to '0'.

When started, the sqlite3 database is stored at
"${PERSISTEN_DIR}/prserv.sqlite3" or "${CACHE}/prserv.sqlite3".

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/PRservice: Added no_hist mode and export/import.
Lianhao Lu [Tue, 10 Jan 2012 06:13:49 +0000 (14:13 +0800)]
bitbake/PRservice: Added no_hist mode and export/import.

[YOCTO #1556]
1. Added the package_arch into the index to the DB table. Because the
change in PACKAGE_ARCH will results in different checksum, and it is
better to have seperate PR value domains for differnt PACKAGE_ARCH of
the same pakcage.

2. Changed the PR service to operate in no history mode. In this mode,
the for a given query tuple (version, pkgarch, checksum), the returned
value will be the largest among all the values of the same (version,
pkgarch). This means the PR value returned can NOT be decremented.

3. Added export function. For each (version, pkgarch) tuple, only the
record with the maximum value will be exported.

4. Added import function. The record will only be imported if the
imported value is larger than the value stored in the DB with the same
(version, pkgarch, checksum) tuple.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: Add BBHandledException exception class
Richard Purdie [Mon, 9 Jan 2012 17:01:51 +0000 (17:01 +0000)]
bitbake: Add BBHandledException exception class

We have a problem knowing when to show the user debug information and
when not to since the code has already shown the user suitable information
about why a failure is occurring.

This patch adds a bb.BBHandledException exception class which can be used
to identify those exceptions which don't need further explanation to
the user.

This patch uses this class for the bb.providers exceptions and ensures the
command handling code correctly filters the exceptions meaning that

"bitbake invalid"

now shows an simple error message and not a python traceback.

[YOCTO #1141 partial]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/knotty: Show summary of warning/error messages shown
Richard Purdie [Mon, 9 Jan 2012 17:00:53 +0000 (17:00 +0000)]
bitbake/knotty: Show summary of warning/error messages shown

Show a summary count of warning/errors messages shown to the user during the
build and make it clear when an error exit code is being set.

[YOCTO #1540]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake-layers: close files in apply_append()
Paul Eggleton [Sun, 8 Jan 2012 12:06:51 +0000 (12:06 +0000)]
bitbake-layers: close files in apply_append()

It's recommended practice to close files when finished with them and the
code in this function was not doing this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake-layers: flatten: warn the user if output structure is incorrect
Paul Eggleton [Sun, 8 Jan 2012 12:06:50 +0000 (12:06 +0000)]
bitbake-layers: flatten: warn the user if output structure is incorrect

If you flatten layers that have different directory structures you may
not end up with a usable layer in the output directory - some files
won't be picked up by BitBake.

To try to avoid this problem, once flattening has completed, get the
BBFILES entries that correspond to the layer from which the output
layer's conf/layer.conf came from, and check through all of the
.bb/.bbappend files in the output directory to see if any will not be
referred to by BBFILES in the output layer. If any are found, show a
warning to the user.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake-layers: flatten: allow specifying layers to flatten
Paul Eggleton [Sun, 8 Jan 2012 12:06:49 +0000 (12:06 +0000)]
bitbake-layers: flatten: allow specifying layers to flatten

You can now optionally specify two or more layers to flatten into the
output, rather than flattening all of the layers in the current
configuration (but this is still the default behaviour if no layers are
specified). Note that this means the output layer may still contain
bbappends where the corresponding recipes are not present in the list of
layers to flatten. There is also a caveat when a layer not being
flattened would be "inbetween" the flattened layers (see the command
help for details.)

Implements feature request in [YOCTO #1564].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocommand.py: add parseConfigurationFiles API
Dongxiao Xu [Fri, 6 Jan 2012 09:02:23 +0000 (17:02 +0800)]
command.py: add parseConfigurationFiles API

The parseConfigurationFiles API calls the related function in
cooker.py to parse config files.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: add a new option "--server-only"
Dongxiao Xu [Fri, 6 Jan 2012 09:02:29 +0000 (17:02 +0800)]
bitbake: add a new option "--server-only"

Create a new option "--server-only" for bitbake command, which allows
bitbake runs as a server, and let frontend connect the server itself.

"--server-only" should work with "-t xmlrpc", or bitbake will exit.

bitbake --server-only -t xmlrpc will print out the server address and
port information.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker: remove command import in cooker.py
Dongxiao Xu [Fri, 6 Jan 2012 09:02:28 +0000 (17:02 +0800)]
cooker: remove command import in cooker.py

There is no direct use of command in cooker.py, and it is using
bb.command instead. Remove command in the import list.

This fixes a problem of embedded import between command.py and
cooker.py.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker: remove command import in cooker.py
Dongxiao Xu [Fri, 6 Jan 2012 09:02:28 +0000 (17:02 +0800)]
cooker: remove command import in cooker.py

There is no direct use of command in cooker.py, and it is using
bb.command instead. Remove command in the import list.

This fixes a problem of embedded import between command.py and
cooker.py.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoxmlrpc: Change BitbakeServerInfo init function
Dongxiao Xu [Fri, 6 Jan 2012 09:02:27 +0000 (17:02 +0800)]
xmlrpc: Change BitbakeServerInfo init function

Pass host and port to BitbakeServerInfo class instead of the "server"
instance. With this change, GUI can connect with server individually
by host address and port.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocommand.py: add initCooker API
Dongxiao Xu [Fri, 6 Jan 2012 09:02:22 +0000 (17:02 +0800)]
command.py: add initCooker API

initCooker is to set the cooker to the initial state with nothing
parsed.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker: user bb.configuration.data to inject events
Dongxiao Xu [Fri, 6 Jan 2012 09:02:21 +0000 (17:02 +0800)]
cooker: user bb.configuration.data to inject events

For buildTargets function, we use bb.configuration.data as parameter
to inject events, since in hob environment, some variables are
modified dynamically and bb.configuration.event_data may out of date.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocommand.py: Modify needcache value for certain functions
Dongxiao Xu [Fri, 6 Jan 2012 09:02:19 +0000 (17:02 +0800)]
command.py: Modify needcache value for certain functions

for findConfigFiels() and findFilesMatchingInDir() functions, they
don't need to parse all the bb files, thus setting the needcache
value to be False.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker.py: Add missing BB_WORKERCONTEXT conditionals
Richard Purdie [Thu, 5 Jan 2012 13:01:36 +0000 (13:01 +0000)]
cooker.py: Add missing BB_WORKERCONTEXT conditionals

Its desireable to run be able to execute bitbake tasks directly, only
loading as much of the cooker is as necessary to do this. This use case
can be identified by the BB_WORKERCONTEXT variable. There were a couple
of places cooker code needed to be conditional on this but wasn't. This
brings in the missing conditionals from poky where those code paths
are used more heavily completing the support in master.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/runqueue: Improve the setscene logging
Richard Purdie [Mon, 21 Nov 2011 14:40:37 +0000 (14:40 +0000)]
bitbake/runqueue: Improve the setscene logging

When debugging setscene problems it was found that some extra debug messages were useful.
This patch adds them.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker.py: Convert a bb.data.expand refernce to the updated syntax
Richard Purdie [Thu, 5 Jan 2012 12:57:12 +0000 (12:57 +0000)]
cooker.py: Convert a bb.data.expand refernce to the updated syntax

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/git: change colon to dot in ud.host
Juraj Hercek [Thu, 22 Dec 2011 14:21:12 +0000 (15:21 +0100)]
fetch2/git: change colon to dot in ud.host

Local cloning of git repositories from DL_DIR into WORKDIR fails when
using ssh URL with port specification e.g.
"ssh://user@host:port/path/to/repo.git". Git fetcher clones such remote
repository into "${DL_DIR}/git2/host:port.path.to.repo.git". However,
when clonging from ${DL_DIR}/git2/host:port.path.to.repo.git into
${WORKDIR}, git fetcher fails with "ssh: Could not resolve hostname
${DLDIR}/git2/host: Name or service not known".

A solution is to replace ":" by "." in host component, similarly as it
is done when replacing "/" with "." in path component, so that local
clone directory in DL_DIR looks like this: "host.port.path.to.repo.git".

Signed-off-by: Juraj Hercek <juraj.hercek@jhksoftware.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake-layers: fix Python error during parse
Paul Eggleton [Thu, 29 Dec 2011 14:34:12 +0000 (14:34 +0000)]
bitbake-layers: fix Python error during parse

If "bitbake-layers show_layers" was run when the cache was dirty forcing
a parse, it failed with the following error:

ERROR: Failure expanding variable SRCPV, expression was
${@bb.fetch2.get_srcrev(d)} which triggered exception AttributeError:
'module' object has no attribute 'fetch2'

A simple import of bb.fetch2 in bitbake-layers fixes this.

Fixes [YOCTO #1855].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/hobprefs: trigger a reparse after changing IMAGE_FSTYPES
Joshua Lock [Tue, 13 Dec 2011 22:45:42 +0000 (14:45 -0800)]
ui/crumbs/hobprefs: trigger a reparse after changing IMAGE_FSTYPES

As reported on the mailing list[1] when changing IMAGE_FSTYPES through the
hob preferences a reparse is required before the changes will be picked up
by the system. This patch sets the reload_required property of the class to
true when the image types have been modified to ensure the reparse is
triggered.

1. https://lists.yoctoproject.org/pipermail/yocto/2011-December/006002.html

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/runningbuild: handle InvalidTask events
Joshua Lock [Tue, 13 Dec 2011 22:45:41 +0000 (14:45 -0800)]
ui/crumbs/runningbuild: handle InvalidTask events

The knotty UI just ignores these and so should RunningBuild, if these events
aren't handled the UI appears to hang.

Fixes [YOCTO #1665]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agovim/syntax: Recognize ?? operator
Khem Raj [Sat, 10 Dec 2011 18:25:57 +0000 (10:25 -0800)]
vim/syntax: Recognize ?? operator

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosiggen.py: If both sigs have a variable in it's whitelist then don't say it's changed
Matthew McClintock [Wed, 30 Nov 2011 17:24:55 +0000 (11:24 -0600)]
siggen.py: If both sigs have a variable in it's whitelist then don't say it's changed

Some BB_HASHBASE_WHITELIST variables are in the lists of variable
dependencies for signatures. Ignore those differences in lists
since this difference does not matter

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRemove the async_cmds and sync_cmds from command.py
Robert Yang [Wed, 30 Nov 2011 09:23:51 +0000 (17:23 +0800)]
Remove the async_cmds and sync_cmds from command.py

In bitbake/lib/bb/command.py::Command::__init__, we have the following
lines:

for attr in CommandsSync.__dict__:
    command = attr[:].lower()
    method = getattr(CommandsSync, attr)
    sync_cmds[command] = (method)

for attr in CommandsAsync.__dict__:
    command = attr[:].lower()
    method = getattr(CommandsAsync, attr)
    async_cmds[command] = (method)

The sync_cmds and async_cmds are defined as global dictionaries, but it
seems that we've never used them (I did a "grep -r async_cmds bitbake/",
, there is no result except the ones that I have removed), and I can't
find the history of it from "git log -p", I guess that they have been
replaced by the self.cmds_sync and self.cmds_async.

[YOCTO #1791]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabled
Joshua Lock [Fri, 2 Dec 2011 18:58:35 +0000 (10:58 -0800)]
fetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabled

BB_STRICT_CHECKSUM caused a backtrace as the FetchError parameters are
incorrectly specified such that FetchError is being passed 8 params
when it's expecting 3. This fixes the parameters so we're passing a
formatted string and the url.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker.py: Allow the -e option to work with virtual classes and -b
Richard Purdie [Thu, 1 Dec 2011 23:11:24 +0000 (23:11 +0000)]
cooker.py: Allow the -e option to work with virtual classes and -b

Using bitbake -e -b virtual:xxxx:/path/to/the.bb would result in
zero matches since the virtual:xxxx piece wasn't being processed.

This adds in the necessary functionality to handle it correctly.

[YOCTO #1793]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild.py: Be determistic about a function's cwd
Richard Purdie [Thu, 1 Dec 2011 11:58:41 +0000 (11:58 +0000)]
build.py: Be determistic about a function's cwd

There is a subtle but nasty problem that a function's cwd can vary
depending on whether ${B} (often ${S}) exists before the funciton is
called or not. Most functions in the system can cope with this but
its bad practise and I've just witnessed build failures resulting
from this during image generation from bootimg.bbclass. I also
suspect this could explain some odd fetcher behaviour witnessed in
the past.

This change ensures we always call funcitons with a specific build
directory making things deterministic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoUpdate users of getVar/setVar to use the data store functions directly
Richard Purdie [Fri, 25 Nov 2011 14:57:53 +0000 (14:57 +0000)]
Update users of getVar/setVar to use the data store functions directly

(From Poky rev: affd0907253387cee0ba0c7e9f92bcc109895446)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/siggen.py: Don't backtrace if the taskhash data isn't present
Richard Purdie [Fri, 25 Nov 2011 11:20:33 +0000 (11:20 +0000)]
bitbake/siggen.py: Don't backtrace if the taskhash data isn't present

This allows the code to safely fall back to dumping the basehash data
if the taskhash data isn't present for some reason. We could effecitvely
obsolete the runtime option and use this approach instead exclusively.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoNothing uses USERNAME, remove it - can cause sstate-cache conflicts
Matthew McClintock [Thu, 24 Nov 2011 01:11:27 +0000 (19:11 -0600)]
Nothing uses USERNAME, remove it - can cause sstate-cache conflicts

USER is the correct variable to use, also this can affect sstate
cache as well.

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodata/siggen: Add vardepvalue mechanism to allow the variable dependency code to be...
Richard Purdie [Thu, 24 Nov 2011 17:41:02 +0000 (17:41 +0000)]
data/siggen: Add vardepvalue mechanism to allow the variable dependency code to be forced to specific values

We have a problem if we want to inject specific information into the variable
dependency code. There are cases for example where we want a dependency
on the value of X but it doesn't matter how X was constructed or what
dependencies it might have had, we only care about the absolute value.
With the current code, its near enough impossible to do this.

This patch adds such a mechanism so the user can trigger this with code like:

baselib[vardepvalue] = "${baselib}"

It also refactors some of the code so we do variable lookups once
instead of doing this in two different functions.

[YOCTO #1583]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2: Improve uri_replace to handle paths with no trailing '/'
Richard Purdie [Thu, 24 Nov 2011 16:11:26 +0000 (16:11 +0000)]
fetch2: Improve uri_replace to handle paths with no trailing '/'

Currently if you specify a mirror like:

file://.* http://linux.freescale.net/yocto/sstate-cache

it won't work as you expect whilst:

file://.* http://linux.freescale.net/yocto/sstate-cache/

will since it has the trailing slash.

This patch handles both cases correctly. It also adds some debug to
the uri_replace function since its near impossible to debug it without
some kind of output.

[YOCTO #1578]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoknotty: Add support for logging the console to logfile
Richard Purdie [Thu, 24 Nov 2011 14:45:37 +0000 (14:45 +0000)]
knotty: Add support for logging the console to logfile

The BB_CONSOLELOG variable is used to specify the console log file
to use. This means people can look up things that happened during a
build by may have scrolled off the screen.

[YOCTO #1771]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue.py: Fix debug message to reference the correct task
Richard Purdie [Thu, 24 Nov 2011 14:14:55 +0000 (14:14 +0000)]
runqueue.py: Fix debug message to reference the correct task

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/local: Don't default to files in DL_DIR for file:// urls
Richard Purdie [Thu, 24 Nov 2011 13:56:52 +0000 (13:56 +0000)]
fetch2/local: Don't default to files in DL_DIR for file:// urls

Defaulting to any file in DL_DIR as the first match for a file:// url
doesn't make much sense and can lead to unexpected results.

This patch changes the logic so this is the last fallback location
instead. Whether it should be using DL_DIR at all for this is a
good question but something for another patch.

[YOCTO #1710]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosiggen.py: sort task hash depedencies with basepath
Matthew McClintock [Wed, 23 Nov 2011 08:04:00 +0000 (02:04 -0600)]
siggen.py: sort task hash depedencies with basepath

Without this patch the tash hash dependencies can be in a order
that is dependent upon directory/filesystem layout. With this
change the data is sorted the same regardless.

Without this the dependent hashes could be in different orders
on different systems and consequently final md5 hash would differ
as well even though nothing else changed.

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: print out symmetric difference when comparing sigs
Matthew McClintock [Wed, 23 Nov 2011 08:08:50 +0000 (02:08 -0600)]
bitbake: print out symmetric difference when comparing sigs

This is useful for really longs lists to pinpoint what has
actually changed

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue.py: Ensure we fully process the covered list
Richard Purdie [Mon, 21 Nov 2011 14:02:00 +0000 (14:02 +0000)]
runqueue.py: Ensure we fully process the covered list

The existing looping code can mask an existing "found = True"
by forcing it to False each time. This can lead to dependency
lists not being fully searched and results in dependency errors.

An exmaple of this was the autobuilder building linux-yocto from
sstate but then rebuilding some of the recipe's tasks for no
apparent reason. Separating the logic into two variables solves this
problem since any "found = True" value is now always preserved.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue.py: Ensure setscene tasks don't break dependency order
Richard Purdie [Wed, 23 Nov 2011 12:38:44 +0000 (12:38 +0000)]
runqueue.py: Ensure setscene tasks don't break dependency order

If A depends upon B which depends upon C and the setscene for B
succeeds but C is going to get rebuilt, we should wait for C to
try and build A but currently we don't.

This is due to the timing of when we run the task_skip() as this
triggers other tasks to become buildable. This patch moves the timing
of that call to a more appropriate place allowing dependencies to
behave as expected.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue.py: Add BB_SETSCENE_VERIFY_FUNCTION hook
Richard Purdie [Mon, 21 Nov 2011 14:34:23 +0000 (14:34 +0000)]
bitbake/runqueue.py: Add BB_SETSCENE_VERIFY_FUNCTION hook

The OE metadata has cases where it needs to prevent some setscene
functions from running. An example of this is where we know a task
is going to run do_configure (which would clean out do_populate_sysroot)
and hence we don't want do_populate_sysroot_setscene to run.

This change adds in a hook so that the metadata can allow any
such policy decision to filter back up to bitbake.

It removes the existing code which attempted to do this in a generic
way but failed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue.py: Sort the list of skipped tasks as it makes searching the list...
Richard Purdie [Mon, 21 Nov 2011 14:40:21 +0000 (14:40 +0000)]
bitbake/runqueue.py: Sort the list of skipped tasks as it makes searching the list easier when debugging

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue.py: Fix incorrect task number reference in debug message
Richard Purdie [Mon, 21 Nov 2011 14:39:29 +0000 (14:39 +0000)]
bitbake/runqueue.py: Fix incorrect task number reference in debug message

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoparse_py: Use absolute paths for FILE
Richard Purdie [Fri, 18 Nov 2011 14:21:15 +0000 (14:21 +0000)]
parse_py: Use absolute paths for FILE

Its possible for relative paths to creep into FILE. These confuse the
build system no end as its not clear where they might be releative to.

This patch ensures we always use resolved absolute paths for FILE
so that things behave in a deterministic way.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosiggen.py: Include list of variables in hashes
Richard Purdie [Thu, 17 Nov 2011 14:01:06 +0000 (14:01 +0000)]
siggen.py: Include list of variables in hashes

Ensure that the list of dependencies is included in the hash
as well as their contents

Prior to this, adding or removing dependencies with values
of "None" would not change the hash, despite diffsigs reporting
this difference.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosiggen.py: Fix diffsigs output for filename comparisions
Richard Purdie [Thu, 17 Nov 2011 14:02:06 +0000 (14:02 +0000)]
siggen.py: Fix diffsigs output for filename comparisions

When comparing sig files, if the recipe locations had changed, the
dependent tasks list would show as changed even if the actual hash
had not changed. This updates the code to only compare the base part
of the pathnames.

It also tweaks some of the output to add newlines to aid comparing
two lists of variables as it makes the location of the difference
clearer.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bb/runqueue: avoid marking runtime dependencies as covered
Paul Eggleton [Fri, 11 Nov 2011 18:38:15 +0000 (18:38 +0000)]
lib/bb/runqueue: avoid marking runtime dependencies as covered

The code which populates setscene_covered list was adding a task to the
covered list if all of the tasks that depend upon it were also covered;
however, this means that tasks that would have installed "runtime"
dependencies were being marked as covered also, e.g. gmp-native and
mpfr-native are needed by gcc-cross at runtime since they are shared
libraries that gcc links to, but their do_populate_sysroot tasks were
being marked as covered, resulting in failures later on if gcc-cross was
available from sstate but mpfr-native and gmp-native weren't.

Since we currently have no real way to handle runtime dependencies for
native packages, add a workaround which avoids marking tasks as covered
if one or more of their revdeps are from a different recipe.

Fixes [YOCTO #1536].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodata_smart: Add appendVar/prependVar functions
Richard Purdie [Tue, 8 Nov 2011 18:02:15 +0000 (18:02 +0000)]
data_smart: Add appendVar/prependVar functions

This patch adds appendVar and prependVar functions to the data store
meaning python code would no longer have to do the getVar, append and
the setVar dance that much of the current python code does.

It also adds corresponding variants for flags.

Currently there is no spacing added by these functions. That could be
added as a parameter if desired.

If these functions turn out to be hotspots in the code, there are tricks
that could potentially be used to increase the speed of these specific
operations within the datastore.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoAdd FAKEROOTNOENV variable
Richard Purdie [Tue, 8 Nov 2011 22:19:38 +0000 (22:19 +0000)]
Add FAKEROOTNOENV variable

Add a FAKEROOTNOENV which does the opposite of the FAKEROOTENV variable
and is data loaded into the environment for tasks without the fakeroot
flag.

The intent here is to provide a way to control the environment when we
aren't needing fakeroot context which allows us to unload the preload
from memory entirely and gain a valuable speedup.

I'm not 100% happy with needing this at the bitbake level, particularly
with the cache hit but it does give a valuable speedup.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker.py: Ensure only one copy of bitbake executes at once
Richard Purdie [Tue, 8 Nov 2011 17:52:44 +0000 (17:52 +0000)]
cooker.py: Ensure only one copy of bitbake executes at once

The bitbake codebase makes assumptions that only one copy is active
against a given build directory at a given time. This patch adds a
lockfile in TOPDIR to ensure that is the case.

Note that no unlock is needed, that is automatically dropped when
execution terminates.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoutils.py: Fix lockfile retry handling
Richard Purdie [Tue, 8 Nov 2011 17:49:32 +0000 (17:49 +0000)]
utils.py: Fix lockfile retry handling

The lockfile retry parameter is expected to return immediately after
attempting to take the lock. There was a bug in the logic which this
patch fixed to ensure it does that.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocodeparser: silence non-literal warnings for vardeps
Christopher Larson [Fri, 4 Nov 2011 18:59:46 +0000 (14:59 -0400)]
codeparser: silence non-literal warnings for vardeps

If the vardeps flag is not None, we now silence the warnings about
non-literal usage for that variable.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
8 years agocodeparser: drop expand tracking
Christopher Larson [Sat, 29 Oct 2011 03:06:18 +0000 (23:06 -0400)]
codeparser: drop expand tracking

There are two usual cases involving bb.data.expand:

- Calling it with a string literal -- "bb.data.expand('${FOO}/${BAZ}/bleh', d)".
- Calling it on getVar results (legacy) -- "bb.data.expand(bb.data.getVar('FOO', d), d)"

Nothing in any of the usual layers uses it in any other way, and I'm
having trouble coming up with any real use cases beyond this. The first
of the above cases is already tracked, via the expandWithRefs called
on the python code string. The second didn't emit a warning anyway,
since the getVar was already handled.

Given this, I see no reason for us to maintain explicit expansion
tracking. Further, we weren't using its results anyway (the var_expands
member).

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
8 years agocodeparser: accept a name for better messages
Christopher Larson [Sat, 29 Oct 2011 01:32:26 +0000 (21:32 -0400)]
codeparser: accept a name for better messages

- If a name is passed to the parser, prepend the messages with "while
  parsing <name>:". This gives a bit more context.
- Tweak the warning messages slightly (they had to be altered anyway to
  inject the variable being parsed).

Before:
  DEBUG: Warning: in call to 'bb.data.getVar': argument ''%s' % var' is \
         not a literal

After:
  DEBUG: while parsing emit_pkgdata, in call of bb.data.getVar, argument \
         ''%s' % var' is not a string literal

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
8 years agocodeparser: simplify how we compare the called node names
Christopher Larson [Fri, 28 Oct 2011 05:37:11 +0000 (22:37 -0700)]
codeparser: simplify how we compare the called node names

With the previous method, using the compare_name methods, we split the
requested match name by '.', reversed it, then compared them piecemeal
during the node traversal. The new method walks the nodes and hands back
the name of what's being called, and then we check that. This also
consolidates the two different implementations of traversal of the
attribute/name nodes (one in compare_name, one for the execs).

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agocodeparser: merge the nested python parsing classes
Christopher Larson [Fri, 28 Oct 2011 05:23:05 +0000 (22:23 -0700)]
codeparser: merge the nested python parsing classes

The split is even less necessary now that we use ast.walk rather than an
actual NodeVisitor subclass.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agoIncrement version post release
Richard Purdie [Thu, 3 Nov 2011 17:13:34 +0000 (17:13 +0000)]
Increment version post release

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRelease 1.14.0 origin/1.14 1.14.0
Richard Purdie [Thu, 3 Nov 2011 17:12:36 +0000 (17:12 +0000)]
Release 1.14.0

8 years agocodeparser: make var_expands actually hold useful information
Christopher Larson [Fri, 28 Oct 2011 05:45:04 +0000 (22:45 -0700)]
codeparser: make var_expands actually hold useful information

Previously, it was calling var_expands.update() rather than add(), with
a string argument, resulting in adding each character of that string to
the var_expands set, rather than the string itself.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agoMerge branch 'master' of git.openembedded.org:bitbake
Richard Purdie [Thu, 27 Oct 2011 07:03:24 +0000 (08:03 +0100)]
Merge branch 'master' of git.openembedded.org:bitbake

8 years agoLinefeed to test commits
Cliff Brake [Wed, 26 Oct 2011 11:48:53 +0000 (07:48 -0400)]
Linefeed to test commits

8 years agodoc: update manual for checksum changes
Joshua Lock [Tue, 11 Oct 2011 20:15:15 +0000 (13:15 -0700)]
doc: update manual for checksum changes

Document the ability to use SRC_URI parameters for checksums

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agofetch2: enable checksum definition as SRC_URI parameter
Joshua Lock [Tue, 11 Oct 2011 16:42:13 +0000 (09:42 -0700)]
fetch2: enable checksum definition as SRC_URI parameter

URI parameters should be able to be defined as a parameter of the SRC_URI,
this patch enables thus for checksums.

An example;

SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz;md5sum=a3270bab3f4b69b7dc6dbdacbcae9745;sha256sum=3ba691ee2431f32ccb8efa131e59bf23e37f122dc66791309023ca6dcefcd10e"

Addresses the remainder of [YOCTO #1399]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agofetch2: improve usability of checksums
Joshua Lock [Tue, 11 Oct 2011 00:24:41 +0000 (17:24 -0700)]
fetch2: improve usability of checksums

This patch improves the usability of checksums by only requiring one checksum
be defined.

Further, checksum verification will provide as much information as possible
at, rather than a bit at a time. No longer will you need to run fetch, see an
md5sum mismatch, fix it, run fetch, seen an sha256sum mismatch, fix it and
fetch again. If neither checksum is defined we now report both missing sums
at once - rather than one after the other.
Finally, if both sums are incorrect, we'll report both incorrect sums at the
same time.

Fixes part of [YOCTO #1399]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: fix backtrace when dismissing open dialog
Joshua Lock [Tue, 11 Oct 2011 17:16:02 +0000 (10:16 -0700)]
hob: fix backtrace when dismissing open dialog

Clearly a logic/indentation error - we should only try and load the recipe
should the file-chooser return OK.

Fixes [YOCTO #1668]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agofetch2: Export additional variables to the fetchers
Matthew McClintock [Tue, 4 Oct 2011 19:08:37 +0000 (14:08 -0500)]
fetch2: Export additional variables to the fetchers

git could need these environment variables when working behind
a proxy

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: Make git fetch run with -f so rebased branches don't fail
Matthew McClintock [Tue, 27 Sep 2011 21:41:39 +0000 (16:41 -0500)]
fetch2/git: Make git fetch run with -f so rebased branches don't fail

git fetches can fail (or at least return failed) when trying to
fetch and prune rebased branches. This patch simply adds a -f
to the git fetch command so these failure are ignore

Generally, if some SHA was rebased away it's not coming back so
there is no point in not doing this force

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/lib/bb/msg.py: fix setting debug and verbosity levels
Paul Eggleton [Fri, 23 Sep 2011 16:05:00 +0000 (17:05 +0100)]
bitbake/lib/bb/msg.py: fix setting debug and verbosity levels

The debug and verbosity levels (as set by the -D and -v command line
options respectively)  were not being passed through within msg.py since
bitbake revision 45aad2f9647df14bcfa5e755b57e1ddab377939a due to
incorrect variable names.

Fixes [YOCTO #1513].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
8 years agohob: store recipe path at load time
Joshua Lock [Fri, 23 Sep 2011 23:32:52 +0000 (16:32 -0700)]
hob: store recipe path at load time

This fixes the internal dirtiness tracking such that if the Save menu item
is selected after loading a recipe the existing file is updated rather than
the user being prompted for the path to create a recipe at.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: fix building with current selections after reparse
Joshua Lock [Fri, 23 Sep 2011 20:19:16 +0000 (13:19 -0700)]
hob: fix building with current selections after reparse

After the reparse we were setting the model to reflect the values before
the reparse was triggered but clearing the internal variables used to test
whether these values are set, leading to the UI erroneously reporting that
selections had not been made.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobeventhandler: fix variable name typo
Joshua Lock [Fri, 23 Sep 2011 20:14:02 +0000 (13:14 -0700)]
ui/crumbs/hobeventhandler: fix variable name typo

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobeventhandler: move remaining getVariable calls to init
Joshua Lock [Fri, 23 Sep 2011 20:13:17 +0000 (13:13 -0700)]
ui/crumbs/hobeventhandler: move remaining getVariable calls to init

Instead of calling getVariable commands each time the BBPATH and BBFILES
entries need testing cache the results as a member variable at object
instantiation.

Fixes [YOCTO #1521]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoFix mercurial fetcher in fetch2
Julian Pidancet [Wed, 21 Sep 2011 01:14:54 +0000 (02:14 +0100)]
Fix mercurial fetcher in fetch2

The _build_revision method in Hg class gets called with the wrong number
of arguments. This tiny patch adds a 5th argument to the method
declaration to prevent python from throwing an exception.

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agohob: fix opening of image output dir on image build completion
Joshua Lock [Wed, 21 Sep 2011 01:08:28 +0000 (18:08 -0700)]
hob: fix opening of image output dir on image build completion

Firstly, rather than polling the DEPLOY_DIR_IMAGE directory each time an
image is built store the variable as a member of the hobeventhandler.
Secondly emit the generic "build-complete" signal *after* the specialised
"build-failed" or "build-succeeded" signals such that the appropriate
state variables are set before we try and use them.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/runningbuild: fix log messages right-click menu
Joshua Lock [Wed, 21 Sep 2011 00:12:09 +0000 (17:12 -0700)]
ui/crumbs/runningbuild: fix log messages right-click menu

Pass the correct callback name to the connect method.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: enable package only builds even if an image has been built
Joshua Lock [Mon, 19 Sep 2011 22:28:09 +0000 (15:28 -0700)]
hob: enable package only builds even if an image has been built

Once an image build has been performed the selected_image variable would
prevent the package only build choice being triggered - by setting the
variable to None on reset we are able to perform package only builds after
an image build.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: fix build again when building packages only
Joshua Lock [Mon, 19 Sep 2011 22:25:45 +0000 (15:25 -0700)]
hob: fix build again when building packages only

The different code paths for package vs image builds have lead to some bit
rot in the package only build and an incompatability between package only
builds and the build again mechanism.

This patch unifies the code paths and fixes build again for package only
builds.

Fixes [YOCTO #1480]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobprefs: re-enable reloading of data after prefs changes
Joshua Lock [Wed, 14 Sep 2011 23:27:28 +0000 (16:27 -0700)]
ui/crumbs/hobprefs: re-enable reloading of data after prefs changes

When disabling the toolchain w/ headers checkbox in an early commit I
accidentally disabled too much code. This re-enables adding the custom
response handler to the Preferences dialog which triggeres a reparse of
the metadata when appropriate preference changes are made.

Fixes [YOCTO #1479]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agofetch2/git: fix subpath destination directory
Paul Eggleton [Sat, 17 Sep 2011 11:03:47 +0000 (12:03 +0100)]
fetch2/git: fix subpath destination directory

Make the git fetcher's subpath (path within the git repo to fetch)
option set the destsuffix (destination directory) option by default.
This reverts the behaviour of subpath to the same as when it was
introduced.

Based on a patch by Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: be more carefull in _contains_ref when checking git log output
Martin Jansa [Fri, 16 Sep 2011 07:38:22 +0000 (09:38 +0200)]
fetch2/git: be more carefull in _contains_ref when checking git log output

* in some cases there could be output like this
  ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored.
  before wc -l output and returned 'output.split()[0] != 0' is always True

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>