bitbake.git
7 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

7 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>
7 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

7 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>
8 years agofetch2/git: fix logger.debug
Martin Jansa [Mon, 19 Sep 2011 07:58:41 +0000 (09:58 +0200)]
fetch2/git: fix logger.debug

* logging/logger typo was fixed in 38a598731b49c8a0ba0ede570adc33eb1e848235
  but debug level is still missing

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/wget: make checkstatus() quieter
Joshua Lock [Wed, 14 Sep 2011 22:40:58 +0000 (15:40 -0700)]
fetch2/wget: make checkstatus() quieter

Change the wget fetcher to not emit the commands output when calling checkstatus, this
matches the behaviour of the git fetchers checkstatus() method.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker.py: Fix key expansion issues in showVersions
Richard Purdie [Mon, 19 Sep 2011 04:53:07 +0000 (05:53 +0100)]
cooker.py: Fix key expansion issues in showVersions

bitbake -s was not displaying correct version information when the
PREFERRED_VERSION string contains other variables. The actual built
versions would differ since the providers.py functions were called
with expanded keys at this point.

This patch expands keys for showVersions bringing everything into
sync correctly.

[YOCTO #1493]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogit.py: Fix logging vs logger typo
Richard Purdie [Sat, 17 Sep 2011 11:11:04 +0000 (12:11 +0100)]
git.py: Fix logging vs logger typo

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotaskdata: fix string formatting of an error message
Christopher Larson [Wed, 14 Sep 2011 17:43:48 +0000 (10:43 -0700)]
taskdata: fix string formatting of an error message

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agohob: correctly set the selected image when loading a recipe
Joshua Lock [Fri, 9 Sep 2011 01:10:29 +0000 (18:10 -0700)]
hob: correctly set the selected image when loading a recipe

When the user saves their recipe based on an existing image type, loads it
in a newly run hob instance and clicks bake they should not be asked about
building packages vs an empty image up.

Partially addresses [YOCTO #1468]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: correctly handle an exception
Joshua Lock [Fri, 9 Sep 2011 01:00:13 +0000 (18:00 -0700)]
hob: correctly handle an exception

It doesn't matter if we can't remove the temprorary file, for some reason,
so catch the exception and ignore it.

Partially addresses [YOCTO #1468]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build
Joshua Lock [Fri, 9 Sep 2011 00:59:20 +0000 (17:59 -0700)]
ui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build

There's no need to check the BBPATH and BBFILES are set correctly each
build when running multiple builds for one launch of the UI.

Partially addresses [YOCTO #1468]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobeventhandler: fix test for BBFILES
Joshua Lock [Thu, 8 Sep 2011 21:50:01 +0000 (14:50 -0700)]
ui/crumbs/hobeventhandler: fix test for BBFILES

It seems we have a race whereby the image_dir variable may not be set
before it's tested for, since the variable is always the same set it in the
initialiser.

Partially addresses [YOCTO #1468]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agorunqueue.py: Ensure fakeroot variables are reflected in the datastore
Richard Purdie [Fri, 9 Sep 2011 18:07:40 +0000 (19:07 +0100)]
runqueue.py: Ensure fakeroot variables are reflected in the datastore

Without this, variables can be set to one thing in one part of the environment and something
different in another part. This change ensures the datastore and the environment
are consistent.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue: Ensure task environment is correct
Richard Purdie [Fri, 9 Sep 2011 17:25:41 +0000 (17:25 +0000)]
runqueue: Ensure task environment is correct

This fixes two problems:

a) Variables which were in the parent environment but not set as "export"
   variables in the datastore could end up in the task environment

b) oe.environ.update() can't cope with the generator returned by
   bb.data.exported_vars()

Whilst the updated code isn't as neat, it does do the expected thing,
sets the environment correctly and stops unwanted values leaking into
the task environment.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bb/siggen.py: return a string from noop get_taskhash
Dmitry Eremin-Solenikov [Sun, 21 Aug 2011 07:57:40 +0000 (11:57 +0400)]
lib/bb/siggen.py: return a string from noop get_taskhash

OpenEmbedded is expecting to get a string from get_taskhash, but noop siggen
returns just 0 (number), so OE classes/sstate.bbclass barfs badly. Fix that.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agohob: fix segfault on second build
Paul Eggleton [Mon, 5 Sep 2011 12:30:11 +0000 (13:30 +0100)]
hob: fix segfault on second build

Some internal lists were not being cleared, resulting in incorrect
program flow on the second build, causing a structure to be accessed
incorrectly which resulted in a segfault.

Fixes [YOCTO #1332]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agohob: clear out temporary file list after deleting
Paul Eggleton [Mon, 5 Sep 2011 12:30:10 +0000 (13:30 +0100)]
hob: clear out temporary file list after deleting

If you don't clear out files_to_clean after the files get deleted and
then you run a second build, it will try to delete the files from the
first build and you will get a "No such file or directory" error.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agohob: disable removal of packages
Joshua Lock [Fri, 2 Sep 2011 23:53:32 +0000 (16:53 -0700)]
hob: disable removal of packages

It's felt that the stability of package deselection is not sufficient for
the upcoming release and thus package removal should be disabled.

I'd actually like to see this patch, or its effects, reverted as soon as
the release bits have been frozen so that this issue can continue to be
worked on.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/runningbuild: mask run_buildstats failure
Joshua Lock [Fri, 2 Sep 2011 23:39:23 +0000 (16:39 -0700)]
ui/crumbs/runningbuild: mask run_buildstats failure

The buildstats handler causes an exception with: "'NoneType' object has no
attribute 'startswith'" early a build via hob, leaving a glaring red row
which means nothing to the user.
Mask this error until such a time as we have opportunity to correctly
diagnose and fix the root problem.

Workaround fix for [YOCTO #1433]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobprefs: disable 'build toolchain with headers'
Joshua Lock [Fri, 2 Sep 2011 23:02:50 +0000 (16:02 -0700)]
ui/crumbs/hobprefs: disable 'build toolchain with headers'

The generic meta-toolchain-sdk we are currently building when this option
is enabled is likely unsuitable for the majority of images built with hob.
Remove this option from the Preferences UI until such a time as we can
correctly implement this feature to include the library headers for the
selected packages.

Addresses [YOCTO #1302]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: add a test to ensure hob is run with the required pre and post files
Joshua Lock [Fri, 2 Sep 2011 21:29:38 +0000 (14:29 -0700)]
hob: add a test to ensure hob is run with the required pre and post files

hob requires pre and post configuration files to store configuration values
in, whilst this should (and will) be fixed long-term for so long as we
require these files we should alert the user should they run without them.

Fixes [YOCTO #1383]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: reflect defaultsetup being default distro
Joshua Lock [Fri, 2 Sep 2011 17:17:52 +0000 (10:17 -0700)]
hob: reflect defaultsetup being default distro

If no value is set for DISTRO the defaultsetup policy is used, reflect this
in the UI by having defaultsetup selected in the Distribution combo when no
other DISTRO is set.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: use both pre and post files for hob configuration
Joshua Lock [Fri, 2 Sep 2011 03:38:10 +0000 (20:38 -0700)]
hob: use both pre and post files for hob configuration

We need to set various variables *before* parse begins, the simplest way
to ensure this is to use a pre configuration file for the relevant
configuration entries.

This series adapts hob to use both pre and post files to store its
configuration. Any variables which affect initial parse are set in the pre
file and all others in the post file.

Unfortunately this requires hob related code to have even more hard-coded
data as to what is relevant but this is the simplest way to solve issues
with variables and parse order at this time.

Addresses [YOCTO #1281]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobitbake/event: Allow event handlers to quietly raise SkipPackage events
Richard Purdie [Fri, 2 Sep 2011 12:58:54 +0000 (13:58 +0100)]
bitbake/event: Allow event handlers to quietly raise SkipPackage events

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: Allow to specify the name of the checkout directory
Holger Hans Peter Freyther [Wed, 22 Jun 2011 20:50:13 +0000 (04:50 +0800)]
fetch2/git: Allow to specify the name of the checkout directory

Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2/git: Ensure .gitconfig file is ignored
Richard Purdie [Tue, 30 Aug 2011 20:39:58 +0000 (20:39 +0000)]
bitbake/fetch2/git: Ensure .gitconfig file is ignored

If a user has a ~/.gitconfig file, git fetch --all will reference it. To avoid
this we should run git fetch with an explicit url telling it to fetch all
references (which includes tags).

I'm assured this means git won't reference the file, see the discussion on the
git mailing list (subject Overriding ~/.gitconfig using GIT_CONFIG).

[YOCTO #1134]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: Correctly handle multiline comments including whitespace
Richard Purdie [Tue, 30 Aug 2011 16:46:46 +0000 (16:46 +0000)]
bitbake: Correctly handle multiline comments including whitespace

If metadata contains:

"""

FOO = "bar"
"""

The variable FOO should get set to "bar" but doesn't due to the empty lines
be swallowed by the parser and FOO becomming part of the multiline comment.
This patch corrects that behaviour so FOO is set as expected.

[YOCTO #1377]

This patch fixes parsing of multiline comments so lines ending with \
behave consistently and we warn users where there is something happening
they likely don't expect.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoui/crumbs/tasklistmodel: don't add empty entries to COL_BINB
Joshua Lock [Tue, 30 Aug 2011 17:55:14 +0000 (10:55 -0700)]
ui/crumbs/tasklistmodel: don't add empty entries to COL_BINB

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: loop optimisation in include_item()
Joshua Lock [Tue, 30 Aug 2011 16:32:48 +0000 (09:32 -0700)]
ui/crumbs/tasklistmodel: loop optimisation in include_item()

Rather than trying to iterate the model to find whether the item is already
included and then iterate the model again to find the items path attempt to
find the path first and if the path is found test whether the COL_INC of
the row is set.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: remove unnecessary check
Joshua Lock [Tue, 30 Aug 2011 16:31:05 +0000 (09:31 -0700)]
ui/crumbs/tasklistmodel: remove unnecessary check

Cheaper to set COL_INC to True regardless of whether it's already set.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: optimise find_path_for_item()
Joshua Lock [Tue, 30 Aug 2011 16:15:35 +0000 (09:15 -0700)]
ui/crumbs/tasklistmodel: optimise find_path_for_item()

Rather than calling get_path() for each iterated value use the get_value()
method to lookup the COL_NAME value and only call get_path() for a match.

This should save some time by potentially removing N-1 calls to get_path()
from the loop.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: prevent packages depending on each other
Joshua Lock [Tue, 30 Aug 2011 00:02:39 +0000 (17:02 -0700)]
ui/crumbs/tasklistmodel: prevent packages depending on each other

Don't add y to x's COL_BINB if x is in y's COL_BINB - prevent circular
dependencies.

Further this patch improves the variable naming to make this code easier to
follow.

Fixes [YOCTO #1423]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: don't add same item to binb column more than once
Joshua Lock [Mon, 29 Aug 2011 23:29:06 +0000 (16:29 -0700)]
ui/crumbs/tasklistmodel: don't add same item to binb column more than once

In the same vein as a similar, earlier, patch where I missed the second
loop which modifies the binb column.

Fixes [YOCTO #1420]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agodata_smart.py: make use of expand cache in getVar()
Dongxiao Xu [Mon, 29 Aug 2011 07:33:58 +0000 (15:33 +0800)]
data_smart.py: make use of expand cache in getVar()

Currently if passing expand=True to getVar() function, it will pass the
handling to getVarFlag(), which doesn't get any benefit from the expand
cache.

Call the expand() function separately in getVar() to make use of the
expand cache, which can decrease the parsing time by 40%.
(from current 49s to 27s)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoui/crumbs/runningbuild: add a 'Copy' item to the messages right-click menu
Joshua Lock [Sat, 27 Aug 2011 00:19:58 +0000 (17:19 -0700)]
ui/crumbs/runningbuild: add a 'Copy' item to the messages right-click menu

Add another item to the right-click menu enabled for log messages to copy
the message to the clipboard.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: don't add same item to binb column more than once
Joshua Lock [Fri, 26 Aug 2011 22:13:33 +0000 (15:13 -0700)]
ui/crumbs/tasklistmodel: don't add same item to binb column more than once

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: disable some menu entries whilst build is in progress
Joshua Lock [Tue, 23 Aug 2011 23:35:05 +0000 (16:35 -0700)]
hob: disable some menu entries whilst build is in progress

It doesn't make sense to be able to modify the preferences and add/remove
layers whilst a build is in progress - disable the relevant menu items once
the build has started and re-enable them once the user has returned to the
creation view.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: fix find_reverse_depends method
Joshua Lock [Tue, 23 Aug 2011 23:34:50 +0000 (16:34 -0700)]
bb/ui/crumbs/tasklistmodel: fix find_reverse_depends method

This fixes an embarassing typo which meant the method actually returned a
list of packages which didn't depend on the passed pn.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: don't set PARALLEL_MAKE and BB_NUMBER_THREADS based on cpu count
Joshua Lock [Tue, 23 Aug 2011 23:11:47 +0000 (16:11 -0700)]
hob: don't set PARALLEL_MAKE and BB_NUMBER_THREADS based on cpu count

This was actually broken with recent changes as the values were never
persisted to a file (meaning they were unset on the server at reparse
despite the UI indicating they were set).

However, I've chosen to remove the 'feature' as pegging a users CPU without
them asking to use high thread counts seems a little offensive.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/fetch2/git: add checkstatus command
Joshua Lock [Wed, 24 Aug 2011 20:04:23 +0000 (13:04 -0700)]
bb/fetch2/git: add checkstatus command

Use git ls-remote to implement checkstatus command for the git fetcher.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agousermanual: The git fetcher defaults to the git protocol (or file)
Richard Purdie [Sun, 21 Aug 2011 17:39:41 +0000 (10:39 -0700)]
usermanual: The git fetcher defaults to the git protocol (or file)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: Add rsync as a valid git protocol
Richard Purdie [Sun, 21 Aug 2011 17:38:59 +0000 (10:38 -0700)]
fetch2/git: Add rsync as a valid git protocol

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobb/ui/hob: warn and prevent image build if no IMAGE_FSTYPE is set
Joshua Lock [Fri, 19 Aug 2011 00:50:22 +0000 (17:50 -0700)]
bb/ui/hob: warn and prevent image build if no IMAGE_FSTYPE is set

If IMAGE_FSTYPE is empty and the user has opted to build an image warn
them and prevent the build.

Fixes [YOCTO #1267]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/hobprefs: fix setting IMAGE_FSYTPES
Joshua Lock [Fri, 19 Aug 2011 00:46:10 +0000 (17:46 -0700)]
bb/ui/crumbs/hobprefs: fix setting IMAGE_FSYTPES

We were setting the value as a list when a string is expected

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/hobeventhandler: fix return values of *_image_output_type
Joshua Lock [Fri, 19 Aug 2011 00:45:16 +0000 (17:45 -0700)]
bb/ui/crumbs/hobeventhandler: fix return values of *_image_output_type

These methods are expected to return lists.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/hob: fix package only build
Joshua Lock [Thu, 18 Aug 2011 21:45:18 +0000 (14:45 -0700)]
bb/ui/hob: fix package only build

Use the models new get_selected_pn method to return a list of PN's for the
selected items and pass that for a package only build, rather than passing
a list of package names (which buildTargets can't handle).

Fixes [YOCTO #1385]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: track the PN for each entry in the model
Joshua Lock [Thu, 18 Aug 2011 21:43:49 +0000 (14:43 -0700)]
bb/ui/crumbs/tasklistmodel: track the PN for each entry in the model

Now that we've switched to packages in the model, rather than PN, it makes
sense to add an extra field to store the PN of the package.

This patch includes a convenience method to retrieve a list of selected PN's.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: don't try and build if user selects Bake with no selections made
Joshua Lock [Thu, 18 Aug 2011 21:18:46 +0000 (14:18 -0700)]
hob: don't try and build if user selects Bake with no selections made

If the user hasn't made any selections inform them that they need to do so
before clicking Bake.

Fixes [YOCTO #1384]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: store all binb, not just the first
Joshua Lock [Thu, 18 Aug 2011 04:39:30 +0000 (21:39 -0700)]
bb/ui/crumbs/tasklistmodel: store all binb, not just the first

This makes it easier for the user to determine what the effects of a
removal may be, further it means we no longer need the find_alt_dependency
method which could be a fairly time-consuming method depending on the size
of the contents table.

Partially addresses [YOCTO #1365]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: remove useless items from dependency list
Joshua Lock [Thu, 18 Aug 2011 03:25:12 +0000 (20:25 -0700)]
bb/ui/crumbs/tasklistmodel: remove useless items from dependency list

Ensure the dependency list is uniquified, doesn't include self references
and further doesn't include -dev references.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: more robust checking for substrings
Joshua Lock [Thu, 18 Aug 2011 03:17:42 +0000 (20:17 -0700)]
bb/ui/crumbs/tasklistmodel: more robust checking for substrings

Relying on the count() method of Str to determine whether the string
contains a substring is error prone purely because the return value doesn't
strictly convert to a Boolean value.
To that end take the more pythonic approach of using the in operator (foo
in bar) to check for the substring.
Further, add a helper method for the common case of testing whether a pn
is -native, -cross or virtual/

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/runningbuild: hide the progress bar on cache load complete
Joshua Lock [Tue, 16 Aug 2011 20:58:24 +0000 (13:58 -0700)]
bb/ui/crumbs/runningbuild: hide the progress bar on cache load complete

When we receive the CacheLoadComplete command we need to ensure the
progress bar is hidden as we can't expect the ParseComplete event, where
this would usually be done.

This patch makes the Goggle UI usable again.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/runningbuild: reduce number of messages after recent msg change
Joshua Lock [Tue, 16 Aug 2011 20:56:37 +0000 (13:56 -0700)]
bb/ui/crumbs/runningbuild: reduce number of messages after recent msg change

The recent change to the message module to remove custom logging domains
resulted in an increased number of messages being displayed in the
running build view, ignore all messages lower than log level INFO.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoFixup remaining bb.msg.domain users
Richard Purdie [Mon, 15 Aug 2011 16:29:09 +0000 (17:29 +0100)]
Fixup remaining bb.msg.domain users

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild.py: Fix cut and paste error
Richard Purdie [Mon, 15 Aug 2011 11:39:38 +0000 (12:39 +0100)]
build.py: Fix cut and paste error

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoEnsure only the filtered environment variables are inherited from the OS
Joshua Lock [Sat, 13 Aug 2011 00:58:11 +0000 (17:58 -0700)]
Ensure only the filtered environment variables are inherited from the OS

The recent change which modified inheritFromOS to use the intial
environment, rather than the current environment, introduced a bug such
that variables which had been cleaned from the environment where still set
in the data store.

This patch changes things such that a list of approved environment
variables is saved after the environment is cleaned and only the variables
in this list are inherited in inheritFromOS.

CC: James Limbouris <james.limbouris@gmail.com>
CC: Chris Larson <clarson@kergoth.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/msg.py: Drop manually created domain lists
Richard Purdie [Fri, 12 Aug 2011 14:25:58 +0000 (15:25 +0100)]
bitbake/msg.py: Drop manually created domain lists

This patch removes the majority of the domain related code from bb.msg
on the grounds that we now support dynamic creation of logging domains
so having this hardcoded is just error prone and less flexible. It also
makes the msg code overly and needlessly complex.

It also removes the bb.msg.debug/note/warn/plain/error functions since
we might as well remove them rather than try and fix them at this point.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: extend show_layers
Paul Eggleton [Fri, 12 Aug 2011 14:38:22 +0000 (15:38 +0100)]
bitbake-layers: extend show_layers

Make show_layers print layer name, path, and priority in a simple table
rather than just the value of BBLAYERS.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: use logger.plain instead of info
Paul Eggleton [Fri, 12 Aug 2011 11:09:44 +0000 (12:09 +0100)]
bitbake-layers: use logger.plain instead of info

The INFO: prefix makes sense in bitbake itself but in bitbake-layers is
just noise. Changing this exposed the fact that the logger was not being
set up correctly (which should be done anyway to correctly support
logging from BitBake), so this has also been fixed.

[RP: Sync with logging changes]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: show help with no command specified
Paul Eggleton [Fri, 12 Aug 2011 10:40:18 +0000 (11:40 +0100)]
bitbake-layers: show help with no command specified

Instead of running show_appends when no command is specified, show the
default help text. Running show_appends by default made sense previously
when that was the only real command provided, but now we have several
useful commands implemented.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: improve default command help
Paul Eggleton [Fri, 12 Aug 2011 10:35:25 +0000 (11:35 +0100)]
bitbake-layers: improve default command help

Improve default help output and make unrecognised commands print it out
rather than just an error.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/logging: Overhaul internal logging process
Richard Purdie [Fri, 12 Aug 2011 22:24:43 +0000 (23:24 +0100)]
bitbake/logging: Overhaul internal logging process

At the moment it bugs me a lot that we only have one effective logging
level for bitbake, despite the logging module having provision to do
more advanced things. This patch:

* Changes the core log level to the lowest level we have messages of
  (DEBUG-2) so messages always flow through the core logger
* Allows build.py's task logging code to log all the output regardless
  of what output is on the console and sets this so log files now
  always contain debug level messages even if these don't appear
  on the console
* Moves the verbose/debug/debug-domains code to be a UI side setting
* Adds a filter to the UI to only print the user requested output.

The result is more complete logfiles on disk but the usual output to the
console.

There are some behaviour changes intentionally made by this patch:

a) the -v option now controls whether output is tee'd to the console.

Ultimately, we likely want to output a message to the user about where the
log file is and avoid placing output directly onto the console for every
executing task.

b) The functions get_debug_levels, the debug_levels variable, the
set_debug_levels, the set_verbosity and set_debug_domains functions are
removed from bb.msg.

c) The "logging" init function changes format.

d) All messages get fired to all handlers all the time leading to an
increase in inter-process traffic. This could likely be hacked around
short term with a function for a UI to only request events greater than
level X. Longer term, having masks for event handlers would be better.

e) logger.getEffectiveLevel() is no longer a reliable guide to what
will/won't get logged so for now we look at the default log levels instead.

[YOCTO #304]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bb/providers: make "checking PREFERRED_PROVIDER_%s" a debug message
Denys Dmytriyenko [Fri, 12 Aug 2011 19:57:14 +0000 (15:57 -0400)]
lib/bb/providers: make "checking PREFERRED_PROVIDER_%s" a debug message

In verbose mode there are hundreds of these "checking PREFERRED_PROVIDER_%s"
messages, cluttering the output and obscuring the more important resulting
"selecting %s to satisfy runtime %s due to %s" messages. Individual "checking"
lines are more suited for debug mode, similar to "sorted providers for %s
are: %s", hence convert logger.verbose() to logger.debug().

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobb/ui/crumbs/tasklistmodel: simplify conditional in include_item
Joshua Lock [Sat, 13 Aug 2011 00:00:16 +0000 (17:00 -0700)]
bb/ui/crumbs/tasklistmodel: simplify conditional in include_item

No need to check if the name ends with -native or -cross as path will be
None in this instance.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: make package_model_filter a little safer
Joshua Lock [Fri, 12 Aug 2011 23:57:46 +0000 (16:57 -0700)]
bb/ui/crumbs/tasklistmodel: make package_model_filter a little safer

Ignore names that include '-cross', rather than just 'cross'

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: optimise find_path_for_item
Joshua Lock [Fri, 12 Aug 2011 22:06:06 +0000 (15:06 -0700)]
bb/ui/crumbs/tasklistmodel: optimise find_path_for_item

If the item_name contains virtual/, -native or -cross it won't be present
in the model. Return None early in this circumstance rather than iterating
the entire model and still returning None.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: include package level information
Joshua Lock [Fri, 12 Aug 2011 22:03:51 +0000 (15:03 -0700)]
bb/ui/crumbs/tasklistmodel: include package level information

Until now the hob UI has only contained recipe (pn) level targets in the
data store, this patch switches to including package level information.

This is slightly slower in all model related cases (more entries) but gives
much more flexibility for image customisation.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/crumbs/tasklistmodel: filter nativesdk packages out of views
Joshua Lock [Fri, 12 Aug 2011 22:01:11 +0000 (15:01 -0700)]
bb/crumbs/tasklistmodel: filter nativesdk packages out of views

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agolib/bb/ui/crumbs/hobprefs: fix erroneous save/reparse
Joshua Lock [Thu, 11 Aug 2011 22:41:47 +0000 (15:41 -0700)]
lib/bb/ui/crumbs/hobprefs: fix erroneous save/reparse

We need to unset the reload_required variable once we've triggered a reload
so that we don't cause a reload each time the preferences dialog is shown and
dismissed, regardless of whether anything has changed.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/configurator: introduce writeConfFile method for all writes
Joshua Lock [Thu, 11 Aug 2011 01:07:23 +0000 (18:07 -0700)]
bb/ui/crumbs/configurator: introduce writeConfFile method for all writes

Configuration files are written in several places, this refactors the code
to use a common method.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/hobeventhandler: adapt to reset -> reparse change
Joshua Lock [Thu, 11 Aug 2011 01:09:22 +0000 (18:09 -0700)]
bb/ui/crumbs/hobeventhandler: adapt to reset -> reparse change

The API has changed from just a reparse call to a reset call followed by
a reparse call.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/command|cooker: refactor the reparseFiles logic
Joshua Lock [Wed, 10 Aug 2011 01:27:51 +0000 (18:27 -0700)]
bb/command|cooker: refactor the reparseFiles logic

Turn the reparseFiles logic into a command to reset the cooker's state
machine and a noop which triggers a cache rebuild.

The resetCooker command resets the cookers state machine such that a cache
update will be triggered by any async command which requires the cache.
The reparseFiles command remains as a noop async command that has the
needcache property set to True so that when called it ensures the cache is
built.

Patch from Richard with the addition of removing the force parameter from
the updateCache method.

CC: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobitbake/usermanual: Update to be more in sync with bitbake codebase
Richard Purdie [Wed, 10 Aug 2011 15:07:45 +0000 (15:07 +0000)]
bitbake/usermanual: Update to be more in sync with bitbake codebase

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: Fix -e when used with -b option
Richard Purdie [Wed, 10 Aug 2011 13:15:38 +0000 (13:15 +0000)]
bitbake: Fix -e when used with -b option

When using the -e and -b options together an expection was occuring.
This was due to incorrect initialisation and this patch adds in the
correct initialisation calls.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobb/cache: rename confusing variable
Joshua Lock [Thu, 11 Aug 2011 00:57:29 +0000 (17:57 -0700)]
bb/cache: rename confusing variable

The bNeedUpdate variable doesn't reflect its purpose, and doesn't match
coding style (type encoded in variable name, camel case) - rename to
cache_ok.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: don't include an item in its own depends
Joshua Lock [Wed, 10 Aug 2011 00:21:44 +0000 (17:21 -0700)]
bb/ui/crumbs/tasklistmodel: don't include an item in its own depends

This causes the simple removal algorithm to perform needless circular logic

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: correctly uniquify dependency list
Joshua Lock [Wed, 10 Aug 2011 00:19:33 +0000 (17:19 -0700)]
bb/ui/crumbs/tasklistmodel: correctly uniquify dependency list

Fix thinko - the squish method returns a uniquified list, it doesn't modify
the list in place. Therefore the call to squish() was useless as its return
value was never assigned.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/ui/crumbs/tasklistmodel: fix some typos and add comments to mark()
Joshua Lock [Tue, 9 Aug 2011 18:09:38 +0000 (11:09 -0700)]
bb/ui/crumbs/tasklistmodel: fix some typos and add comments to mark()

Two similarly named variables in the mark() method resulted in the wrong
variable being used in a couple of places. This patch adresses this in
several ways:
1) Renames the variables to be less similar
2) Uses the correct variables
3) Adds some coments to document the methods intent

Partially addresses [YOCTO #1355]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobb/cooker: only emit ConfigFilePathFound for files which were parsed
Joshua Lock [Tue, 9 Aug 2011 16:23:36 +0000 (09:23 -0700)]
bb/cooker: only emit ConfigFilePathFound for files which were parsed

When the requested configuration file is found on disk check the
against the configuration files in __depends/__base_depends to ensure the
file was parsed before emitting the ConfigFilePathFound event.
If the requested file wasn't parsed just return (and don't emit).

Fixes [YOCTO #1246]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetcher2: show warning message when checksum is mismatch
Yu Ke [Tue, 9 Aug 2011 09:17:00 +0000 (17:17 +0800)]
fetcher2: show warning message when checksum is mismatch

Currently, if checksum mismatch, fetcher will try mirror,
and if mirror fetching fail, it will show error "Unable
to fetch URL xxx from from any source" which actually
hide the real reason and make user confuse.

so showing warning message will make it more clear.

Fix [YOCTO #1256]

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>