Commit Graph

2440 Commits

Author SHA1 Message Date
Andrei Dinu cd4f88e0ea bitbake: Adjust spacing on information windows
[Hob #4070]

- tweaked the spacing on info windows

- fixed text bolding in simple settings dialog

(Bitbake rev: 2ecb102968cdbbdbbfa91e1dcccf45bcd0b59a89)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:39 +00:00
Cristiana Voicu 860f826753 bitbake: hob: implementation of search functionality in Hob
Implemented the search functionality for recipes and packages using
filters on the listmodel. I have used the design which can be found in
bugzilla.

[YOCTO #3529]
(Bitbake rev: b77166ad7b8571895f73a84f7789d93fbd4f6d04)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:39 +00:00
Cristiana Voicu ab7d8bd172 bitbake: hob: Hob custom image build error
For a custom image from scratch, the image version is not set and
it gives an error.

[YOCTO #4065]
(Bitbake rev: 43703f3eb5f71a117e6315fa5df91711653636a3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Martin Jansa 0ff4529c64 bitbake: runqueue: Use taskData.fn_index[depdata] instead of uninitialized dep
* dep variable was removed in
  commit 3190cb83e2af195a464f669c5aa8aedbf795160e
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Wed Jun 27 11:04:06 2012 +0100

    taskdata: Add gettask_id_fromfnid helper function

    This is like gettask_id but doesn't require translation of fnid -> fn
    first which the function then translates back. This gives a sizeable
    performance improvement since a significant number of lookups are avoided.

* now it fails completely instead of showing which task is missing

(Bitbake rev: 58847fabd389e5b8d02d5a9c6827aabedb30312f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 20:58:11 +00:00
Cristiana Voicu b844a4292b bitbake: hob: some settings in Hob are not remembered
Some settings in Hob were not saved in Bitbake and they were not displayed
correcty in Hob, because Hob used some other variables with the extension "_HOB".
I have removed this, in order to have a consistency for the variables.
ALso, I called a function to load the extra variables saved in .hob/template_default.hob.

[YOCTO #3957]
(Bitbake rev: 0f62a12ef3fa4daf8f3a289c984115302b75c23d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 20:58:11 +00:00
Robert Yang ee416ad6f4 bitbake: utils.py: fix BB_ENV_WHITELIST
The BB_ENV_WHITELIST doesn't work well and flushes BB_ENV_EXTRAWHITE,
here is an example:

$ export BB_ENV_WHITELIST

$ export BB_NUMBER_THREADS=10 (or other value)

Edit conf/local.conf, change "BB_NUMBER_THREADS =" to "BB_NUMBER_THREADS ?="

$ bitbake -e | grep '^BB_NUMBER_THREADS ='
we will notice that BB_NUMBER_THREADS' value doesn't change, though
BB_NUMBER_THREADS in both BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE.

This is because the "approved" inside the function approved_variables
doesn't include BB_ENV_WHITELIST or BB_ENV_EXTRAWHITE when
BB_ENV_WHITELIST is set (they are incuded by preserved_envvars()), so
the BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE will be removed from the env
in the first call from bin/bitbake, and when it is called again by
cooker.py, their value will be None, then the vars inside them will be
removed from the env.

Add BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE to the "approved" would fix
the problem.

[YOCTO #4031]

(Bitbake rev: d2b07e6516dd308d0045a7fdb72b588af9d676ad)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:56:03 +00:00
Robert Yang af9f5843d9 bitbake: monitordisk.py: monitor disks based on path
The previous monitor is based on the disk, and one disk only can have
one action, this limits its function, for example we set this in the
current local.conf:

BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100GM,1K"

Before:
  * If TMPDIR, DL_DIR and SSTATE_DIR are on the same disk partition,
    only the last line "ABORT,${SSTATE_DIR},100GM,1K" works

  * If TMPDIR, DL_DIR and SSTATE_DIR are on the different disk partitions,
    only the last three lines (ABORT) work.

These are not what we expect, now:
  * We monitor the disk based on the path and action, so all the six lines
    will work no matter whether they are on the same disk partition or
    not.

  * The out put format will be:
    WARNING: The free space of /path/to/directory (device) is running low (XXGB left)

[YOCTO #3995]

(Bitbake rev: e22a576672ee4a40b44f7a826a78a77fc07e9177)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:55:38 +00:00
Andrei Dinu 37bfbd6493 bitbake: crumbs/recipeselectionpage: added events for the "Package Groups" "All recipes
" tabs and passing the information needed to the function created
in the builder.

(Bitbake rev: 60c3b561d66f9a43e696c402899141287ddb496e)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 58115affd1 bitbake: crumbs/packageselectionpage: added event for the "All packages" tab
and passing the information needed to the function created in the builder.

(Bitbake rev: 840bbdbc973e72d4305c21bcc26c008a6dc39456)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 3c5737a717 bitbake: crumbs/imageconfigurationpage: added information so that it displays correctly
in the information dialogs.

(Bitbake rev: 0301e7622af83c105ba60d7d1749294de06f6a59)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 5b5db02bd7 bitbake: hobwidget: added functionality for the information dialogs.
(Bitbake rev: e4d9729fc66f472266e9dc2f579edeef74d8f289)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu a43792c933 bitbake: crumbs/hoblistmodel: added information columns needed for prop dialogs
in order to display all the information gathered in the
backend, new columns needed to be added in the hoblistmodel.

(Bitbake rev: 0942f05a1196513c6d163f28cf297728aed6ee22)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 0e175284fe bitbake: hig/simplesettingsdialog: added entries for information dialogs
added information so that it would display correctly in the information dialogs.

(Bitbake rev: bf86cc183c250acd0e52755ae6050a2f8d85ccf5)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu a4fdfa7088 bitbake: hig/propertydialog: new class added for the property windows.
this covers functionality for : recipe selection page
                                package selection page
                                information dialogs

(Bitbake rev: 82cb844c92fcc71cefe7d7ddc110523c62185e9e)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 5b4b8177b5 bitbake: hig/advancedsettingsdialog: Added information for the information dialogs
added information so that it would display
 correctly in the information dialogs.

(Bitbake rev: 7580716b905366aea70c9eed38dc703cecf24219)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu f4bc22c856 bitbake: crumbs/builder: Replaced the function that displayed tooltips
replaced in the builder.py the function that displayed the tooltips
with two functions that display property windows for recipes and packages
pages.

(Bitbake rev: bec3c1dc91118705149d00e5ec2bea08c8db75ed)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:23 +00:00
Andrei Dinu f988562bba bitbake: cooker: Use extra cache information
-extended cooker.py so that the extra information in cache_extra.py could
 be used

(Bitbake rev: e6c2fa2f6669a4adf890a2ee794b100617223b7b)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:23 +00:00
Andrei Dinu e8b0e190b6 bitbake: cache_extra: Add extra variables
- in order to have the information needed in the property
  windows, cache_extra.py was extended with variables.

(Bitbake rev: bc09090f44f9b3a1b123f5453586295b9623218b)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:23 +00:00
Robert Yang 365eb9b5d2 bitbake: bitbake-layers: fix duplicated help info
There are two "help" lines when run bitbake help under python 2.6.6
(perhaps all python 2.6):

$ bitbake-layers help
[snip]
help
    display general help or help on a specified command
[snip]
help
    display general help or help on a specified command

This is because the cmd.py in python 2.6.6 also has a do_help() function
as our bitbake-layers, and the cmd.Cmd.get_names() doesn't consider the
overload, this has been fixed in python 2.7, use set() to remove the
duplicated would fix the problem.

[YOCTO #3428]

(Bitbake rev: 324ed96e28ec31cff8cef1824d20d40f9a5d46ad)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:52 +00:00
Richard Purdie 164a4cb2fc bitbake: Revert "cooker: parse using bb.compat.Pool"
Reverting the pool changes, terminate does not work reliably on
bb.compat.Pool :(

[YOCTO #3978]

This reverts commit 8af519a49a3374bd9004864ef31ca8aa328e9f34.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-06 15:40:56 +00:00
Richard Purdie ed76a48e68 bitbake: Revert "cooker: now that we use a Pool, raise the exceptions"
Reverting the pool changes, terminate does not work reliably on
bb.compat.Pool :(

This reverts commit 9ca8e513dc142dd7aefadeb6db2ccdb00f38b39f.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-06 15:40:56 +00:00
Martin Jansa 7ed4523963 bitbake: siggen: add quotes around variable values to see whitespace
* without this change it's hard to see what's changed:
  bitbake-diffsigs sstate-cache/*/sstate-depmodwrapper-cross-cortexa8-vfp-neon-oe-linux-gnueabi-1.0-r0-cortexa8-vfp-neon-*_populate-sysroot.tgz.siginfo
  basehash changed from 62f28c13172d38af917716d6d4b15ac5 to 9cf38842bcc79e0a4356856a64141548
  Variable TUNE_CCARGS value changed from  -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8  to  -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8
  Hash for dependent task depmodwrapper-cross_1.0.bb.do_install changed from 4494cb6c117309a9b4c541ad86c0aac5 to 1e3bcf2d14e5bd30a38350b41bb98db3

* with this change, we can see extra trailing space in first version:
  basehash changed from 62f28c13172d38af917716d6d4b15ac5 to 9cf38842bcc79e0a4356856a64141548
  Variable TUNE_CCARGS value changed from ' -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 ' to ' -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8'
  Hash for dependent task depmodwrapper-cross_1.0.bb.do_install changed from 4494cb6c117309a9b4c541ad86c0aac5 to 1e3bcf2d14e5bd30a38350b41bb98db3

(Bitbake rev: 7d85b1a383feaa072503d71d3baeb3bdcd1012a8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-04 11:38:30 +00:00
Christopher Larson 914e324582 bitbake: cooker: now that we use a Pool, raise the exceptions
Multiprocessing catches these and handles passing them between processes
itself, we don't need to do it ourselves anymore.

[YOCTO #3926]

(Bitbake rev: 9ca8e513dc142dd7aefadeb6db2ccdb00f38b39f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-26 07:28:25 -08:00
Robert Yang 35ed979019 bitbake: perforce.py: fix the perforce fetcher
The bb.process.run() will return one tuple, e.g:

p4file = ('strA\nStrB\nstrC\n'), then there will be an iteration on p4file:

for i in p4file:
	[snip]

The i will be 's t r A ...', this is incorrect. use splitlines() to fix
the problem.

[YOCTO #3619]

(Bitbake rev: b7440fb36b419996046f607e66434ce34722272b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-25 05:58:20 -08:00
Paul Eggleton 406cb9920f bitbake: build.py: avoid deleting taint files when writing stamps
The stamp cleaning process that occurs before writing out new stamps for
a task was deleting taint files as well. This resulted in tasks that
were forcibly re-executed using the -f or -C command line options to
have their previous output restored from shared state when called upon a
second time, because the taint value was no longer incorporated into the
task signature and thus it was reverting to its previous value. This
also affected the kernel menuconfig command in OE-Core.

Note that the taint file *is* still deleted when doing -c clean, which
is the desired behaviour.

Fixes [YOCTO #3919].

(Bitbake rev: e6db0ee31178d4386802e720d75303ec7dc21519)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 05:22:39 -08:00
Richard Purdie 7d22ef28e6 bitbake: Revert "fetch2: Adapt encode/decode url to use URI class"
This reverts commit 21fe2683aefde10e847e66c11c26d4f4c1e07cfd
since bitbake-selftest doesn't pass when this is applied and
we're seeing multiple build failures from this change.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 23:07:23 -08:00
Richard Purdie c78cc0556f bitbake: utils: Improve remove funciton to handle whitespace
Improve the remove function to better handle cases where path contains
special shell chars like whitespaces, '$', ';' or'\'.

Thanks to Enrico Scholz for the fix.

(Bitbake rev: 617511c9f86cc4ef52457653c8adff582d94bce3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:33:05 -08:00
Matthew McClintock 72ebe0c34f bitbake: bitbake/fetch2: workaround urlparse in older python not support git
(Bitbake rev: 7e479dc6a574a8f3bd9f24d2ed1c3ceef91f3828)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:33:05 -08:00
Richard Purdie 9a2a321bab bitbake: wget: Improve mkdir handling
If there there isn't a subdirectory to the downloadfilename, this was
failing. This patch avoids that issue.

(Bitbake rev: 58bfd8d88495d4cae808e23b7af40e65ad05450f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:00:32 -08:00
Christopher Larson 325410e2b2 bitbake: cooker: parse using bb.compat.Pool
(Bitbake rev: 8af519a49a3374bd9004864ef31ca8aa328e9f34)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 08:47:36 -08:00
Olof Johansson 7b59a34360 bitbake: fetch2: Add SFTP fetcher
This fetcher differs from the SSH fetcher in that it adheres more
strictly to the SECSH URI internet draft --- it uses the sftp://
instead of the ssh:// scheme, and it uses sftp instead of scp.

(Bitbake rev: d240baeb7a4107d2eba3f08c411c0f086674d8e2)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson 96f0a39e7c bitbake: fetch2: Add editor modelines for bb.tests.*
(Bitbake rev: 230e00948ba093958e8e89e9ee380444b3dad307)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson dc9d989a5c bitbake: fetch2: Adapt encode/decode url to use URI class
(Bitbake rev: 21fe2683aefde10e847e66c11c26d4f4c1e07cfd)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson f860059a4c bitbake: fetch2: unittests for bb.fetch2.URI class
(Bitbake rev: a71e7d4137d2c5268b406f69992d09c00772a040)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson 7feca4e11e bitbake: fetch2: Add a class representing a generic URI
A class representing a generic URI, with methods for accessing the URI
components, and stringifies to the URI. This class should be a bit more
flexible than the existing {encode,decode}_url functions in that it
supports more components (e.g. port) and that it does not rely on a
specific order on the return values. This makes it easy to add new
properties without affecting the API.

(Bitbake rev: bd824da8a7eafe27310e410807319628378caeca)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:04 +00:00
Olof Johansson 46bd4fd9f0 bitbake: fetch2: Remove unused code in wget fetcher
(Bitbake rev: 6d88fcee16ced3a8c1ab1daf8e88d36f70f13346)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:04 +00:00
Richard Purdie 55d17578d6 bitbake: fetch2: Ensure directory for stampfile exists before trying to create it
(Bitbake rev: cf510e3da36e53f98ca86501747364bf4699ecc1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 16:17:48 +00:00
Richard Purdie f7836b1299 bitbake: utils: Use rm -rf in remove()
Whilst shutils.rmtree() is pythonic, its also slow. Its faster to
use rm -rf which makes optimial use of the right syscalls.

(Bitbake rev: 96088ebdec08e49ba9e8dbcac437bfcdc21f5983)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 15:53:41 +00:00
Cristiana Voicu 07803d58e0 bitbake: hob: remove save/load template functionality
The Hob templates functionality, in its current incarnation,
is confusing and has no clear utility.

[YOCTO #3696]
(Bitbake rev: 4eb3b6bb9f936808ddf085624078f6479c522c48)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:38 +00:00
Robert Yang e36994f69a bitbake: knotty.py: fix unknown event bb.event.DiskFull
There is an error:

ERROR: No new tasks can be excuted since the disk space monitor action
is "STOPTASKS"!
ERROR: Unknown event: <bb.event.DiskFull object at 0x2ab6310>

This is because we don't handle the event bb.event.DiskFull in
knotty.py, we don't want the knotty to do anything here since we have
done everything in monitordisk.py, so just ignore this event would fix
the problem.

[YOCTO #3523]

(Bitbake rev: 0fa874dbe0532bbe88ade405f514a237e6cd2488)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Robert Yang 86ac3b53b5 bitbake: bitbake-layers: make show-cross-depends avoid long path
The "bitbake-layers show-cross-depends" print the absolute path in the
past, now it will print the relative path (relative to the layer dir) by
default, and add the "-f" option to make it print the absolute path.

For example:

$ bitbake-layers show-cross-depends
[snip]
meta-intel/meta-jasperforest/conf/machine/jasperforest.conf requires meta/conf/machine/include/ia32-base.inc
[snip]

$ bitbake-layers show-cross-depends -f
[snip]
/path/to/poky/meta-intel/meta-jasperforest/conf/machine/jasperforest.conf requires /path/to/poky/meta/conf/machine/include/ia32-base.inc
[snip]

[YOCTO #3824]

(Bitbake rev: df217701318d60559be0b10214b883b8ce4f5d2a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Cristiana Voicu 2c5ad4059e bitbake: hob: remove parsing warnings when machine is changed
When the machine is changed, the warnings list is emptied and the warnings
bar is hidden.

[YOCTO #3830]
(Bitbake rev: 8e43da7798a98988f7da3f7c424e8f9e5eac2010)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Cristiana Voicu 0e2ee5bd45 bitbake: hob: no sanity checks re-run
Hob was hanging when the user tried a rebuild a new image, because
of sanity checks. It should not re-run sanity checks.

[YOCTO #3829]
(Bitbake rev: f7ff550f53cf3e5b166940db83f27ec733f3ef72)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Robert Yang b0587077a4 bitbake: monitordisk.py: disable the inode checking for some fs
There is an error when use disk monitor on btrfs:
WARNING: The free inode of rootfs is running low (0.000K left)
ERROR: Immediately abort since the disk space monitor action is "ABORT"!

This is beucase some fs formats' statvfs.f_files (inodes) is zero, thus
the statvfs.f_favail (free inodes) is zero, too, this a feature of the
fs, we disable the inode checking for such a fs.

[YOCTO #3609]

(Bitbake rev: b2ada3ad5f7aefff107f013e0c9decea481c7ef6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Richard Purdie 804d1d57a2 bitbake: fetch2: Improve lock/done stamp file paths for local files
Currently stamps end up at the top level of DL_DIR even if the files
themselves are in a directory structure. This patch preserves path
components allowing the top level directory to be less populated
which is an advantage for large sstate caches.

(Bitbake rev: 59921ce3ed7a4c0b7f8ef1a101ad9127469bf1fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Cristiana Voicu 95e7dae968 bitbake: bitbake & hob: reparse config files, when sanity check updates bblayers.conf
I've sent a patch to poky, with some changes in sanity.bbclass. When bblayers.conf
is updated, it updates also a variable to know when to reparse configuration files.
This patch contains the changes to reparse conf files, after a sanity check which
changes bblayers.conf.

[YOCTO #3213]
(Bitbake rev: 966e3e59ceb1c8b33b5881f291c148ea6513eda0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Richard Purdie d5ef2e5cc0 bitbake: fetch2: Ensure expansions happen in URL parameters in uri_replace
For example, this allows us to specify downloadfilename=PATH in sstate
mirror urls to improve directory structures in DL_DIR when using sstate.

(Bitbake rev: 7850a1364b6b37c58664d84f9c14806b4479b45c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Olof Johansson 423dd2f7cd bitbake: ConfHandler: Use re.X to make long regexp more readable
The __config_regexp__ in ConfHandler is quite long, and using re.X to
break the expression onto several lines make it a bit easier to read.

(Bitbake rev: 54dce9e14ab0657d76f0d0ae22eef7fab8e8950d)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Richard Purdie bc7c8fa99a bitbake: tests/codeparser: Hack around circular inclusion problem
There is a circular dependency issue where bb.data can't directly depend on
bb.parse. The tests were failing due to this issue which is misleading. This
patch hacks around it for now. I'd rather that than not running tests at all.

(Bitbake rev: a206ae0d7769a41ff3666d0f53ff9cf422dfa518)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Richard Purdie 07dcffe7ec bitbake: wget: Only use -O option when not spidering
If we pass the -O option whilst spidering, empty files are created which is not
desired. We also need to ensure any subdirectories are created when using the
downloadfilename parameter.

(Bitbake rev: d5f78e98d5aba36c95288fbaac267c2d54537b02)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Richard Purdie f966c544aa bitbake: codeparser: Track bb.utils.contains usage
The bb.utils.contains function usage is getting increasingly used in the metadata
but isn't handled automatically by the python dependency tracking code. This patch
changes that and also adds the "OE" names for the functions.

Whilst there are reasons this is a bad idea, its likely outweighed by the
shear number of these references and the current holes in dependency information
which we're now relying heavily upon.

(Bitbake rev: 0b9d117631ce909312d53b93289e61defc6be01c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Richard Purdie 7e6f9baae1 bitbake: codeparser: Track appendVar and prependVar calls as we do for getVar
We need to track appendVar and prependVar calls just as we do for getVar in order
to ensure we're not missing variable dependencies.

(Bitbake rev: 767b4751232f4ee3979deb4d3f733fcf9ee2bd44)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Christopher Larson 34571f4c10 bitbake: Remove whitelisted vars from non-task deps
Though the value of variables in the BB_BASEHASH_WHITELIST is kept out of the
checksums, dependency on them is not, at least for variables and non-task
functions. In the code, the whitelist is removed from the overall task dep
list, but not the individual variable deps. The result of this is that
functions like sysroot_stage_all and oe_runmake end up with whitelisted
variables like TERM listed in their dependencies, which means that doing
a 'unset TERM' before building will result in all checksums for tasks that
depend on those changing, and shared state reuse not behaving correctly.

This is only really a potential issue for variables from the environment, as
it's the existance/removal of the variable that's an issue, not its value, and
the other whitelisted variables are set in our metadata. This which means in
practical terms the only cases where this is likely to be an issue are in
environments where one of the following are unset: TERM, LOGNAME, HOME, USER,
PWD, SHELL. This may seem like an unlikely circumstance, but is in fact a real
issue for those of us using autobuilders. Jenkins does not set TERM when
executing shell, which means shared state archives produced by your jenkins
server would not be fully reused by an actual user.

Fixed by removing the whitelisted elements from the individual variable deps,
not just the accumulated result.

(Bitbake rev: dac12560ac8431ee24609f8de25cb1645572d350)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 11:14:06 +00:00
Richard Purdie 83e1015684 bitbake: ConfHandler: Improve regexp to fix mis-parsing of += and no whitespace
If you have:

FOO = "a"
FOO += "b"
FOO+= "c"

The expected result is "a b c" however we were seeing "a b" with the FOO+
variable being assigned the value "c". This isn't the expected result.

We need to make the name part of the variale non-greedy so that any + character
becomes part of the operator. This patch does that. I compared the configuration
in OE-Core before and after the change and only the test case changed.

[YOCTO #3834]

(Bitbake rev: 2cd8d7fd12a646e6516e2c985e6a54121d19eb59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 10:46:26 +00:00
Richard Purdie b6d8f96ee5 bitbake: bitbake/utils: Improve environment handling to allow UIs access to original environment
We need to empty out the environment whilst we build the cooker but
we need the environment for the UIs since hob uses DISPLAY and other
session variables.

This patch adapts the utils functions to return removed environment
components so we can reinject them for use by the UI, allowing hob
to work again.

(Bitbake rev: fc330d810099c57fefd4e706159a73ad8401d97c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 11:11:26 +00:00
Richard Purdie 1ef926cf78 bitbake: prserv/serv.py: Fix logging in daemon mode
In deamon mode we need to ensure the logging module is sending log data to the
log file. These changes ensure this happens correctly.

(Bitbake rev: bb53b47710ca4579e20284668cb354f734c3d502)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 23:45:36 +00:00
Richard Purdie bdfc5207a0 bitbake: bitbake: Always use separate process for PR Service
Using the threading module interacts badly with multiprocessing used elsewhere
in bitbake under certain machine loads. This was leading to bitbake hanging on
Ctrl+C when the PR Server was being used.

This patch converts it to always use the daemonize code which
then means the threading code isn't required.

[YOCTO #3742]

(Bitbake rev: 2d0bbd9398ab839bd2d1e29e50b25d52efb1ce2a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 23:45:36 +00:00
Richard Purdie 945cd710cb bitbake: Update version to 1.17.0
(Bitbake rev: d96ef9398356b2a61f7cff765821616bf1e55492)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Darren Hart fe84fe0209 bitbake: fetch2: Remove broken git variables from the environment
The following variables perform no function outside of bitbake:

    GIT_CONFIG
    GIT_PROXY_HOST
    GIT_PROXY_PORT
    GIT_PROXY_IGNORE

GIT_CONFIG only affects the git-config command which is not relevant to
the fetcher. This was previously used with the OE GIT_CORE_CONFIG
variable which would provide a basic git config to use instead of the
user's config. This usage was deprecated by git for over a year now:

http://git.661346.n2.nabble.com/Overriding-gitconfig-using-GIT-CONFIG-td6680977.html

GIT_PROXY_HOST and GIT_PROXY_PORT are not used by git.

GIT_PROXY_IGNORE was an OE construct used to create the custom git
config and had no meaning outside of the OE environment. It is not used
by git.

Remove these variables from the fetcher environment.

Users wishing to configure git to work with a proxy should define the
GIT_PROXY_COMMAND environment variable to use an external script.
NO_PROXY can be used within this script to skip the proxy for certain
hosts.

(Bitbake rev: e60270bdce6b8c2f8da1a4838aa374da9db3c86a)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Darren Hart 3863dfce62 bitbake: fetch2: Export upper and lower case environment variables
Applications are inconsistent in their use of upper and lower case proxy
variables. Curl, for example, specifies NO_PROXY (not no_proxy) in the
man page (changed in 2009 [1]). Avoid proxy issues by ensuring both the
upper and lower case versions of each proxy variable is available in the
environment for the fetcher commands.

Add FTPS_PROXY and ftps_proxy to the list as well.

1. http://curl.haxx.se/mail/tracker-2009-04/0012.html

(Bitbake rev: c3e6b2c5ec81d5ad7dcf606fff16fd5552bd267c)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Richard Purdie 6fecb1a3e0 bitbake: cooker/utils: Drop custom 'interactive' variables list and store environment in BB_ORIGENV instead
Maintining hardcoded lists of user environmental variables is hacky,
replace these with the savedenv datastore. Allow access to that
through the BB_ORIGENV variable.

(Bitbake rev: 0a99563a4ea270594fd9a61da46f9387fb79dc66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Richard Purdie 1f192a7ade bitbake: compat/utils: Add copy of python multiprocessing pool for pre 2.7.3 issues
python 2.7 shows hangs with issues in its pool implmenetation. Rather than
try and hack around these, add a copy of the working pool implementation
to the compat module from 2.7.3.

(Bitbake rev: c9eb742637131e8dbd526d2ad9b458abea0a2d87)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Darren Hart ee1f126ad5 bitbake: bitbake: fetch2: Print the complete SRCREV variable name when INVALID
If a particular SRCREV (say for a particular branch) is missing, the
fetcher will currently just report an obtuse error about the "SRCREV"
being invalid. If there is more information is to be had (say from name,
i.e. branch, and pn) then display that as well.

The new error looks something like this:

ERROR: ExpansionError during parsing /home/dvhart/source/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: 'git://otcgit.jf.intel.com/dvhart/linux-yocto-minnow-3.4.git;protocol=git;nocheckout=1;branch=standard/minnow,meta,emgd-1.14;name=machine,meta,emgd'. Please set SRCREV_emgd_pn-linux-yocto to a valid value

Note the variable listed as invalid is
"SRCREV_emgd_pn-linux-yocto", making it explicit what is wrong.

(Bitbake rev: 63774f5b4edb999300bddd891233f6050f4af877)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-05 15:22:45 +00:00
Robert Yang 8d80483e2f bitbake: bitbake-layers: print the recipe's depends that crosses a layer boundary
Figure out the dependency between recipes that crosses a layer boundary

* Introduction:
  - For the .bb file, we need check the following depends:
    > Check the DEPENDS, RDEPENDS and inherits according to the
      cooker_data.
    > The cooker_data doesn't have the info about "require/include xxx",
      so we need check them manually.

  - For the .bbclass, .inc and .conf file, we can't get their file
    depends from the cooker_data, we need check them manually.

* Usage:
  $ bitbake-layer show-cross-depends

  I don't like the name "show-cross-depends", figure-out-cross-depends
  might be better, but most of the commands are "show-xxx" for bitbake-layers.

* Output: (snipped)
/work/poky/meta/recipes-support/libusb/libusb-compat_0.1.4.bb inherits /work/poky/meta-yocto/classes/poky-sanity.bbclass
/work/poky/meta-intel/meta-cedartrail/recipes-cdv-media/images/core-image-cdv-media.bb requires /work/poky/meta/recipes-sato/images/core-image-sato.bb
/work/poky/meta-yocto/recipes-core/tiny-init/tiny-init.bb RDEPENDS /work/poky/meta/recipes-core/busybox/busybox_1.20.2.bb
/work/poky/meta-intel/common/recipes-bsp/amt/lms_7.1.20.bb DEPENDS /work/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
/work/poky/meta/classes/distrodata.bbclass includes /work/poky/meta-yocto/conf/distro/include/package_regex.inc
/work/poky/meta-intel/meta-sys940x/conf/machine/sys940x.conf requires /work/poky/meta/conf/machine/include/tune-atom.inc

[YOCTO #3387]

(Bitbake rev: 100502ef722bf19b6c125a5e017f31686ad18421)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 14:00:03 +00:00
Martin Jansa d82eac8041 bitbake: ssh.py: add example SRC_URI
(Bitbake rev: f838af8e7afebf279ffb00a3afa6592f061b703f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:21 +00:00
Martin Jansa 9df0588ab4 bitbake: ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git
* taken from SFTP fetcher:
  http://patchwork.openembedded.org/patch/43027/

(Bitbake rev: 88e565855b52e905156d85c3f45b341cddfe2f55)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:21 +00:00
Martin Jansa e863851045 bitbake: ssh: fix fetcher
* set localpath in urldata_init
  otherwise localpath and basename were None, when fetcher was trying to
  define .lock and .done paths
  basepath = d.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename))
* remove "host" from localpath
  .done and .lock files are always using just basename, so if someone
  has 2 recipes with:
  SRC_URI = "ssh://foo/file.txt"
  SRC_URI = "ssh://bar/file.txt"
  then there will be only one file.txt.done in downloads anyway (and
  only first file.txt from first server will be returned on do_fetch

(Bitbake rev: 41208760d70a657297f9ecfb48b74e2c3b594e70)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu c30ef8886d bitbake: hob: eliminate the "by recipe" grouping in the packages table
We have agreed to change how we show the packages. Now they are not grouped by
recipe. Until now, it was implemented using  TreeStore and I've changed it to
extend a ListStore. I have modified all the function in according to this.

[YOCTO #2180]
(Bitbake rev: 311e7ba8b2c88fbf6f16b6ffb1400226b155ddd4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu b2ab771447 bitbake: hob: Use a GtkTreeView to present and configure the sstate mirrors
After some discussions about the design of the Shared State Settings tab in Hob,
we have decided that using a GtkTreeView to present and configure the sstate
mirrors is probably the best solution.

[YOCTO #3569]
(Bitbake rev: 2ff636910b9cf3099e8d961f4bbe71512c015ecc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Christopher Larson 785e1ba012 bitbake: tinfoil: support other fds, enable color support
Rather than only handling sys.stdout, also support any arbitrary file object,
and enable color for the formatter if that file is a tty.

(Bitbake rev: c46db4be4cc4dc53376ed3f574b2f1c868730f2a)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu 5deae14080 bitbake: hob: small fixes to parsing warnings dialog
Set the labels selectable; reset the warnings list when another machine is selected;
changed a label name

[YOCTO #3215]
(Bitbake rev: a4463d7b51828c32e55dea3c0dd51966d387abac)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu f0aef9953d bitbake: bitbake & hob: implement functions to assure consistency for configuration files
Added a new command in bitbake to save a variable in a file; added a function
in cooker which is called by this command.

Added new command in bitbake to enable/disable data tracking.

The function saveConfigurationVar from cooker.py saves a variable in the file that
is received by argument. It checks all the operations made on that variable, using the history.
If it's the first time when it does some changes on a variable,it comments the lines where
an operation is made on it, and it sets it in a line to the end of file. If it's not
the first time(it has a comment before), it replaces the line.

Made some changes in hob to save the variables from bblayers.conf and local.conf
using the bitbake command.

[YOCTO #2934]
(Bitbake rev: 55b814ccfa413d461d12956896364ab63eed70a8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:19 +00:00
Richard Purdie 53dec01483 bitbake: cache.py: Drop support for BROKEN variable
All it now does is function in a similar way to EXCLUDE_FROM_WORLD and
since we have a better named variable for this, lets just drop the
usage of BROKEN at the bitbake level.

(Bitbake rev: 8f4dcf794545273417d78ba18f51aa2b81606ae4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 14:06:00 +00:00
Richard Purdie cfb082961a bitbake: build.py: Dump out performance data of individual tasks
(Bitbake rev: 32aa49519e4f015e3c21466a7e5dc939f6369851)

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 14:49:05 +00:00
Richard Purdie dd335b0908 bitbake: utils.py: Add function for processing profile output
(Bitbake rev: 0df64810e8d40e7761cfd5059c0617dda31a6641)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 14:49:05 +00:00
Richard Purdie ff72823d40 bitbake: bitbake-diffigs: Don't pull in tinfoil unless we really need/plan to use it
This means we can run in parallel with other bitbake processed we're not in
task mode.

(Bitbake rev: 20222f2f16130e91eed5e68286188ee0e8f8f3bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:58:35 +00:00
Robert Yang 4a09c91ce4 bitbake: bitbake-layers: fix get_file_layer
The get_file_layer can't handle the nested layer correctly, e.g.:

meta-intel/conf/layer.conf
meta-intel/meta-cedartrail/conf/layer.conf

They are two layers, the file:
meta-intel/common/recipes-bsp/amt/lms_7.1.20.bb
belongs to meta-intel's layer, but the get_file_layer() may return
meta-cedartrail accordig to BBLAYERS' order, since it uses:

for layerdir in self.bblayers:
    if regex.match(os.path.join(layerdir, 'test')):
        return self.get_layer_name(layerdir)

which doesn't care the filename, re-match the filename would fix the
problem.

[YOCTO #3387]

(Bitbake rev: 7a31b9eac4d894c302f0e052a132c31b17d13d1f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:09 +00:00
Robert Yang 3183902e18 bitbake: cache.py: remove the duplicated self.file_depends
There are two "self.file_depends =" lines in cache.py::CoreRecipeInfo:

class CoreRecipeInfo(RecipeInfoCommon):
    __slots__ = ()

    cachefile = "bb_cache.dat"

    def __init__(self, filename, metadata):
        self.file_depends = metadata.getVar('__depends', False)
    [snip]
        self.file_depends = metadata.getVar('__depends', False)

They are duplicated, remove the last one.

[YOCTO #3795]

(Bitbake rev: 409a4aa0e166c25a8cfcd91e54f1b61cced74e87)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:08 +00:00
Cristiana Voicu 03fee6c3b1 bitbake: hob: hob do not use .hob dir for variables from local.conf and bblayers.conf
If .hob exists, hob takes the variable from there. Change to not override anymore
the variables which comes from bblayers.conf and local.conf

[YOCTO #2934]
(Bitbake rev: 00533e83038e3d5e3cd5d1be73c45afece92ec0c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:08 +00:00
Constantin Musca 1db3531cd5 bitbake: prserv: use only PRSERV_HOST
- remove PRSERV_PORT variable
- use 'hostname:port' as PRSERV_HOST format
- use 'localhost:0' for enabling the local PRServer

[YOCTO #3744]

(Bitbake rev: ad62eed9e1f0867a406e9fbfa44916a0f1ad1282)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:08 +00:00
Richard Purdie cd9ff3c676 bitbake: crumbs: Add file lost from previous commit
(Bitbake rev: 90aabeb87d6c1f00d6333cc9930626d36b6d9709)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:38:09 +00:00
Cristiana Voicu 685cde5065 bitbake: hob: combo box updated correctly
The 'select a base image' option is no longer displayed once
an image is selected

[YOCTO #3671]
(Bitbake rev: 27f2247b4c227c3b5adb1ca33d0cd7f7b492e170)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:35:06 +00:00
Constantin Musca 5fc3fc343e bitbake: persist_data: add get_by_pattern method to API
- one can use get_by_pattern to get a list of values associated
with keys that match the specified pattern

(Bitbake rev: 6ee1f58698e2d782c54ce5aec271bcec26107eac)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:35:06 +00:00
Constantin Musca 1e50274f55 bitbake: parse_py: add ~ to config_regexp
- enable the '~' character in bitbake variables

(Bitbake rev: 7c15ff1d50d7b601414f1d55c90e3c59981a0876)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:35:06 +00:00
Cristiana Voicu 37e025f6f9 bitbake: hob: Hob should display warnings generated during parsing
-now Hob catches the warnings generated during parsing, and after the parsing
is completed, if there are any warnings, it shows a bar that contains a message
with how many warnings has encountered, and a button "View warnings"
-when "View warnings" button is clicked, Hob shows a dialog with the warnings;
if there more than 1 warning, you can use "Previous" and "Next" button to see them

[YOCTO #3215]
(Bitbake rev: d7b5311d35b3974398fecabfb5ecf1effa85c27e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 19:05:31 +00:00
Cristiana Voicu 4c1ebc7ca7 bitbake: hob: progress bar changed to busy cursor when you open log file
-the first implementation for this bug used a progress bar, that is shown
during open file process; it revelead that the progress bar stops earlier
-now I have implemented using gtk.show_uri() method, that shows itself a
busy cursor when it opens a file;
-deleted the code for the first implementation

[YOCTO #2997]
(Bitbake rev: 09d1c4c2db124104b9da460547b20a2c2ff07bb3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 19:05:31 +00:00
Richard Purdie a5358511b1 bitbake: BBHandler/ConfHandler: Merge fix for multiline comments
This was meant to be squashed into the previous commit for multiline comment
handling. It fixes the case the commented multiline is followed by an empty
line which was resulting in a traceback instead of a sane error message.

(Bitbake rev: 7e7d692e244fe8dca533f842ca143b9c821e317c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 11:01:53 +00:00
Richard Purdie 73dc22b728 bitbake: bitbake: BBHandler/ConfHandler: Improve multiline comment handling
Faced with an expression like:

 # Some comment \
 FOO = "bar"

what should bitbake do? Technically, the \ character means its multiline and
currently the code treats this as a continuation of the comment. This can
surprise some people and is not intuitive.

This patch makes bitbake simply error and asks the user to be clearer
about what they mean.

(Bitbake rev: 589d31ce41e019ee6a7cb6527d67bc76c0b6382a)

(Bitbake rev: 79c00fabe08b4c210a3bd81cfaffbc47ffdc2e2b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 10:55:45 +00:00
Jessica Zhang 2ad1894520 bitbake: hob: Fix GTK+ and PyGtk version check error message to be more clear
Improve the error message the user sees if the versions are incorrect.

[YOCTO #3637]

(Bitbake rev: 7e3a99949358f4362876df5a82f8aeaae72c3c97)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:53:05 +00:00
Jon Szymaniak 94284f1ce0 bitbake: hg.py: Fixed fetch failure that occurs when SRCREV is a tag.
Removed "-r REV" from hg clone invocation to fetch the entire repo,
rather than just the subset at the specified revision. This will ensure
that the specified tag exists for successive commands (e.g., the update
built on line 149.)

(Bitbake rev: f0a6261d3a8ede9ebdb6383e02cb2c2de1690640)

Signed-off-by: Jon Szymaniak <jon.szymaniak@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:50:13 +00:00
Tyler Hall 0e408df69f bitbake: fetch2: Sort file checksums by value, not path
Changing the path to a file could change the task hash even if the file
still has the same checksum. This occurs when the task depends on
multiple files and the sort order of their paths changes. Usually the
sorting is consistent because layers tend to have the same relative
paths, but this should take care of other configuations.

The problem arose when using a .bbappend to add files to a recipe in
another layer. If the layer is located alongside the other layers and
their parent directory is moved, the hash does not change. However,
moving the .bbappend layer outside of the common directory can change
the path sort order and the task hash.

(Bitbake rev: 22bd19d208f0251f5a1f9b98f3cac66181f3fc07)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:50:12 +00:00
Peter Seebach fe30cbc2cb bitbake: bitbake: data_smart.py and friends: Track variable history
This patch adds tracking of the history of variable assignments.
The changes are predominantly localized to data_smart.py and
parse/ast.py. cooker.py and data.py are altered to display the
recorded data, and turn tracking on for the bitbake -e case.
The data.py update_data() function warns DataSmart.finalize()
to report the caller one further back up the tree.

In general, d.setVar() does what it used to do. Optionally,
arguments describing an operation may be appended; if none
are present, the operation is implicitly ignored. If it's
not ignored, it will attempt to infer missing information
(name of variable, value assigned, file and line) by examining
the traceback. This slightly elaborate process eliminates a
category of problems in which the 'var' member of the keyword
arguments dict is set, and a positional argument corresponding
to 'var' is also set. It also makes calling much simpler for
the common cases.

The resulting output gives you a pretty good picture of what
values got set, and how they got set.

RP Modifications:

a) Split from IncludeHistory to separate VariableHistory
b) Add dedicated copy function instead of deepcopy
c) Use COW for variables dict
d) Remove 'value' loginfo value and just use 'details'
e) Desensitise code for calling order (set 'op' before/after
   infer_caller_details was error prone)
f) Fix bug where ?= "" wasn't shown correctly
g) Log more set operations as some variables mysteriously acquired
   values previously
h) Standardise infer_caller_details to be triggered from .record()
   where at all possible to reduce overhead in non-enabled cases
i) Rename variable parameter names to match inference code
j) Add VariableHistory emit() function to match IncludeHistory
k) Fix handling of appendVar, prependVar and matching flag ops
l) Use ignored=True to stop logging further events where appropriate

(Bitbake rev: f00524a3729000cbcb3317fee933ac448fae5e2d)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:35:19 +00:00
Peter Seebach 4dd6d9139c bitbake: bitbake: data_smart.py and friends: Track file inclusions for bitbake -e
This code adds inclusion history to bitbake -e output, showing
which files were included, in what order. This doesn't completely
resolve timing questions, because it doesn't show you which lines
of a file were processed before or after a given include, but it
does let you figure out what the path was by which a particular
file ended up in your build at all.

How it works: data_smart acquires a .history member, which is an
IncludeHistory; this represents the inclusion of a file and all its
inclusions, recursively. It provides methods for including files,
for finishing inclusion (done as an __exit__), and for
dumping the whole tree.

The parser is modified to run includes inside a with() to push
and pop the include filename.

RP Modifications:

a) Split Include and Variable tracking
b) Replace deepcopy usage with dedicated copy function
c) Simplify some variable and usage

(Bitbake rev: b2dda721262da8abb7dc32d019e18fbc32ed8860)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:35:19 +00:00
Richard Purdie 9753283a3f bitbake: BBHandler/data: Standardise some setVar access formats
(Bitbake rev: e12c1a485f96a4701144ac81179ae1af348e5bf3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:35:18 +00:00
Bogdan Marinescu 7bfb98568a bitbake: hig.py: refactor into individual components
Since hig.py was becoming too large (which impacted maintenance and
operations like git merges) it was split into individual files for
the classes that were implemented in hig.py. hig is now a Python
package (lib/bb/ui/crumbs/hig/). The patch was tested by
building core-image-basic/qemux86 in Hob and accessing the various
UI elements implemented in hig. Note that the patch does not change
the functionality of Hob in any way, it's just a code refactoring
that should make life a bit easier for Hob developers.

[YOCTO #3200]

(Bitbake rev: a7a2b730f915cafe7aa30539622dd1ca64ae41f5)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16 12:51:33 +00:00
Richard Purdie 39eb22bbc4 bitbake: build.py: Fix traceback when there are no dependencies
A recipe with no dependencies results in a traceback (e.g. all in
ASSUME_PROVIDED). This shouldn't happen and this patch fixes it.

(Bitbake rev: dee7decf87dfa8cb966fe40846d27f3e6ab1846b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 17:38:23 +00:00
Constantin Musca d0f35207f9 bitbake: fetch2: remove localcount and use AUTOINC instead
- do not use the BB_URI_LOCALCOUNT database for computing revision
incremental numbers anymore
- sortable_revision now generates "AUTOINC+${latest_rev}"
- use one incrementing value rather than several
- PV becomes 0.1+gitAUTOINC+deadbeefdecafbad_decafbaddeadbeef
- remove all localcount code and simplify the fetcher
- this patch addresses the following proposal:
http://lists.linuxtogo.org/pipermail/bitbake-devel/2012-November/003878.html

(Bitbake rev: 61cf01c5c236b4218f40cfae7c059c2b86765dbd)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:42:19 +00:00
Richard Purdie f39e75ddef bitbake: data: Ensure emit_func honours vardeps flag
Currently, calling a shell function using exec_func may result in
dependent functions being missing, if the shell parser can't detect
the dependency, even if it was specified with the vardeps flag.

This patch ensures the function looks at the flag and considers it
when deciding which other functions need to be output.

[YOCTO #3561]

(Bitbake rev: a906c94328b040d5076571bd593b57be7ee403a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:42:19 +00:00
Cristiana Voicu 958162e96b bitbake: hob: use base image only if it was set
As it is, when you create a new image from scratch, hob gives an error.
This is because of the patch for #2601.

(Bitbake rev: 42d9db0cc80ed45d769f843ccb51e0c194ec557b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 17:31:31 +00:00
Cristiana Voicu f9d9cc87c5 bitbake: hob/bitbake: custom image is now using the base image
Till now, a custom image made in Hob was using only the packages from
the base image. Now it is using everything declared in the base image.
Also next to hob-image.bb, it creates another .bb file which is used
in building process. Those images are ignored by git.

[YOCTO #2601]
(Bitbake rev: 22007cf71a00fbb03b40f97201a6eb06c9aebd16)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:49 +00:00
Mihai Lindner a947b547d0 bitbake: knotty: use bb.error instead of print
Change to use bb.error instead of print, or maybe that was desired (?)
Also remove a tab, while in the neighborhood.

(Bitbake rev: 4a36a1af71530afc8fa896271fa94362ead176bd)

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:49 +00:00
Robert P. J. Day ad29d14099 bitbake: git.py: A bit of tidying up regarding grammar and supported protocols.
Doc cleanup, no functional change.

(Bitbake rev: 5161a84f5dcfe748382a5073349bf10ed21641f9)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:48 +00:00
Eren Türkay 6ec6bf4e4f bitbake: bitbake.vim: detect *.bbappend files in ftdetect automatically
Currently, *.bb and *.bbclass files are automatically highlighted and
detected as a bitbake file. Since *.bbappend files are also bitbake
files, vim plugin should automatically detect and highlight it as well.

(Bitbake rev: 0668a0ea968baf930f05806a5452c8dbe4ec35ce)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:48 +00:00
Richard Purdie 853d707af5 bitbake: data_smart/BBHandler: Fix SkipParse exception handling
If SkipParse is raised from something which isn't anonymous python, it wasn't
being handled correctly. This improves the handling for example from within inline
python.

(Bitbake rev: 7467d7d66b24cc8f43ab168e65895e7c4aee6092)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:04 +00:00
Richard Purdie 5d968368bc bitbake: bin/bitbake, bb/__init__: Move BBDEBUG handling to bin/bitbake
The method this older code was accessing doesn't exist. A library shouldn't
be changing behaviour based on the environment anyway when sepcific function
calls exist to correctly setup the logging. Fix the crash if BBDEBUG was used
by moving the code to bin/bitbake.

[YOCTO #3319]

(Bitbake rev: 3a1b75037fe1e5282ffd40b037e93353405faa45)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:04 +00:00
Richard Purdie dc637ae860 bitbake: command: Fix getCmdLineAction bugs
Executing "bitbake" doesn't get a sane message since the None return value
wasn't being handled correctly. Also fix msg -> cmd_action['msg'] as
otherwise an invalid variable is accessed which then crashes the server
due to the previous bug.

(Bitbake rev: c6211291ae07410832031a5274690437cc2b09a6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:04 +00:00
Richard Purdie 1572c1517c bitbake: command: Add missing import traceback
Without this, if an exception occurs the server will silently crash
with no feedback to the user about why (since traceback isn't imported).

(Bitbake rev: e637a635bf7b5a9a2e9dc20afc18aceec98d578f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:03 +00:00
Richard Purdie 3dc3fe32e3 bitbake: BBhandler/data: Fix __inherit_cache duplication
The inherits cache contains duplicate entries, some with the full patch, some
just starting classes/xxx. This is a waste of parse time and potentially
error prone. This patch fixes various pieces of code so the absolute paths are
always preferred and work correctly. The inherits_class function did not work
with full paths so the patch fixes this.

(Bitbake rev: f3a71e509af196391ec126d079cf1bd178e62ad5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:59:42 +00:00
Richard Purdie 8ead7dc3cc bitbake: BBHandler/ast: Simplify/fix EXPORT_FUNCTIONS usage
The current usage of EXPORT_FUNCTIONS is rather problematic since a class
list (classes) is passed into the ast statement and cached as it was
when first parsed. This class list may be different in other cases but
is locked once in the cache.

Worse, the construction of classes can be broken by exceptions during parsing
at the wrong moments since the state of the parser is not always reset
correctly. This can lead to leakage of other classes into the classes list.

The current EXPORT_FUNCTIONS implementation looks at the last two currently
inherited classes and sets up an indirect function call view the second last
class inherited, e.g.:

 do_configure calls gnomebase_do_configure
 gnomebase_do_configure calls autotools_do_configure

This intermediary doesn't seem to serve a useful purpose.

This patch therefore makes builds deterministic and fixes various cache problems
and indirection by removing the intermediaries and simply performing
directly mapping for the cases where its needed.

(Bitbake rev: 9fc98f96f0e0320beda0ce9546275a99336732c1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:59:42 +00:00
Richard Purdie c607095894 bitbake: Revert "BBHandler: Ensure parser state engine is correctly reset for new parsing"
This reverts commit 3dc5e896a97154914cee6c47900e3bb2a2627cdb.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 18:09:01 +00:00
Richard Purdie 23200858b4 bitbake: BBHandler: Ensure parser state engine is correctly reset for new parsing
The classes variable in particular could be in an odd state if parsing of a
previous recipe had abruptly ended.

(Bitbake rev: 3dc5e896a97154914cee6c47900e3bb2a2627cdb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:13 +00:00
Richard Purdie ce6199fd98 bitbake: xmlrpc: Unbreak the transport by adding a missing logfile name
I appreciate a fixed value is suboptimal but this is better than not
working at all!

(Bitbake rev: d338a1ad14680af41d218772decd03e98eb2cad5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:02 +00:00
Richard Purdie 7e1e4aeea2 bitbake: uievent: Fix an init race
There is a race where the registerEventHandler() server call may happen in
a different thread to the main UI, causing the main UI to see
httplib.CannotSendRequest exceptions.

This moves the call into the main thread, removing the init race and fixing
errors I was seeing with the xmlrpc backend.

(Bitbake rev: 14cdd3b351d1ab23cb3ea5f853e403a53e67ac1c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:01 +00:00
Cristiana Voicu e77f0570e8 bitbake: hob: modified how the existence of a variable is checked
(Bitbake rev: 4214ffff2c8a2a1fe66cbade03d2fd9e22a682d2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:01 +00:00
Richard Purdie 73f57eb939 bitbake: data_smart: Improve get_hash to account for overrides and key expansion
An issue was uncovered where changing:

IMAGE_INSTALL_append = "X"

to

IMAGE_INSTALL_append = "X Y"

in local.conf would not get noticed by bitbake. The issue is that
the configuration hash doesn't account for overrides or key expansion.

This patch improves get_hash to account for these. This means the hash
does account for changes like the above.

[YOCTO #3503]

(Bitbake rev: 86bf1f5603e8f98019544e45f51bd0db9a48112a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 15:13:17 +00:00
Richard Purdie 525cc08cc5 bitbake: build.py: Preserve sigdata files in the stamps directory
Leaving the sigdata files around can aid debugging and doesn't harm
anything. This is the easiest way to allow this to happen.

(Bitbake rev: 1f500149ecd533a6edbeea902c3f1e009c755154)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 15:13:17 +00:00
Richard Purdie 9de050111b bitbake: build/siggen.py: Avoid removing too many stamps when cleaning
The "*" part of the mask is to ensure we clean both any stamp, and any
setscene varient. It turns out we would also trample other tasks,
e.g. do_package_write could trample do_package_write_rpm. do_package also
tramples do_package_write_* but this is less of an issue since the other
tasks depend on it.

Rather than use the wildcard, we can just use a list instead.

[YOCTO #3484]

(Bitbake rev: c14d831ea3f625e9a47266a0c4e6deefc924ca5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28 14:14:07 +00:00
Cristiana Voicu 4493b107a7 bitbake: hob: when BBLAYERS_NON_REMOVABLE is not set hob shows an error
(Bitbake rev: a40ceda3b349c4461f4b7bc0e18cd966fff5e3cf)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28 09:19:46 +00:00
Cristian Iorga a0cf759537 bitbake: fetch2/wget: Fix for mixed-up wget commands
wget commands for check and resume were
mixed-up, leading to the following issues:

1. long running "NOTE: Preparing runqueue"
reason: objects were downloaded, not spidered on the mirror
2. Failing network test in Build Appliance, because wget 1.14
(in use in BA) will fail if a file already exists.
During the network connectivity test, index.php file was
actually downloaded, not spidered (checked for existence on
yoctoproject.org website), leading to wget failure.

(Bitbake rev: d7a5185cae975eaca50a9785c6605e895dc7bb51)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 20:57:30 +00:00
Richard Purdie 408a0d8b25 bitbake: fetch2/local: Fix bug introduced by expression ambiguity
The last changes introduced an error in some of the logic. Add brackets
to clarify the meaning of the expression and fix certain build failures.

(Bitbake rev: 87aea65bd5d553bd0495b0f1efe6d41d0bb2810f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 20:57:30 +00:00
Cristiana Voicu 73b9f64357 bitbake: hob: make some layers non removable
- there are some layers which cannot be removed; so ,I have used
a new variable called BBLAYERS_NON_REMOVABLE located in bblayers.conf,
which contains those layers which cannot be deleted
- "meta-hob" layer is added to this variable in hob code, like it's
added to BBLAYERS var

[YOCTO #3176]
(Bitbake rev: 05da1621eed4c6201cd65372d229f63ea8a44b6e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 20:57:30 +00:00
Richard Purdie c6dc0b9767 bitbake: Update version to 1.17.0
(Bitbake rev: cc7fdbdc607df530f5539b162831bf9998eb48d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 6a2ce81fc6 bitbake: fetch2: Avoid using FILESDIR in unpack
Currently there is code which uses FILESDIR in unpack to ensure
parent directories are created, leading to differing behaviour depending on
which search path is used to locate the directory.

This change standardises the code and takes the data from the fetcher in
question meaning we can standardise the code and deprecate FILESDIR.

(Bitbake rev: 1cccb3bd01ed82e4978acfef0fda1bd797eef72a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 7420cf5d67 bitbake: fetch2/local: Improve handling of wildcard matches
Currently wildcard matches end up working by FILESDIR being defined
in the metadata to a default of "." in FILESPATH which is hacky at best.

This patch adds the behaviour into the fetcher so its at least slightly
more explicit.

(Bitbake rev: 07b5f84133ac79aac4e939ea5f24390ad7f940a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 9be83df144 bitbake: knotty/msg: Avoid usage of curses initscr/endwin to avoid terminal corruption
Using curses initscr/endwin causes screen corruption if for example you
suspend bitbake and resume it. This changes the code to use a less
invasive approach to determining colour availability on the terminal.

(Bitbake rev: 4548a8f037eaf8d47a77052acc3e9ec264ac41e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25 21:36:44 +00:00
Constantin Musca 8a3dd9e908 bitbake: hob/builder: Don't rerun sanity checks
Run the sanity check only once

[YOCTO #3377]

(Bitbake rev: 0db80d57d4d2b1bb97375444c439827450ff33d1)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25 21:36:44 +00:00
Cristiana Voicu f26d3e8d5f bitbake: hob: showing when build fails because out of disk space
-to enable this in hob, first you have to enable this in bitbake using
BB_DISKMON_DIRS and/or BB_DISKMON_WARNINTERVAL vars
-created "restart the build" action on the build_fail_top_bar

[YOCTO #3357]
(Bitbake rev: 964ac25d153ff4da144963289a32066db0e28b89)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25 21:36:44 +00:00
Richard Purdie dee77eca39 bitbake: server/process.py: Change timeout error handling
In normal usage, we never hit the timeout issue. If we do, it becomes obvious
that the current error handling is not good enough. The request may have made it
to the server and the answer will get queued. This means the next command may get
the return value from the previous command with suitably puzzling results.

Without rewriting large sections of code, its not possible to avoid this problem.
It is better to increase the timeout to several seconds giving the server a chance
to respond and if it does timeout, hard exit since recovery is not possible with the
code base today.

I'd be happy to see the structure of this code improved but this quick fix at least
stops corrupted builds from happening which has to be a good thing.

(Bitbake rev: 410c11dd10736873f2dc587fbe9119c38831e693)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-21 09:22:22 +00:00
Seth Bollinger cbdc81456b bitbake: knotty: Colorize knotty interactive console output
Add bold color output to log level name and standard color output to log msg
when bitbake is run from an iteractive console.  Color output is only
enabled
if the terminal supports color.

Used Jason Wessel's recommendation for transparency on verbose, note and
plain.

(Bitbake rev: 2734240da2cc150f811129a6adf6eb4b2161b204)

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:57 +00:00
Cristiana Voicu e3bda7f986 bitbake: hob: warnings during the build should be displayed in the Issues tab
Any issues encountered during the build (fatal or not) is displayed
in the Issues tab, and the total number of issues is changed.

[YOCTO #3376]
(Bitbake rev: 64c662ab7f09c2e867445e8ba21ea63ae014d45b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:56 +00:00
Richard Purdie 328f74a556 bitbake: runqueue: Allow partial setscene task coverage
When the setscene code was originally written it was thought that we'd
allow "partial" coverage. For example, if we just want to build the target
"bash:do_populate_sysroot" and its available from sstate, it makes no sense
to install gcc-cross's sstate package as its simply not needed.

Due to various other issues in the codebase, this functionality was
disabled/removed to allow the setscene code and sstate to stabilise and allow
us to concentrate on other problems.

The time has now come to enable "partial" coverage. There are two major changes
in this patch:

a) Creation of an unskippable list. This lists direct dependencies of
   build targets and hence things that cannot be skipped.

b) Addition of a handler which looks at a given setscene target and what depends
   on it and then decides whether its necessary.

(Bitbake rev: 2a937cd6a6c3110030b40bc4d85e349b85cb4db7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:56 +00:00
Richard Purdie 5de7744a49 bitbake: parse/cache/cooker: Preserve order in the file inclusion list
The data returned by get_file_depends() may me used in contexts like
checksums where order is important. The current usage of sets means
that some of the checksums can change in circumstances they should not.

This patch changes to use lists, thereby removing the problem.

(Bitbake rev: a44285fc4109236ab89f7aad0a1fc9220eec19b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:56 +00:00
Christopher Larson c176e5a3fe bitbake: knotty: kill duplicated import of 'time'
The duplicated import could result in an UnboundLocalError.

(Bitbake rev: a098cebd5c33ebd704efd35d9e655262283cbe1f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14 14:39:07 +00:00
Robert Yang 41125ddc86 bitbake: print clear message for "bitbake -e ASSUME_PROVIDED"
"bitbake -e ASSUME_PROVIDED" should fail, but the error message wasn't
clear enough in the past:

$ bitbake -e bzip2-native
[snip]
ERROR: Command execution failed: Traceback (most recent call last):
  File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 94, in
runAsyncCommand
    commandmethod(self.cmds_async, self, options)
  File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 323, in
showEnvironmentTarget
    command.cooker.showEnvironment(None, pkg)
  File "/buildarea/lyang1/poky/bitbake/lib/bb/cooker.py", line 325, in
showEnvironment
    fnid = taskdata.build_targets[targetid][0]
KeyError: 0
[snip]

With this patch, the massage will be:
[snip]
ERROR: bzip2-native is in ASSUME_PROVIDED
ERROR: Command execution failed: Exited with 1

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

[YOCTO #3392]

(Bitbake rev: f31447dac92454c822d4ebb7dd48e96c6c69dde4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-13 14:21:16 +00:00
Cristiana Voicu 4e2b5a5929 bitbake: hob: hob was freezing because it doesn't receives well the log file
-after pressing "build image" button, hob was freezing because it didn't
receive well the log file

[YOCTO #3398]
(Bitbake rev: e3619e34d43c3f7725fc83c362d8cbd07e153ebe)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-13 14:11:24 +00:00
Christopher Larson c1c20c02a0 bitbake: command: add error to return of runCommand
Currently, command.py can return an error message from runCommand, due to
being unable to run the command, yet few of our UIs (just hob) can handle it
today. This can result in seeing a TypeError with traceback in certain rare
circumstances.

To resolve this, we need a clean way to get errors back from runCommand,
without having to isinstance() the return value. This implements such a thing
by making runCommand also return an error (or None if no error occurred).

As runCommand now has a method of returning errors, we can also alter the
getCmdLineAction bits such that the returned value is just the action, not an
additional message. If a sync command wants to return an error, it raises
CommandError(message), and the message will be passed to the caller
appropriately.

Example Usage:

    result, error = server.runCommand(...)
    if error:
        log.error('Unable to run command: %s' % error)
        return 1

(Bitbake rev: 717831b8315cb3904d9b590e633000bc897e8fb6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:22 +00:00
Cristiana Voicu 99fa251b56 bitbake: hob: providing details about process state through porgress bar
-small changes to the text of the progress bar when parsing recipes

[YOCTO #3282]
(Bitbake rev: 90c0dfc39c3ce13e53c7c91168dc3401f7df476b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:22 +00:00
Richard Purdie e450b10c4c bitbake: bitbake/server: Remove dead console log code
This code is dead and doesn't do anything so lets remove it.

(Bitbake rev: 8d45739f49618757a5d7d79782deda355e3981ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:21 +00:00
Richard Purdie f5acdd87bd bitbake: cooker.py: Don't dump the environment into the console log file
Dumping the environment data into the console log files directory is
invariably not what the user wants or expects and leads to confusion
when looking at the log directory.

This change forces the logs to be disabled by default when using
the -e option.

(Bitbake rev: 5d825b31d1133e41d3982db1b94f6a30a6fb99f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:21 +00:00
Richard Purdie 62651064d1 bitbake: uihelper: Set update flag when start event encountered
Its a minor correctness detail but the update flag should be set
when Start events are encountered.

(Bitbake rev: 96683ed68e11672ff22fb4a291d2628676c136f0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30 16:55:40 +00:00
Richard Purdie 44c5d3dc84 bitbake: knotty: Ensure last tasks are disaplyed correctly in the footer
There was an issue where the last tasks run by bitbake would not
correctly get displayed in the knotty footer. This was due to the
total count including active tasks. This change ensures the footer
is displayed if the are any running tasks.

(Bitbake rev: d787e4efc106589811651bc18ca48d5223443b95)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30 16:55:39 +00:00
Cristiana Voicu 93c04c16e4 bitbake: hob: reordering the layers in the Hob Layers dialog
-since the order of the layers can potentially impact
the build outcome, users should be able to reorder
the layers within the layers dialog;
-used TreeView Drag and Drop

[YOCTO #3270]
(Bitbake rev: 2bd9a00facb90f7d76a9bdaa86ca765fb2159e71)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:55 +01:00
Cristian Iorga 30d1943a79 bitbake: hob/hig: Hob doesn't save properly proxy settings
User introduced proxy settings were not saved
when a proxy details input dialog was opened.
The proxy settings were lost upon return, and
restored from the previously stored one.

Also:
Code cleanup:
details_cb() function duplicate definition
removed

Fixes [YOCTO #3240]

(Bitbake rev: aa64b2e472f8a9713e3dc25647aa2cae474e2622)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:55 +01:00
Cristiana Voicu 55cdbd516d bitbake: hob: during recipe parsing, progress bar text provides details about the process state
- indicating on progress bar that hob has gone from parsing
recipes to "Generating dependency tree"; this will provide
some visibility of what has caused the "stop" button state
to change

[YOCTO #3282]
(Bitbake rev: d964d04ff1f59a590bd3ab5430517d79e92536d0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:54 +01:00
Cristiana Voicu a9c563b1b5 bitbake: hob: add a progress indicator when you select 'view log'
- created a new file named "hobthreads.py", defining a thread
for opening the log file in a subprocess using subprocess module;
in the future I think we will add some other threads here, to
implement some other performance issues
- on "builddetailspage", "packageselectionpage" and "imagedetailspage"
I have changed the manner for opening the log file; it uses the thread
to open the file, and on main thread it creates a dialog to show a
progress bar, which pulses till the file is open
- this was added because when the log file is big, it takes time to
be opened; on the dialog you can use "Cancel" button to terminate the
process initiated to open the file

[YOCTO #2997]
(Bitbake rev: 165362a63f085991b6bab63ab90a0c7b9bf6b784)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:54 +01:00
Cristian Iorga 59943ca967 bitbake: bitbake: hob/builder: Hob crashes because of bad init
Image selection is not properly initialized to none,
and it used before having a chance to have a value.
Due to dynamic nature of Python, variable is used before
it exists, in this case. This causes a crash.
Bug introduced during the fix of [YOCTO #3228]

Fixes [YOCTO #3334]

(Bitbake rev: 1c540541c5397c38dca880a79df9ebfcda576d4c)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-25 17:50:19 +01:00
Cristiana Voicu 33440ee706 bitbake: hob/settings: add a scroll bar for the box with mirrors
- added a scroll bar in the shared state tab from settings
- added a signal on it, so when you add a new mirror, it will
auto-scroll to the end of the list

[YOCTO #3229]
(Bitbake rev: 00afd6a25c0cc0a4fcddd9f7c26a17ef6c47cbd2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:08 +01:00
Cristian Iorga 8cad1e343e bitbake: bitbake: hob/builder: Image selection is remembered while changing adv settings
Image selection is remembered correctly even after
advanced settings have been changed.
Selected image was reset even when it was not the case.

Fixes [YOCTO #3228]

(Bitbake rev: 93fb0a2c56100b2bbc8769af9ae2343c05e72193)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:08 +01:00
Cristiana Voicu a975e6bb19 bitbake: hob/builddetailspage: set "Log" page as default
- when you do a build you should see "Log" page, not
"Build configuration" page

[YOCTO #2569]

(Bitbake rev: 431cb80d4d5222f832f6141b8578291f2f14a131)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:08 +01:00
Cristiana Voicu 62e9f768cd bitbake: hob/imageconfigurationpage: progress bar shows when recipe parsing is stopped
-when the recipe parsing process is stopped, the progress bar shows
"Stopping recipe parsing"

[YOCTO #3259]
(Bitbake rev: d20626bd717bb8f5cfd73b91337af880198db247)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:07 +01:00
Cristian Iorga 4a3b0d7287 bitbake: bitbake: hob/hobwidget: "Brought in by" column is now displayed correctly
In "Edit Recipes" and "Edit packages" pages, the "Brought in by"
column is displayed correctly, with the right number of additional
packages and a proper title.

Fixes [YOCTO #2195].

(Bitbake rev: 4d1d3e5a54eb718e2eee02f734d929f15ccf99ce)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:07 +01:00
Andrei Dinu b3374dbfd0 bitbake: hob: stop build without percentage shown
added a method in progressbar.py that doesn't update the
percentage in the progress bar shown in hob.

the call of the method is done in builder.py.

(Bitbake rev: 7ab5775fceda1055b86bdc3313fc4bf928bf5155)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:07 +01:00
Cristiana Voicu 9cf610680f bitbake: hob: change behavior for "cancel" button from the Recipe selection page
-when returned to the Image configuration page, after canceling on the
Recipe selection page, the image selected previously is now shown corectly

[YOCTO #3205}
(Bitbake rev: 0a755026661a18ae386eb64b807e9e9e8f0dfe4c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:07 +01:00
Andrei Dinu 759dadf80a bitbake: hob: image size displayed wrong size in edit packages screen
size_str = '%.1f' % (size*1.0/(1024*1024)) + ' MB'
    from /bitbake/lib/bb/ui/crumbs/hobpages.py file transformed
    the size in MB. In our file it was again multiplied by 1024
    instead of doing a division by 1024, which brought a faulty size on
    the edit packages screen.

(Bitbake rev: 7dcea3884a45973ae332695dc8a53814b701151f)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:07 +01:00
Bogdan Marinescu 6cc2f06d43 bitbake: event/hob: Add a button for network tests in the proxy settings
This patch allows the user to check the network connectivity in
the "Proxy" page ("Settings" dialog) by adding a button which provides
this functionality. It also disables retrigerring sanity checks if the
proxy values are changed, since now the proxy checks are explicit.
Note that this patch depends on a patch in oe-core
("sanity.bbclass: trigger network tests explicitly"). It will
not work properly if the patch in oe-core is not merged.

[YOCTO #3026]

(Bitbake rev: cb1354d29c0be27aee57b9783c724457ef6725fb)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:06 +01:00
Andrei Dinu cf24179d65 bitbake: hob-toolchain: task-core-standalone-sdk-target renamed to packagegroup-core-standalone-sdk-target
This change also applies to task-core-standalone-sdk-target-dbg and resolves
build failures caused by the missing packages.

(Bitbake rev: 4cd0200e96fb282980a945b80af641a6e022e0b4)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-10 15:06:12 +01:00
Cristiana Voicu 2c3e8280e6 bitbake: hob/imageconfigurationpage: a 'hob-image' appears listed in the base image combo box
-remove this image from image combo box

[YOCTO #3230]

(Bitbake rev: 90fd57ee3cb2856c10bda1f5af4879d2b7cf2668)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-08 16:23:34 +01:00
Constantin Musca 8d019a77d7 bitbake: hob/hobeventhandler: Describe the runCommand failure exception
[YOCTO #1245]

(Bitbake rev: 17f28f09452f70dfb67fce9a397a99deec84dfe5)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-08 16:23:33 +01:00
Constantin Musca 8202e49c5f bitbake: hob/hobeventhandler: Throw an exception if runCommand fails
- throw a Hob exception if runCommand returns 'Busy' or
'No such command'

[YOCTO #1245]

(Bitbake rev: 5a8e3baa66f845599a616f080a7efce81ecda631)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-04 14:07:52 +01:00
Constantin Musca 73182ed4ea bitbake: hob/imagedetailspage: disable the deploy tool for qemu machines
- qemu images cannot be deployed to hardware, even if live
images (hddimg and iso) files are created

[YOCTO #3196]

(Bitbake rev: 001b1c439ffa450cb8728b0fa9469fed63ae9bed)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:30:19 +01:00
Cristiana Voicu 9c7189d74c bitbake: hob/settings: alignment and spacing fixes on "Shared state" tab
-alignment and separation on vertical and horizontal axis
-change controls width
[YOCTO #3188]

(Bitbake rev: a84c466eae7c2616c041faf930163f23834f0685)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:30:18 +01:00
Ioana Grigoropol 93fdfafbfc bitbake: hob/image_details/run_image: Kernel must be set
- when displaying image details, even if the kernel information is not shown, the kernel value must be set (if dealing with qemu) otherwise running the image will throw an error
(Bitbake rev: 334125a98ecb8a938aee4bc530205ad75099361c)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:30:18 +01:00
Paul Eggleton 0e6cc44a11 bitbake: fetch2: raise an exception if user specifies protocol=git with http://
It is a common mistake to use http:// and protocol=git when attempting
to fetch from a git repository using the http protocol; if this is
detected then throw an error explaining that you need to use git:// with
protocol=http instead.

(Bitbake rev: 5bc4930c1638db16bcd5f9c8cfc4081f9ffc192b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:30:17 +01:00
Richard Purdie 2f9328ff32 bitbake: providers.py: Fix PREFERRED_VERSION containing epochs
For some reason the code calls int() on the epoch component of any
PREFERRED_VERSION. Since this is compared against strings, the comparison
would always fail. This removes the stray cast and allows epochs
in preferred_version to work correctly.

[YOCTO #3187]

(Bitbake rev: 117b47553970fc5307374cbf500744b7c302efb4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 13:33:26 +01:00
Constantin Musca 999f7c2601 bitbake: hob/hobpages: Generate the title label every time
- the title label is destroyed at page switching (that's why we need
to generate it every time)

[YOCTO #3195]

(Bitbake rev: d6d991c08f66cf9ab27c53075109212ea9129380)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 17:19:28 +01:00
Cristian Iorga 7c2b1d5366 bitbake: hob: Improved behavior for error reporting window
Scrollbars have now an automatic behavior, depending on
the error's text size and error window size.

Fixes [YOCTO #2983]

(Bitbake rev: 0c0a25672498520fb2c46164f08959dda83c61e0)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 16:48:33 +01:00
Richard Purdie 6494c05e80 bitbake: Update version to 1.16.0
(Bitbake rev: a579754a04bdcf450e6957dde614a15c11df39e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:56 +01:00
Bogdan Marinescu 876ef4918f bitbake: hob: Further improvements to hob dialogs
1. Replace some labels in the "Build environment" tab
2. 'defaultsetup' changed to 'Default' in the "Image types" tab
3. Fixed the moving icon in the "Output" tab

For more details: https://bugzilla.yoctoproject.org/show_bug.cgi?id=2162

[Yocto #2162]

(Bitbake rev: db7d98569117b7a75262eb555e1c7ae9a421bdf8)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:55 +01:00
Constantin Musca a2783d2f64 bitbake: hob: Fix 'User selected' tag functionality
- the 'User selected' tag is only used when the user
selects a package
- fix hob to remember which packages are 'User selected'
- if the package is already brought in by some other package,
it should not appear as 'User selected'

[YOCTO #3108]

(Bitbake rev: 2391e9ba7034d4f90bafa5732d8efa8166f69950)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:55 +01:00
Cristiana Voicu 2df5a30ef0 bitbake: hob/settings: Change the 'Delete' button behaviour in the shared state settings tab
-the tab shows an empty mirror row when no mirror is configured
-able to delete the mirror row even if it's not empty(if it's not
the first mirror)

[YOCTO #3189]
(Bitbake rev: d6472608112b8af2e98f247e6f89a7f948b2d020)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:55 +01:00
Ioana Grigoropol 58a99ebe3c bitbake: hob/image_details: Remove kernel info from details
- removed kernel information from image details

[Yocto #3002]

(Bitbake rev: 7fc33f0a8a38d9b8984bf884e47e505791536d16)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:54 +01:00
Richard Purdie d3529e2fab bitbake: tests/utils: Add test for explode_dep_versions2
(Bitbake rev: b1b0aabfab3c94c3b515070d0fb4d7819e2548bc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:54 +01:00
Richard Purdie c4d857debf bitbake: utils: Add explode_dep_versions2 to replace explode_dep_versions
The API for explode_dep_versions is flawed since there can only be one version
constraint against any given dependency. This adds a new function with an API
without this limitation. explode_dep_versions() is maintained with a warning
printed when its used in a situation where information is lost.

This should allow a simple transition to the new API to fix the lost dependency
information.

join_deps() is updated to deal with data in either format.

(Bitbake rev: babeeded21827d8d3e7c7b785a62332ee9d45d4f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:54 +01:00
Mark Hatle 9a283519b2 bitbake: utils.py: Allow explode_dep_versions comparisons to have arbitrary whitespace
Refactor the explode_dep_versions to be more lenient on whitespace values.

The required format is:
   foo (= 1.10)
   foo (=1.10)
   foo ( = 1.10)
   foo ( =1.10)
   foo ( = 1.10 )
   foo ( =1.10 )

(Bitbake rev: 39c1c12c58fadd854098cf14ebe92f4d307a36dd)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:53 +01:00
Mark Hatle e7ba10c1de bitbake: utils.py: Check for duplicate dependency entries
explode_dep_versions is not able to have duplicate entries.  Previously
duplicate entries ended up with the last item being the one returned to
the caller.

We now detect a collision.  We do allow an empty item to have a comparison
added to it, or a duplicate with the same comparison without error.

When a collision is detected a ValueError exception is thrown.

Allowed:
   foo foo (= 1.12) foo

Invalid:
   foo (= 1.12) foo (= 1.13)

(Bitbake rev: d40448f0483a2959e9dcaac9b6dd35839f396a6e)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 11:40:53 +01:00
Bogdan Marinescu 71107aa1ad bitbake: Fix bad merge of #2162
This patch fixes the bad merge of #2162 fixes on master.

(Bitbake rev: 5b84d88f2a47063197f9a20f8ebf0a7ccf22c2eb)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 16:42:09 +01:00
Cristian Iorga 183ffd2048 bitbake: hob: Error reports are done in a clearer way
For long errors (bigger than 200 letters),
the text box is scrollable and resizable
and text is selectable.

Additionaly, all message dialogs are modal.
Otherwise, a user could still interact with hob
even in an error case, leading to potential problems.

See design details in related bugs.

Fixes [YOCTO #2960], [YOCTO #2983]

(Bitbake rev: be8bf02f2b347edf5514cafc6cb6a44f71118736)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 16:42:09 +01:00
Constantin Musca 1a85fc8f5b bitbake: hob/builddetailspage: fix failure_primary_action_button_clicked_cb
[YOCTO #3194]

(Bitbake rev: 660a449bdfd154fed556024f166e69c6931ff634)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 15:35:16 +01:00
Cristiana Voicu e2ac27c051 bitbake: hob/builddetailspage: remove "back" button
When a build fails, there should not be a back button on the screen.
All available actions are provided within the failure notification,
so no back button is needed.

[YOCTO #3104]
(Bitbake rev: 03f978d21c7bfbf5f1afc741a43766030f2882a8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 15:35:15 +01:00
Richard Purdie 49649451cb bitbake: knotty: Allow displaying of status when no tasks are active
The console can appear to hang when no tasks are executing even if bitbake
is iterating through a large number of tasks behind the scenes.

This patch tweaks the footer code to display a status even when no tasks
are active to give the user better feedback about what is happening.

(Bitbake rev: 0a950ee14fce3a0cb938c22d7c717dc93ce6e25f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 11:15:05 +01:00
Richard Purdie b85c30bb7d bitbake: parse/ConfHandler: Add negative lookahead to spot some quoting problems
Syntax like:

FOO = "bar" # eek"

would result in FOO taking the value 'bar" #eek' which is clearly
not the intention. Whilst our metadata is riddled with mixtures of even
quotes like:

FOO = "d.getVar("X")"

odd numbers of quotes seem rare. This patch adds detection of one odd
quote which we don't have any of in OE-Core so it seems a valid sanity
improvement.

(Bitbake rev: 5f892d9b083550e20e37576070ec7d1a94cc88fe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 11:15:04 +01:00
Ross Burton 649048e537 bitbake: hob: set modal flag on progress dialog
The entire interface isn't usable whilst the progress dialog is up so we might
as well set the modal flag so that some WMs (such as GNOME 3) can do nice things
with the dialog (such as pin it to the titlebar).

(Bitbake rev: 9a19fe8e8c65b75dbbb4ae5401df6d6838495bdd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 11:15:04 +01:00
Cristiana Voicu 1ad53437c4 bitbake: hob/settings: implement a new tab in settings dialog to show SSTATE_MIRRORS
Add a new tab to show correctly SSTATE_MIRRORS variable. Now you can add new
mirrors or delete mirror. "info" image was also changed( it is smaller, so it
can be next to labels).
>From "Build environment" tab, SSTATE_DIR and SSTATE_MIRRORS vars were removed.

[YOCTO #2893]

(Bitbake rev: ae27a7cf4d31a1b99840a761a27fd6256cb1dd9b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 11:13:08 +01:00
Richard Purdie a8c78aa835 bitbake: Add missing file from previous commit
(Bitbake rev: 5bc0f0e70f7272ff84aaeca43dcf4bb4bc0f5c3f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28 09:56:26 +01:00
Constantin Musca f40bfd2e5f bitbake: hob/builder: When you stop a build, Hob should tell you stopping is happening
- use the progress bar text to indicate the stopping status
- the text should say: 'Stopping the build...'

[YOCTO #3152]

(Bitbake rev: 6f59db920ca4f527606670969c79afbf34eaff81)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:28 +01:00
Paul Eggleton 81602499c9 bitbake: lib/bb/data.py: improve output for expansion errors
Instead of logging the function/variable separately as a NOTE when
failing to expand, re-raise ExpansionError with more contextual
information. This means that the full details are reported in Hob as
well as actually reporting the original error message in any UI where
we previously did not. For example, we used to get this with tab/space
indentation issues in a python function:

NOTE: Error expanding variable populate_packages
ERROR: Unable to parse /path/to/recipename.bb

Now, we will get this:

ERROR: ExpansionError during parsing /path/to/recipename.bb: Failure
 expanding variable populate_packages: IndentationError: unindent does
 not match any outer indentation level (<string>, line 4)

Fixes [YOCTO #3162].

(Bitbake rev: ce5c7a95a359cdaecab7c4a519ad4f9df029da82)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:28 +01:00
Paul Eggleton 31f0de42fc bitbake: cooker: adjust layer dependency error messages
Make these a little easier to understand.

(Bitbake rev: 84ab874c8818484d37ee438aab27486fff497705)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:27 +01:00
Cristiana Voicu bc90dedc3a bitbake: hob/recipeselectionpage: recipes should not be shown brought in by themselves
[YOCTO #3107]
(Bitbake rev: 2cc5f517224cee8e2dd2b045a277423ce66ec886)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:27 +01:00
Robert Yang faaa0653c2 bitbake: fetch2: add "-d" option to cpio
Add "-d" option to cpio since it is useful:
  -d
  --make-directories
  Create leading directories where needed.

[YOCTO #3137]

(Bitbake rev: a78f9ded7896432b107f34c0bb608b389fdb676a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:27 +01:00
Bogdan Marinescu 5c1345c75d bitbake: Multiple user interface fixes in settings
1. Move the "Others" tab from advanced settings to simple settings
2. Organize content of tabs into headings
3. Match various labels in the settings with the design
4. Clean up config_md5 in both simple and advanced settings

This patch implements a part of the changes requested by Belen in the settings dialogs.
The second version of the patch addresses all the UI changes requested by Belen (more
details are in the bug description): alphabetical ordering of the image types and
warnings if no image type is selected.

[YOCTO #2162]

(Bitbake rev: b45438555ecf2e25ebb99324a18d31c812a2738a)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:27 +01:00
Constantin Musca 87a1f631ad bitbake: hob/runningbuild: Add missing logging level argument
[YOCTO #3170]

(Bitbake rev: d11fe38a38adc10eedec3b4c251c575b95339774)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:26 +01:00
Bogdan Marinescu 7414ba713d bitbake: Add sanity check progress screen
This patch adds a sanity check progress screen to hob. The screen
is displayed when Hob executes the sanity check procedure. The screen
is displayed for at least 5 seconds. If a network error is detected,
a special dialog is displayed which lets the user open the proxy
configuration page directly.
Note that currently bitbake triggers the network tests only when
the value of its TMPDIR variable changes, which happens fairly rare
on my system. This is the subject of another bug (#3026).
Version 2 of the patch splits the changes in two parts (sanity.bbclass
belongs to oe-core).

[YOCTO #3025]

(Bitbake rev: b48f1351271cc066ffe919db112b14834a6d8f8f)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:26 +01:00
Cristiana Voicu 6fdff49d9b bitbake: hob/builddetailspage: change branch field
When a user makes a build from a tarball, it shows fatal error in branch field.
Now it not complains as a fatal error. It is a normal message.

[YOCTO #3114]

(Bitbake rev: 53d5d542cd0197ca67c5f90a57808af2f19ff56d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:25 +01:00
Ioana Grigoropol 0e1a427a25 bitbake: hob: Buttons width and height are taken for host
- removed all set_size_request calls for buttons in order to:
	- force autosizing of buttons with regard to the text length
	- use host theme default height for buttons
- modified buttons on image details page to have the same height (default host one) and the width of the button with the largest text
- modified Stop button on build details page to have the default height by directly attaching it to the containing table instead of hbox

(Bitbake rev: 9cdfaa17309d368c3bbae0f1cce0ad875d340e83)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:25 +01:00
Cristiana Voicu 4c229615ea bitbake: hob/settings: implement a new tab in settings dialog to show SSTATE_MIRRORS
Add a new tab to show correctly SSTATE_MIRRORS variable. Now you can add new
mirrors or delete mirror. "info" image was also changed( it is smaller, so it
can be next to labels).
>From "Build environment" tab, SSTATE_DIR and SSTATE_MIRRORS vars were removed.

[YOCTO #2893]

(Bitbake rev: 1a81e27365d969e4ad4b4f0aec290aa967a8a35f)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:45:25 +01:00
Richard Purdie a8edf79fce bitbake: fetch2/git: Don't use deprecated API
(Bitbake rev: 8e650b3307b60cfe8e7439ea6891c3a85f785af9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25 15:55:57 +01:00
Cristiana Voicu e8738b83b7 bitbake: hob/packageselectionpage:cancel button should redirect to Image conf screen
Cancel button brings you to Image configuration page.

[YOCTO #3105]
(Bitbake rev: 88cd9586f0f6a413c1a6800b3e57444f453afb73)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25 13:39:46 +01:00
Cristiana Voicu a0bdb64a18 bitbake: hob/builddetailspage: change tooltips and remove a dialog from "Build stopped" message
When you stop a build, a "Build stopped" message appears. I have changed 2 tooltips and
also eliminate the alert that comes up when you click 'Edit packages'.

[YOCTO #3160]
(Bitbake rev: f5a21da2faf7ede56cf211b96dffd8aaa4b485b8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25 13:39:46 +01:00
Jason Wessel 88429f018b bitbake: bitbake: Unbuffer stdout for log files
It is possible to lose critical log data when python exits in an
unorderly fashion via segmentation fault or certain types of crashes.
This is because the buffer characteristics are inherited from the top
level stdout, which should be set to unbuffered, for the purpose of
all the forked children.

This pushes the buffering to the OS, instead of having python managing
the buffers in its stream handler class.

This change is also to provide the ability to tail logs written from
processes in "real time" because they would be written in an orderly
fashion depending upon the OS characteristics for the file I/O.

(Bitbake rev: c6a367bc3224adafca698a4ffc5414ad83842c16)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:32 +01:00
Jason Wessel 98ac5e4e62 bitbake: event.py, knotty.py, ncurses.py, runningbuild.py: Add support for LogExecTTY event
The LogExecTTY even is intended to provide the ability to spawn a task
on a the controlling tty, if a tty is availble.  When a controlling
tty is not availble the previous behavior is preserved where a warning
is issued about the action an end user must execute.

All the available UI's were tested against the new event type.

This feature is primarily intended for hooking up a screen client
session automatically on the controlling tty to allow for a more
streamlined end user experience when using a pure command line driven
environment.  The changes that send the LogExecTTY event are in the
oe-core side.

(Bitbake rev: cffe80d82a46aaf52ff4a7b6409435754043553f)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:32 +01:00
Jason Wessel eab93b0d62 bitbake: progress.py: Fix traceback when running goggle ui
The following traceback appears when running the following command after the
devshell is exited.

bitbake -u goggle -c devshell busybox

-- traceback --
Traceback (most recent call last):
  File "/work/bitbake/lib/bb/ui/goggle.py", line 35, in event_handle_idle_func
    build.handle_event (event, pbar)
  File "/work/bitbake/lib/bb/ui/crumbs/runningbuild.py", line 299, in handle_event
    pbar.set_text(event.msg)
AttributeError: 'ProgressBar' object has no attribute 'set_text'

(Bitbake rev: a6cc53cdb3c34fc8fd01bbc5ce0008429dc6785c)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:31 +01:00
Jason Wessel eed98e4666 bitbake: runqueue: Add --no-setscene to skip all setscene tasks
Mainly intended for the purpose of debugging or forcing builds
from source, the --no-setscene will prevent any setscene
tasks from running.

(Bitbake rev: 440e479f3e248482c38c149643403c6907ac7034)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:31 +01:00
Richard Purdie e1c1ee19e0 bitbake: fetch2/git: Add missing mkdir
bitbake-selftest is failing due to directories not being created. This adds in an
appropriate mkdir so the tests can complete. Presumably in general OE use, something
else is ensuring the parent directory is created.

(Bitbake rev: 1270a07713e2a6c6e6fadcc61b785aebc99ae17b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:52 +01:00
Paul Eggleton 90b7683f78 bitbake: fetch2: improve error output for checksum failures
* Don't print the full exception in the initial warning - if we later
  succeed in fetching the file from a mirror, we won't usually need the
  details (which are in the fetch log if they are needed); otherwise the
  full error will be printed when the fetch operation fails. Also adjust
  the conditional block so that we don't print another warning just
  mentioning we're going to try mirrors.
* Call logger.error() so that with knotty the full log is not printed
* Provide an explanation around the lines we print for easily updating
  the checksums in the recipe. We don't want users to be just blindly
  updating the recipe in case of a transient failure or deliberately
  altered remote file.

(Bitbake rev: 2793413106c925b06783beb7413aa87cbcf246c3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:52 +01:00
Paul Eggleton 683d3b9cfb bitbake: fetch2: make fetch failure errors more readable
Most of the time we don't need to see the fetch command; the fetch log
includes the command as a debug message in any case, so omit it. Also
adjust the way command output is printed (we don't need stderr/stdout
labelled, and print "no output" instead of "output:\nNone" when there is
no output.

(Bitbake rev: a75505a52e4da918222100221f79e8a658f90446)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:52 +01:00
Paul Eggleton 0bdde689f6 bitbake: lib/bb/runqueue.py: fix exceptions with -k and failed targets
If a target dependency is marked as failed and yet we are continuing on
because -k has been specified, don't try to access the dependency's data
in taskData.build_targets since it will have been removed. This fixes
"IndexError: list index out of range" errors in this situation.

Also, do not print the "unhandled exception" message when SystemExit is
raised since we will have reported the actual error already in this
case (e.g. when -k has been specified and some targets failed).

Fixes [YOCTO #3133].

(Bitbake rev: 70eebc184eb1ab3678be87bed019b5beadecdc89)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:51 +01:00
Paul Eggleton 1c2634c8d2 bitbake: hob: fix Gtk-WARNINGs due to invalid markup on Back button
You can't use markup characters (e.g '<' or '>') in the labels for many
widgets - you must use the appropriate entities instead.

(Bitbake rev: 54a16ac999d4a2c4c3f8a4531e8c6fabc39a4147)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:51 +01:00
Paul Eggleton c46c5605fe bitbake: hob: remove confirmation dialog on close
This is not necessary for modern applications - instead we just need to
check if we're in the middle of a build and if so, do the same thing as
pressing the "Stop" button.

(Bitbake rev: a79eb5d918239db1dade8134743e6142a4854930)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:50 +01:00
Paul Eggleton bf567b14a8 bitbake: hob: allow configuring default machine using HOB_MACHINE
Allow specifying HOB_MACHINE in local.conf to set the initially
selected machine. With this set, Hob will select the specified machine
and then jump straight into parsing recipes. If you do wish to change
the selected machine with HOB_MACHINE set you still can - you just need
to stop the parsing process first.

Fixes [YOCTO #3148].

(Bitbake rev: c3b623dc7d546a1ededdb532dcbcba4a6230bc65)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:50 +01:00
Paul Eggleton 991557216e bitbake: hob: don't show error dialog for errors during building
During building we already report errors in a special tab and
indicate when the build has failed; bringing up a dialog was a
regression introduced in bitbake revision
5bab81b124087d63d6eb62a861e1241714fcd483.

Fixes [YOCTO #3151].

(Bitbake rev: cf0a67d62f631aa48d1afc3fbdd0f73995b1c401)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:50 +01:00
Constantin Musca d875d62f8e bitbake: hob: The title of the packages screen depends on the screen you arrive from
- If you arrive to the packages screen from the recipes screen, the title
should say: 'Step 2 of 2: Edit packages'
- If you arrive to the packages screen from the image details screen, the
title should say: 'Edit packages'
- The title of the recipes screen should say 'Step 1 of 2: Edit recipes'

[YOCTO #2982]

(Bitbake rev: c366f4314c29b873a486daa9a0a4e29bb4225dd6)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:49 +01:00
Ross Burton 936d18a6cb bitbake: hob: Don't set busy cursor on the root window, just our window
[ YOCTO #3127 ]

(Bitbake rev: 5ef9d98b343b9ed05167e5471eb9f7f12e97b045)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 12:05:15 +01:00
Cristiana Voicu c0c04a5404 bitbake: hob: add a top bar when building process is stopped
When a build was stopped, it wasn't obvious what to do next.
Now, on the page it appers a top bar with 3 buttons: "edit image",
"open log", "build new image"

[YOCTO #2537]
(Bitbake rev: a6afd15b7a40919313e26777b514ae44b587a0f6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 12:05:15 +01:00
Trevor Woerner f77488e565 bitbake: cooker: Clarify package/recipe wording
When the '-s' option is run, change the heading above the list of recipes
to say "Recipe Name" instead of "Package Name".

(Bitbake rev: d1c3a9de875fb488a56ab5cb1d2f8e2f24f31d69)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:56:32 +01:00
Cristiana Voicu 1e8b535695 bitbake: hob/packageselectionpage: "Cancel" button returns to "Image configuration" screen
Once package building completes, you can customise the list of
packages that will go into the final image. Once you have made
the changes you need, you can either build your image, or you
can exit the process and go back to the 'Image configuration'
screen by selecting 'Cancel'.

[YOCTO #3105]
(Bitbake rev: c5fd1824c9794923576ec1e747536c0430542fd1)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:56:31 +01:00
Paul Eggleton 14a04abb9b bitbake: hob: report event handler failures
If an event handler failed we were not recieving an error message -
parsing just "froze" at 99%. This is because we were expecting a
CommandFailure event and this never happened in the case of
RequestPackageInfo which is where the failure was occurring.

This also required tweaking the error formatting slightly, taking the
return value of the format function rather than the message property
since the latter only seems to contain the first line without the
traceback in the case of event handler failure. Other error cases were
tested and their message formatting is unaffected by this change.

Final part of the fix for [YOCTO #2651].

(Bitbake rev: 5bab81b124087d63d6eb62a861e1241714fcd483)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:48:39 +01:00
Bogdan Marinescu 8d46be8a0d bitbake: hob/settings: Remove stray "distro" combobox from simple settings
The "distro" combobox was moved to advanced settings, but it
was also present in simple settings. This patch removed it
from simple settings.

(Bitbake rev: 6d56bec4464da14d7fde0e60946be43293ad6e52)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:48:38 +01:00
Richard Purdie d485d0b0e8 bitbake: build/siggen: Add support for stamp 'clean' masks
Currently when we execute a task, we don't remove other potentially stale
stamps. This can mean if you switch between two different versions of a
recipe without a clean, the build can get very confused.

This patch adds in functionality to allow a wildcard expression of stamp
files to be removed when creating a new stamp file. This patch adds in
the core of the code to enable this but it also requires metadata support
to enable it.

When writing this improvement I went through several different options but
this was the only way I could find to allow things like noexec tasks to
function correctly (where stamps need to be created without the data store).

[YOCTO #2961]

(Bitbake rev: e026469b307522e5b6a680e0ae5587749d33dcae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:48:38 +01:00
Richard Purdie a4fd77db84 bitbake: fetch2/cvs: Fix parameter spacing
Add in misssing space between the parameters. Reported by
Jate Sujjavanich <Jate.Sujjavanich@myfuelmaster.com>.

(Bitbake rev: 55382f0aac84b8f81cad0b82053c0b8295c33e54)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:37:17 +01:00
Richard Purdie 01606f2b97 bitbake: fetch2/cvs: Clean up various data store references
The code in the CVS fetcher is elderly and there are simpler ways of
using the data store. This updates to use the modern APIs.

(Bitbake rev: 78eee8c70a80997293df99475153aed0b2ad0a17)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:37:16 +01:00
Richard Purdie 553a5b1842 bitbake: fetch2/cvs: Fix localdata variable reference
The localdata variable was removed, fix up a lost reference to this.

(Bitbake rev: 02ccc1396005ce0b7a2150a5ce12b723df21d464)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:37:16 +01:00
Bogdan Marinescu 05c1d32e02 bitbake: hob: Fix settings dialog issues
Fix some issues with the settings dialog that were introduced as
a result of merging the fix for #2162.

[YOCTO #3117]

(Bitbake rev: a363f59579e01cb7bd39be2ce73f22c875c62ce7)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Constantin Musca 8c82b12d1c bitbake: hob: rename 'View log' to 'Open log'
Rename all the 'View log' buttons to 'Open log' for
consistency.

[YOCTO #3045]

(Bitbake rev: 7bc9b0c1c2544b494959b13ac79ac3e52edb4fe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Christopher Larson 749f4f6744 bitbake: compat, event: use OrderedDict from py2.7 for the event handlers
This ensures that our event handlers get run in registration order, making the
behavior more deterministic. I pulled in the python2.7 OrderedDict to avoid
essentially reimplementing a version of it ourselves, figuring we can drop it
when we bump our required python version next.

(Bitbake rev: 44aa0b0537d3fbd1272015e7677948f84d8c0607)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Valentin Popa b3ba9eb7e2 bitbake: Implement 'settings' dialog as designed
[YOCTO #2162]

(Bitbake rev: ac75b06744e73399ca1fbda322ef851ae5754b0a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:36 +01:00
Richard Purdie 149c121209 bitbake: cooker: Fix priority for virtual recipes
When making filename comparisons for recipes for priority calculations,
we need to split off any virtual prefix. Without this, BBCLASSEXTEND
version of recipes don't follow the priority settings they should.

[YOCTO #2933]

(Bitbake rev: 055b72a230e6b0b1cababd65372c62d9ddce385e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:36 +01:00
Constantin Musca 293764e435 bitbake: hob/builddetailspage: Add tooltips to the build failed notification
[YOCTO #3046]

(Bitbake rev: 69ad4ebd1379e804d0753bd4ee704b602b5efcc4)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:35 +01:00
Paul Eggleton 5b53671f27 bitbake: lib/bb/event: improve handling of event queue on exit
If BitBake exits before a UI handler (server) has been registered, we
print the event queue; if there are any errors or other non-debug
messages just print these and suppress the rest of the message queue.

This improves the output when sanity check failures occur with OE-Core
by avoiding printing a long stream of uninformative debug messages.

(Bitbake rev: 8668a94cb1841798636b68fe123400d6b81f6574)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:34 +01:00
Paul Eggleton 537dd88c1a bitbake: hob: format error messages properly
Error messages that use arguments need to be formatted properly, or we
don't get the full message. Use a formatter to do this when an error
occurs.

Partial fix for [YOCTO #2983].

(Bitbake rev: 6783538884adecd914909a9ab4ca73c27575f3ad)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:33 +01:00
Cristiana Voicu 831486844d bitbake: hob/imagedetailspage: change "FileCreated" label to "Files created"
[YOCTO #2998]

(Bitbake rev: ca2464561d54d59d1146359e41eb08201954fc21)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:33 +01:00
Jessica Zhang 043ab5433f bitbake: Fixed hob proxy tab tooltip text per review suggestions [YOCTO #2499]
(Bitbake rev: 485e69d41e220ed4e8efc89a357a8d395e44da9f)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:33 +01:00
Paul Eggleton 78b14140d6 bitbake: hob: sort base image drop-down list
Sort the list of base images to make it easier to find a specific image
in the list. Note that "Create your own image" still remains the last
item in the list.

(Bitbake rev: db16f575a774de7d9d44b4bc727b252de5d0f34d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:32 +01:00
Paul Eggleton 34cacbf186 bitbake: lib/bb/command.py: ensure setVariable only sets values as strings
This is the interface Hob uses to set variable values in many instances,
and at the moment it is possible that some of the values it passes are
not strings. If a non-string value gets into the datastore it can
trigger exceptions during parsing when we attempt to expand the variable
and substitute in the non-string value.

This fixes using the meta-ti layer within Hob - it currently has a
reference to BB_NUMBER_THREADS within a shell function and since this
is a variable that Hob was setting from its configuration as an integer,
due to the above this was triggering an ExpansionError.

Fixes [YOCTO #2875].

(Bitbake rev: 855b71d8a8e468bfeff9e1a6699d79d68ab27aa1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:32 +01:00
Paul Eggleton beb6815226 bitbake: hob: don't reorder layers list
We cannot reorder this list - it must stay in the order shown in the
dialog (which may in future be configurable by the user).

Fixes [YOCTO #2649].

(Bitbake rev: eca0352195d2d8ae8ef15baab9737884ec674a46)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:32 +01:00
Cristiana Voicu 2cbf4e60a3 bitbake: hob/packageselectionpage: restore selected packages
After "Cancel" action, selected packages are restored to default.

[YOCTO #2984]
(Bitbake rev: 81b0c0cd15cbd61285e6525f482412051371ea4c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:45 +01:00
Paul Eggleton 1b1b83651a bitbake: hob: rename task -> packagegroup in recipe selection
This changes the filtering to use the inheritance of
packagegroup.bbclass to determine if a recipe is a package group.

Also makes the tab tooltip text generic; these recipes could come from
any enabled layer, not just the default ones.

(Bitbake rev: a3bf87a90198bf6127663c27d8be086dab04aaf9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:45 +01:00
Paul Eggleton 5f40b7a29b bitbake: hob: ensure error message text is properly escaped
Our poor implementation of markup escaping was causing invalid
markup, leading to the error dialog being blank. Use the glib markup
escaping function provided by PyGTK+ to do this properly and avoid the
blank error dialogs.

Partial fix for [YOCTO #2983].

(Bitbake rev: 563ea5233a5ab1629c51e802d04280692f96c596)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:44 +01:00
Paul Eggleton 4ec3d72072 bitbake: hob: use correct semantics for dealing with pkgdata
Some of these values may or may not be overridden on a per-package
basis, so handle them accordingly.

(Bitbake rev: 56cee6a958843b03c5389d4a45245a04d1e03327)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:44 +01:00
Richard Purdie fb44773f61 bitbake: tinfoil: Add file inadvertently not committed
(Bitbake rev: 44a3fb49e817be641090d5d1bce7b586af407d71)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:50:41 +01:00
Paul Eggleton 21816355c0 bitbake: cooker: fix handling of exceptions during exception handling
If an exception occurs during handling another exception we were
getting a useless traceback such as the following, after which
BitBake froze:

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/user/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1207, in updateCache
    if not self.parser.parse_next():
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1694, in parse_next
    logger.error('Unable to parse %s', value.recipe,
AttributeError: 'exceptions.TypeError' object has no attribute 'recipe'

Fix this to print an actual traceback of the exception and exit
gracefully (well, as gracefully as possible under the circumstances).

The general fix for [YOCTO #2977].

(Bitbake rev: 675b237a284dff84e972546774b69e2f89afb360)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:14:08 +01:00
Paul Eggleton 4d8ba9a0ec bitbake: fetch2: fix malformed URL causing a useless traceback
The implementation of NoMethodError and MalformedUrl was broken - if you
just set self.args in an exception class to a string it treats it as a
list and then fails later on with a TypeError due to the number of
arguments not matching up.

This nasty exception during exception handling was breaking the normal
exception flow (fixed separately), which meant that if you had a
malformed URL or invalid protocol in SRC_URI you would get the
following:

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/user/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1207, in updateCache
    if not self.parser.parse_next():
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1694, in parse_next
    logger.error('Unable to parse %s', value.recipe,
AttributeError: 'exceptions.TypeError' object has no attribute 'recipe'

A specific fix for [YOCTO #2977].

(Bitbake rev: 9d4150d99051d24ff218e8a43664ceaf524b19c7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:14:08 +01:00
Cristiana Voicu e843d56a31 bitbake: hob/imageconfigurationpage: remove or_label reference
When or_label was removed, I forgot to remove also the references to it.

[YOCTO #3010]

(Bitbake rev: 4d208aaedd60f79a4277f501fdbf8c2afc32c250)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:14:08 +01:00
Paul Eggleton 5343cdb20e bitbake: fetch2: replace double slashes in paths in encodeurl()
This ensures that if all a MIRRORS entry does is add a slash, this does
not result in a circular loop.

Fixes [YOCTO #3073].

(Bitbake rev: 57055d337a2c9997a6e5d5bdabaec396e3e128e9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 14:50:04 +01:00
Cristiana Voicu 572851887e bitbake: hob: print message when DISPLAY is not set
If DISPLAY wasn't set, launching hob has printed a traceback
difficult to understand. Now, the exception is caught and it
shows a human message.

[YOCTO #2596]

(Bitbake rev: a41098a2dacbd903422ccdcd1885b0f351c7ddf3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 14:43:51 +01:00
Liming An 95ae927dfc bitbake: Hob: change view of 'recipes' and 'packages' tables as ui design
changed the order of task tables,
cancel the 'description' column,
add the binb total number indicator, and so on

[YOCTO 2195]

(Bitbake rev: 6dc3263d60a6d35f9eebfcdbc2665201ee40b953)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:13:53 +01:00
Paul Eggleton e58eb8cbb0 bitbake: bitbake-diffsigs: allow specifying task & follow deps recursively
Add the ability to compare the two most recent runs of a specified task,
and follow dependent hash changes recursively. This enables you to trace
back and find exactly why a task was re-run after the fact.

Note that this relies on the metadata providing a function, hooked in
as bb.siggen.find_siginfo, which allows searching in the appropriate
places to find signature data files.

(Bitbake rev: cc70181659c07e04c205e17832846acf1ff31d28)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:45 +01:00
Paul Eggleton d5226c96d3 bitbake: lib/bb/siggen.py: make signature dump/compare functions return a list
These functions become a little bit more reusable if they return a list
containing the output rather than just printing it.

(Bitbake rev: a0ad2a947b71abcc0a1244cf139b9e9dfd8ee049)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:44 +01:00
Paul Eggleton 19d0abe14c bitbake: lib/bb/siggen.py: insert a colon between class and recipe name
before:
  virtual:nativeautomake_1.12.1.bb.do_compile
after:
  virtual:native:automake_1.12.1.bb.do_compile

This separation ensures that the key is readable, and if necessary,
parsable.

Unfortunately this invalidates previous native sstate signatures with
OE-Core - not much that can be done about that; however that occurs
frequently during the development cycle so it's par for the course.

(Bitbake rev: 5b96c32dad256090e9bda5af0f80c7dbcc90bde8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:44 +01:00
Paul Eggleton b7bd852db1 bitbake: lib/bb/siggen: replace tabs with spaces
We had one section of the code mixing tabs with spaces, which is
particularly undesirable with python code.

(Bitbake rev: 8eaa093b179e03a6003a47220540b1bc73afca17)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:44 +01:00
Paul Eggleton 56a66a1fab bitbake: tinfoil: create simple interface for bitbake-based utilities
The code to initialise BitBake within bitbake-layers should be useful
for other utilities that need to query configuration or recipe
information, so refactor it out into its own class, "Tinfoil" (to
continue with our cooking metaphor).

(Bitbake rev: e5707e3938ace47c4a8d1fa2e81583fd4dc6b95d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Bogdan Marinescu e8d87846e3 bitbake: crumbs/hig: Save toolchain in settings
Toolchain was not saved in the settings dialog ("Output" tab).

[YOCTO #2695]

(Bitbake rev: f8924b75d6ff7f093d73f4e3c0953e349960d5ff)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Cristiana Voicu e2b0eaef93 bitbake: hob: The 'run image' and 'deploy image' dialogs text and alignment corrections
-changed the text shown by both dialogs text
-make small tweaks to alignment

[YOCTO #2999]

(Bitbake rev: b193db13472908b8ec6c670da96ff3b0004e635b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Cristiana Voicu ed17f44da6 bitbake: hob/imagedetailspage: "Image ready" icon appers only after the image was generated
Now, "Your image is ready" icon doesn't appear when you come back on Imagedetails
page. It appears only after the image was generated.

[YOCTO #2984]

(Bitbake rev: de29bfc163471e4959483493a5e5b26f8a2cf8a0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Ioana Grigoropol 40d55d37b6 bitbake: hobwidget: Button theme is taken from host, fix
- All buttons in the interface inherit a BaseHobButton that
  use the gtk settings for buttons from the host;
- Removed 'or' label between actions on image details page

[Yocto #3011]

(Bitbake rev: 1a8356b57f906cf575612eb52fc8d3a9824ff9a7)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:42 +01:00
Robert Yang 7d8b49cfe4 bitbake: fetch2: unpack rpm, ipk and deb binary package
* Unpack the ".rpm" binary package (only .src.rpm in the past)

* Unpack the .deb and .ipk binary package, their unpack commands are the same.

* This is useful for binary package recipe.

[YOCTO #1592]

(Bitbake rev: de7ceb9459574f33920ccc06255b533434f0ec25)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:42 +01:00
Cristiana Voicu 399d7f2029 bitbake: hob/recipe&packageselectionpage: Change "Back" button to "Cancel" button
"Back" button placed on RecipeSelectionPage and PackageSelectionPage
was changed to "Cancel" button to avoid any confusion.
Also, it was placed next to the other buttons on the page.

[YOCTO #3012]

(Bitbake rev: 1785b49a1b0b9698851d6e8aea94d1d2aa22c445)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:42 +01:00
Cristiana Voicu 34c4b3a93d bitbake: hob/imageconfigurationpage: Set secondary action for "Edit image" button
The image configuration screen should have only one primary action.
"Edit image" button has now secondary action, and also I have removed
"or" label.

[YOCTO #3010]

(Bitbake rev: f54191dac18b4e1100944cc6da86705c1e9c1683)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:41 +01:00
Cristiana Voicu 0edb99f38a bitbake: hob/packageselectionpage: Add tooltips to 'Included' and 'All packages' tab and 'Search' field
For the 'Included' tab: "The packages currently included for your image"
For the 'All packages' tab: "All packages that have been built"
For the 'Search' field: "Enter a package name to find it"

[YOCTO #2322]

(Bitbake rev: 0828f352419127fb30dc4eb5f91feba84ea59202)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:41 +01:00
Cristiana Voicu b2e2badd51 bitbake: hob/packageselectionpage: Correctly restore previously selected packages
"Back" button from "Packageselection" page now restores correctly previously
selected packages list. Till now "Back" button was implemented just to switch
pages, not to cancel changes you have made to packages list.

[YOCTO #2984]

(Bitbake rev: 1ad03d6a327eb3389f7b4d0d74d2e8ae8b50c3b6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:41 +01:00
Kang Kai c8db2f66de bitbake: hob2: remove class hcc
Because class hcc is useless, remove it.

(Bitbake rev: 08d4a0f76542e05755c298b3875ea373e5512e13)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:40 +01:00
Kang Kai da98eddd02 bitbake: hob2: remove the hard-coded images map
[Yocto #2795]

When a new image type added, the hob will crash because the new type is
not in the hard-coded image dictionary.

For most of the image types, they are same with the image file's
extension name. So use variable "IMAGE_EXTENSION_difftype" to map the
image type which is diff with the image file extension name, such as
type "live". And the variable(s) will be set in image_types.bbclass.

(Bitbake rev: e7c84f056af9c613920d5adcd078a011e0387193)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:40 +01:00
Richard Purdie c5ce2878b3 bitbake: taskdata: Don't add dependencies on tasks that don't exist
"bitbake meta-toolchain" with qemu image testing enabled causes problems
since it adds a task after do_rootfs which doesn't exist in this case.

We should simply ignore these extra dependencies rather than adding
them in which is what this patch does (adding a debug message when this
happens).

(Bitbake rev: 843d3d6b0a7eb2e2f7b50c555767f5385df16ede)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 17:44:07 -07:00
Trevor Woerner d410ebb6cb bitbake: bin/bitbake: Clarify wording in help output for -s
The '-s' option shows (input) recipes, not (built/output) packages. Clarify
the help wording for this option so it is consistent with how bitbake defines
recipes and packages.

(Bitbake rev: 0cac6d647c58ae449323959220775fc1afd5bfb0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 17:44:07 -07:00
Richard Purdie 1e59ae05c1 bitbake: ast: Store anonymous python function contents in the datstore
This is useful if we need to disable part of one during a backtrace
for debugging purposes.

(Bitbake rev: 80a0c1b06a30a6ba9977c29fac0437a208d8cbbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie ce682323a9 bitbake: ast: Extract text variable in PythonMethodNode
(Bitbake rev: 2e98f740b4a57a3467b1a00b1ebc1aaee33a8ff0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie 9e8ba3036d bitbake: ast: Rename PythonMethodNode define variable to modulename
It was hard for me to understand what the define variable was, modulename
is hopefully a bit better.

(Bitbake rev: 79f9f46319de85f85613ebe248c327f5852225ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie c8cce4e0d6 bitbake: methodpool: Clean up the parsed module list handling to be slightly less insane
This removes some dubious functions and replaces them with a simpler, cleaner
API which better describes what the code is doing. Unused code/variables are
removed and comments tweaked.

(Bitbake rev: f1e943aebfb84e98253f3f21646d6765c4fa1d66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie 43cbd5afce bitbake: methodpool: Remove unused check_insert_method function
(Bitbake rev: 4664333e55ffc9d618f2c2f074200923209fd6c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie ae71aa0fbb bitbake: cooker: Add explict handling of BBHandledException for parsing failures
This removes some unnecessary tracebacks

(Bitbake rev: db0ff7b4d47fce8322dd2350a2b1a6f60ef61d25)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie 4f3d48653a bitbake: cooker: Ensure parsing failures stop the build
Currently parsing failures still allow bitbake to continue on and try
and execute a build. This is clearly a bad idea and this patch adds in
more correct error handling and stops the build.

The use of sys.exit is nasty but this patches other usage in this function
so is at least consisent and its better than the current situation of
trying to execure a half parsed set of recipes. There are probably better
ways this could be improved to use to stop the build.

(Bitbake rev: 22756e9c0f1da33ba2c6e881b214577a610b7986)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie 999ee044b9 bitbake: utils.py: Once we've printed errors messages, suppress the backtrace
Adding a generic backtrace to better_compile and better_exec is pointless,
therefore reraise the exception as a bb.BBHandledException so the
generic code doesn't confuse the user even more.

(Bitbake rev: b3d97130e1e70fe969399277dcd7cccd888103d6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Richard Purdie 64c002875f bitbake: utils.py: Try harder to extract good traceback information by querying the datastore
Currently as soon as execution passes outside the code fragment being
executed by better_exec, we don't get any good traceback information,
just a likely obscure reference to some function name which may
or may not be identifiable.

This patch adds code to query the datastore if present, allowing a more
meaningful back trace to be displayed in many cases.

[YOCTO #2981]

(Bitbake rev: 0edf8431f9ff52581afe0d3ef525c59909af02ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Paul Eggleton fddc16989d bitbake: cooker: fix traceback when using -b with skipped recipe
If a recipe is skipped during parsing for whatever reason, check and
report this as an error rather than trying to use the data that is sent
back and failing.

Fixes [YOCTO #2976].

(Bitbake rev: a324df40243fa55ccc89fd5970d46f25330d0a0d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Richard Purdie 21773a997a bitbake: event/ast: Use better_exec instead of simple_exec
This improves the stacktraces dumped by bitbake when for example anonymous
python functions fail.

Also default to passing code strings to better_exec to match the behaviour of
simple_exec to aid the transition.

(Bitbake rev: 7e8205929ae953731a6854ea80b197847cff5771)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:57 +01:00
Konrad Scherer 1a7069e97b bitbake: ui: Improve error message if bitbake cannot import python curses module
On some SuSE systems, the curses python module is not installed by default.
Instead of a python failure, we want a nicer error message.

(On SuSE systems the package is typically python-curses.)

(Bitbake rev: 65a5845ac942d0aa6838c295e41b656f9d2a98bb)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>

Reword commit message, rebase to latest bitbake.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:57 +01:00
Paul Eggleton 1426e14747 bitbake: bitbake-layers: use parsable title for show-appends
Print title text surrounded by === as we do with other subcommands so
that you can filter it out in scripts. (You will also want to filter out
lines starting with "WARNING:" if you just want the list).

(Bitbake rev: ba15ba16a5d863886bcfd5b3f0bdfff2a6de11a0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Paul Eggleton 5d09fb0346 bitbake: bitbake-layers: avoid full parse for show-layers subcommand
We don't actually need to parse all recipes just to show the configured
layers, so just parse the configuration instead.

(Bitbake rev: 406477cbae066b6379873e266cb79801e545a61c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Paul Eggleton a46fac74c3 bitbake: bitbake/cooker: minor refactor of parseConfiguration()
All calls to parseConfiguration set self.status and call
self.handleCollections() afterwards, so just do this inside
parseConfiguration() itself.

(Bitbake rev: 3c2322d8a6ce15e20adb07a61aa321d884a9bcca)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Ross Burton 980d658f3f bitbake: data_smart: skip all interal (underscored) flags in getVarFlags
(Bitbake rev: 9f631e29a2eebb96a8291839dd8b39aa9126a10e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Ross Burton 49bc007c80 bitbake: data-smart: rename the 'content' internal variable to '_content'
(Bitbake rev: 684cf09aed09ec82c8afb99895f92d73cd0519df)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Cristian Iorga 164083d31f bitbake: Hob wizard-like reorganization
Hob is now more context-sensitive regarding
user changes/options. Also, the workflow have been
streamlined and resembles more of a wizard.
Beautified some hardcoded values.
Fixed typo.
New streamlined Image Configuration page.
Build and/or Edit image buttons presence
is context sensitive.
Recipes and packages tabs selected automatically
based on custom image or pre-defined target image
(included or all).
Context sensitive Back button.

Fixes [YOCTO 2165]

(Bitbake rev: b48cd7dcf57b1abc8c5b46ced11d4f57bf06e557)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Paul Eggleton 2a6818eea1 bitbake: bitbake: hob: create console log directory before writing
The default value of BB_CONSOLELOG in OE-Core now points to a directory
that might not exist prior to the first build, so ensure it is created
first.

(Bitbake rev: 660821769b9dfb89086291ffc835e9b5444509be)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Richard Purdie 96ece9ad1a bitbake: build.py: Correct package to recipe in TaskBase events to use consistent terminology
(Bitbake rev: e5045429bce15b66c4355be214db3982ac7761f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18 16:21:45 +01:00
Richard Purdie a86bd42264 bitbake: fetch2/git: Work around git confusion between foo.git and foo repositories
If you have foo and foo.git in GITDIR, the two can end up being confused
by git with some horrible union of the two being cloned. This adds
a workaround to avoid this happening until git 1.7.9.2 onwards is
common enough for this to be removed. We use a symlink to hide
the directories we don't want git to know about.

(Bitbake rev: bbf1f6fe594c721a296ca09ee7c583d4a205c591)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18 16:21:44 +01:00
Richard Purdie 3c0451ec95 bitbake: really remove knotty2
(Bitbake rev: 587ce3bd76b5338c538dc9a5b9f06d42cb5ae3eb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 15:25:14 +01:00
Richard Purdie e781fb6250 bitbake: bin/bitbake: Remove knotty2 from the list of valid interfaces
(Bitbake rev: e0f91faf195be63803d39fb42fcd115ad558c79f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 11:33:20 +01:00
Andrei Gherzan af847d3637 bitbake: bitbake: build.py: Add stampdir argument to cached_mtime_noerror
After commit 2718537b4b (bitbake:
build.py: Only execute mkdirhier if stampdir doesn't exist) build
failes as cached_mtime_noerror needs an argument - stamp dir. This
argument was forgotten.

(Bitbake rev: e69103c4f7e45c24f1fbe9df0383f39e877abcb4)

Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 12:27:41 +01:00
Richard Purdie 1fa112b632 bitbake: knotty: Fold knotty2 into knotty and make it the default
There is no good reason knotty2 shouldn't be the default now. If you need
the old behaviour, just pipe the output through cat as non-interactive
terminals get the old output.

(Bitbake rev: b97d50618b2187bcfd7d25f64d1444482ca62ef7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:03 +01:00
Richard Purdie c49a2529bf bitbake: knotty2: Handle long lines of text and terminal window size changes
Long lines of text which wrapped on the terminal corrupted the output shown by
knotty2. This patch catches such errors by becomming aware of the terminal size.

It also catches terminal window size change events and adapting to those
changes using a signal handler.

Based on a patch from Jason Wessel with several tweaks and enhancements
such as use of chained signal handlers and covering all output messages.

(Bitbake rev: 9afc9e4d14abec5ac326851d4bb689c1e8d45a43)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:03 +01:00
Richard Purdie 2718537b4b bitbake: build.py: Only execute mkdirhier if stampdir doesn't exist
I noticed this was showing up on profile logs as a sigificant time user
in "bitbake bash" when bash was already built. It reduces the time from
5.2 to 4.5 seconds in my test environment.

We make use of the parser's mtime cache as once a directory exists,
we can assume it continues to exist and this avoids syscalls.

(Bitbake rev: 769b694eeb617bb793bd79d0d7b29c43d2646ece)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie e2d023ff5f bitbake: bb/ui/uihelper.py: Ensure task current and total numbers are updated for setscene events too
This avoids task (0 of 0) type messages being displayed during setscene by knotty2.

(Bitbake rev: 53efa01720a61da2cb344cbb7e977baa28deba3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie 4c4f714612 bitbake: knotty: Chain the WINCH signal handler in progressbar so any other handler is preserved and called
(Bitbake rev: 7753e075dbeee471b9ceb34f1e3165aa656932ed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie 9df0a20d95 bitbake: data_smart: Fix unanchored regexp causing strange parsing issue
If this regular expression is unanchored, it would accept strings like:

do_install_append1
do_install_appendsomelongstring

and treat them like they were do_install_append. Clearly this isn't desirable.
Only one instance of this type of issue was found in OE-Core and has been fixed
so correcting the regexp should be safe to do.

(Bitbake rev: 23bd5300b4a99218a15f4f6b0ab4091d63a602a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-03 10:25:10 +01:00
Richard Purdie 71cc9de357 bitbake: Fix script location after mishandled merge
(Bitbake rev: 0f3293c2196a30bc52bf1eebfae87d8477880572)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-03 09:04:22 +01:00
Martin Jansa cecf2b48be bitbake: cooker: fix OVERRIDES in BB_SIGNATURE_HANDLER (to override value from DISTRO.conf from local.conf)
We really need to pass the finalised data store into the parser init function
(and hence the siggen init function). This ensures any value changes get
passed into the correct code.

(Bitbake rev: 19efc6081c15a59bb8f5aaf8478650a2732cafe8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 6ffb679c07 bitbake: fetch2/local: Add search paths to the debug log to improve log usefullness
(Bitbake rev: 2054c7d99933c1523d4b5c7f65d37c69b8472e47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 43a25fff55 bitbake: fetch2/local.py: Provide better debug output when fetch of a local file fails
When a fetch failure occurs for a local file, this patch ensures we print the
locations searched making it easier for the user to debug the problem.

(Bitbake rev: a461adbc5f09b41c771a7603370f6f2d1299ae8e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 67bfb37475 bitbake: runqueue.py: Clean up runqueue exception catching in the normal task failure case
(Bitbake rev: a0bc58031d4eb31f8587171e870ecad059af5098)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:01:35 +01:00
Robert Yang 9461854a3c bitbake: contrib/dump_cache.py: dump recipe -> packages mapping from bb_cache.dat
Add the dump_cache.py to dump the "recipe -> packages" mapping for
target recipes form bb_cache.dat:

* Usage:
  dump_cache.py bb_cache.dat

* The format is:
    recipe_path pn pv packages
  For example:
    /path/to/gzip_1.5.bb gzip 1.5 gzip-dbg gzip-staticdev gzip-dev gzip-doc gzip-locale gzip

* Only save the mapping for the target recipe

* We can extend this to dump other informations when needed.

* Put this script to bitbake/contrib/ (not to oe-core) is because it
  needs the bb.cache.

[YOCTO #2741]

(Bitbake rev: 75a7caf6f2d9f4399c95b9249db1b3bc5a48dc61)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:07:21 +01:00
Paul Eggleton 94f57a169e bitbake: bitbake-layers: fix help for show-overlayed to match behaviour
show-overlayed actually lists the same recipe in multiple layers
regardless of priority, so change the help description to match.

(Bitbake rev: 17217ff707e41780cb473b9cdd2621dd18b982c2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Liming An 8a3ae43815 bitbake: Hob: change the Build failure scenario as ui design
As ui design 'build-fail-spec.pdf' to change the GUI

[YOCTO #2183]

(Bitbake rev: f9b81e44b2e71b4de6729bd2c69b25fd619b5fed)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Liming An 94e2a104ec bitbake: Hob: log for Hob and allow users to show logs after successful build
If users build images in Hob, record logs and allow users to retrieve the lo
after successful build.

The logs are generated if and only if:
      - users do "just bake"
      - users do "build image" after "build packages"
      - users do "build packages" only

[YOCTO #1991]

(Bitbake rev: 291289787bb042b99f0599babc2d67c220aadb87)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Martin Jansa 5d952ba4a0 bitbake: fetch2: print checksums when they are different then expected
* in form which can be copied into a recipe without modification
* like oe-classic did since:
  http://git.openembedded.org/openembedded/commit/?id=68abc465559a68e9201c9525be3c4acc6297eaed
* it shows them in right form when they are missing completely, but in
  more verbose form when different
* it needs to print that only when checksums were requested, e.g.
  fetching from sstate mirror sets both md5mismatch and sha256mismatch,
  but your checksums shouldn't be shown

(Bitbake rev: 9eb34fc866775fd8310759a0111f232a9dc98981)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Christopher Larson 420891731f bitbake: fetch2: handle broken symlinks in local mirror handling
If a file:// mirror is being used, the fetcher will create a symlink to the
local file. However, if the local file gets removed, that link will be dead,
and os.path.exists() returns False in that case, so it tries and fails to
recreate the link. Now we unlink such a dead link if it exists.

(Bitbake rev: 229ed3857e826e3e215e843cb51f729c1e13ed37)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Martin Jansa f1417a1349 bitbake: knotty: ensure that directory for BB_CONSOLELOG exists before using it
(Bitbake rev: 1e06d8012868ba5a31503dc99cbf18570be629d9)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Mark Hatle 9fb5c34750 bitbake: fetch2/__init__.py: Add NoChecksumError exception
Without the new exception, when the system is configured to use premirrors,
but not allow network access (via BB_NO_NETWORK), when a recipe was lacking a
checksum the wrong error message(s) were being generated.

Instead of complaining about trying to perform network access, if the system
was able to find the item in the premirror, it should inform the user of the
lack of checksums, and the two SRC_URI fields they should use to update their
recipe.

(Bitbake rev: cb10e9c03a3f96d94e27e18330009616dde5e2b3)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:05 +01:00
Kang Kai 6a293985b2 bitbake: hob: deal event DiskFull
Part of [Yocto #2168]

When bitbake runqueue is teminated by disk monitor, it will send event
DiskFull. Update to handle it.

(Bitbake rev: a691de10d8b8de552628b277e78d47c607ee3a46)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:40 +01:00
Kang Kai b2a959a0ce bitbake: monitordisk: fire event DISKFULL when terminate build
Part of [Yocto #2168]

Add a event DiskFull to descript the termination by disk monitor.

Update check() to fire the event DiskFull when terminates the build.
This could help UIs to deal this scenario and show more information to
end user.

(Bitbake rev: 0a0fca3d94a1db6458ae21501a66461a334410ed)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:39 +01:00
Richard Purdie 8febf64b1d bitbake: fetch/local: Allow preservation of path components in relative file:// urls
This enhances the fetcher to allow preservation of the path component in urls
like: file://xxx/yyy/somefile.patch.

(Bitbake rev: e49a656a499355a5c6e7eb00bf5b8f1795e8dddb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie c74f3d44c6 bitbake: runqueue.py: Wipe out the stamp cache between setscene and main task execution
The stamp files can change during setscene and the cache should be cleared to
account for this.

(Bitbake rev: 5ec12f586a50fce675b268965b3dc487aaa96c43)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie 0984853ced bitbake: runqueue.py: Allow the setsceneverify function to have a list of tasks that are invalid and need to run
There was some odd behaviour if some task was run from setcene whilst there were
existing valid stamps for a depepdency. For example, do_populate_sysroot might
be installed at setscene time but if there were other tasks not installed from
setscene such as do_populate_lic which depend on do_configure, the setsceneverify
function would think that do_configure needed to be rerun and would hence void the
do_populate_sysroot and force that to rerun too.

The setsceneverify function needs to know which tasks are going to be rerun, not just
what the overall task list is and what setscene functions have run. This patch adds
that information and maintains backwards compatibility in a slightly ugly but effective
way. The metadata needs updating to take advantage of this change.

(Bitbake rev: 1423aafff97f17169e95ec3ba973eb002ff98c1c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie b22592af81 bitbake: runqueue.py: Ensure one setscene function doesn't mask out another which needs to run
The scenequeue code could result in one setscene function masking out another
which had been marked as notcovered. This change ensures the notcovered list
is taken into account when deciding which tasks need to be run, ensuring
that tasks that should be run do get run.

(Bitbake rev: 95b31127d8ba12ccb061d67481ece134c18c39f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie 58f0d04f78 bitbake: runqueue.py: Optimise the hashvalidate call to only process tasks we may actually want
Currently we call the hashvalidate for anything without a valid setscene stamp.
This improves the code to account for existing stamp files so that we only process
setscene hashes for things we might actually end up using. This avoids hash processing
and makes things slightly more efficient and the logs less confusing.

(Bitbake rev: 2e71a65bd910e8be894b8284eb0a50de7270c081)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie dfdb2eb33e bitbake: runqueue.py: Gracefully exit if an exception occurs in the runqueue execution code
There was a bug where an exception in the runqueue code would cause an infinite loop
of debug messages. The exception would get reported but would loop since runqueue was
still registered as an idle handler.

This patch adds an exception handler to ensure in the case of errors, the system
more gracefully shuts down and doesn't loop.

(Bitbake rev: 99467c7e387f6e71358b40b8afae450d72cd68e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie 46d8d04d51 bitbake: runqueue.py: Fix a stamp comparision bug
We check the stamp cache before comparing t2 and t3 which means that we can miss
a level in the stamp file chains. The result of this is that a stamp can be accepted
as valid when in fact it isn't. Some weird behaviour alerted me to this in a local
build.

This patch also fixes to only uses the cache in recurse mode, there was a corner
case where stamps not in recurse mode could get added to the cache which could cause
an issue potentially.

(Bitbake rev: 7a5f776d325c0e37f58003424beda7cae2695325)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Nitin A Kamble 444ad513c0 bitbake: bitbake wget fetcher: add parameter: downloadfilename
this allows wget fetcher to store the downloaded file in a specified custom filename in ${DL_DIR}

Exmaple:
SRC_URI = "https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz"

This fixes bug:
[YOCTO #2570]

(Bitbake rev: ceb5871007f221c4d86a7bee421d4dd8d9100aaf)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Martin Ertsaas 8a978eeda0 bitbake: Change bzr fetcher to use branch instead of co. Fixes: bzr: ERROR: No pull location known or specified.
This problem occurs when fetching a different revision of the same source. Which mean every time you update a bzr package.
Using branch sets the pull location, and are the preferred way of cloning/branching a repository in bzr.

(Bitbake rev: 877a04d0b3cea9d5dbdf3c54fe0feb54cb997dda)

Signed-off-by: Martin Ertsaas <mertsas@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Richard Purdie 897d7d171e bitbake: cooker.py: Ensure we track parser errors and only show bbappend issues on complete parse
Currently if any parsing failure occurs, there can be a long list of
bbappends that are "dangling" based on the fact that recipes were not
parsed. This change firstly ensures the error counter is incremented
and secondly that the bbappends list is only shown on a completed
parse list.

(Bitbake rev: 358952f0d874b869d361bbd72a5ea317bf939cd3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Richard Purdie 26ace2c081 bitbake: Update version to 1.15.3
(Bitbake rev: befbb5c9428eaf98b2ff9c4b36b0b3f2dce7fe07)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Richard Purdie 798415bd21 bitbake: bitbake: Warn upon finding tab indentation in python functions
Mixed spacing in python functions can cause subtle issues and
generally confuses users. We've standardised on 4 space indentation,
adding this warning helps ensure consistency and avoid bugs. It
also makes _prepend and _append operations on python functions slightly
less risky.

(Bitbake rev: c51cfaf48d3b12a19b01e824b6ba4230376bcad4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Martin Jansa d5fb11747a bitbake: fetch2/svn.py: Use protocol parameter to get the protocol
* it was send in v1 of proto -> protocol changes but then wasn't in V2
  http://patchwork.openembedded.org/patch/31617/
  where warning about proto= was moved to shared __init__

(Bitbake rev: b2017f493ab730d804ae44ec5a168d464626d046)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18 12:43:50 +01:00
Kang Kai 4bd0338972 bitbake: hob2: add elf to hcc supported image types
[Yocto #2709]

OE Core Commit c9b01af84b add elf image
type. This will cause hob build image failed.
Add elf to hcc supoorted image types to fix this issue.

(Bitbake rev: a93a58b7cea2ddb9596cb4d718c0801db5d1a295)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Jeffrey C Honig 4b8f43aaa6 bitbake: siggen.py: Insure .siginfo files writes into shared sstate cache are atomic
Use tempfile.mkstemp to create a temporary file in the sstate dir and move it
   into place after closing.  The previous code would fail in the chmod() if two
   users were running jobs that touched the same signature file.

(Bitbake rev: ff11e9ac5eba2d957917664a7b91b1277d8ad548)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Richard Purdie 05e5ec2be8 bitbake: runqueue.py: Improve error output to be more useful when non-existent tasks are found
(Bitbake rev: 9be584272a63f48d8dc7c9f05b017d11250aa247)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Andrei Gherzan a3a697c425 bitbake: fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol"
As well, if "proto" is used, get the associated value as "protocol"

(Bitbake rev: 53e6b630f0463d2d07cdaa9c9eb36794dc9b6b69)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:26 +01:00
Andrei Gherzan c26f6b2b94 bitbake: fetch2/bzr.py: Use "protocol" parameter to get the protocol
(Bitbake rev: 630876b40ed181312e84f902c4cfb97361afbe81)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Andrei Gherzan bd8d18f742 bitbake: fetch2/hg.py: Use "protocol" parameter to get the protocol
(Bitbake rev: f4a780a7f50fdd8f2bd75888dad790bcfe95b873)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Andrei Gherzan cf599d12d3 bitbake: fetch2/osc.py: Use "protocol" parameter to get the protocol
(Bitbake rev: 01040efce82cfbaa76f46d9f95c984be8f9ea810)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Wenzong Fan 6a210e88b7 bitbake: bitbake: Abort build if runtime dependency conflict
Currently if there are multiple preferred providers available for
a runtime dependency, bitbake will print an Error message and let
the build go on. Anyways the build should abort while any Errors
occured.

[YOCTO #2734]

(Bitbake rev: 5f81a714f4fca785780bef555b419f0250e5ec1c)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Richard Purdie 029e3cea52 bitbake: fetch2/wget: Use FETCHCMD_wget to provide the commandline and options
This also changes to use  -t 2 -T 30 as the defaults which are more sane for
a modern fetcher and already specified in OpenEmbedded metadata.

(Bitbake rev: bf0e5dddf0f63cdb0648fb6d872af5ceef6fbfb0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-10 14:25:38 +01:00
Richard Purdie 254488f089 bitbake: fetch2/cvs.py: Switch to use FETCHCMD_cvs and handle parameters in the fetcher itself
This brings the cvs fetcher more into line with the others and allows consistent usage
of the FETCHCMD variable and option handling.

(Bitbake rev: 390ad59739356422852e976fa246375abc6aba08)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-10 14:25:38 +01:00
Robert Yang 041a0e8dff bitbake: bitbake/cooker: Print which pkgs would be built in -g output
This is for giving the user a clear list to show which pkg would be
built, we have the "bitbake -g", but it is not easy to read for people,
it is for "dot". Improve the "bitbake -g" to also save a pn-buildlist:

$ bitbake -g core-image-sato
...
NOTE: PN build list saved to 'pn-buildlist'
[snip]

The contents of pn-buildlist:

busybox
shadow-native
pth
sysfsutils
qemu-helper-native
curl-native
ncurses-native
gdbm
xserver-xorg
linux-libc-headers
[snip]

[YOCTO #2404]

(Bitbake rev: 18aff925aece774d0172894e25584353519ca03f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09 17:19:32 +01:00
Robert P. J. Day 5051e9837f bitbake: usermanual: Fix missing markup
(Bitbake rev: 68af2b09315ba35eae24933a599014a662789c2c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-06 09:41:56 +01:00
Richard Purdie 136751122a bitbake: data_smart: Fix multiple override interaction with append and prepend operators
Variables which used multiple overrides and the append/prepend operators were
not functioning correctly. This change fixes that.

This fixes the testcase:

OVERRIDES = "linux:x86"
TESTVAR = "original"
TESTVAR_append_x86 = " x86"
TESTVAR_append_x86_linux = " x86+linux"
TESTVAR_append_linux_x86 = " linux+x86"

[YOCTO #2672]

(Bitbake rev: dc35a2e506e15fb7ddbf74c3b3280e9e83ab33bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-05 12:36:45 +01:00
Richard Purdie 3051f36444 bitbake: runqueue.py: Fix recursive task pruning to only prune self referencing tasks
(Bitbake rev: 4962a59793504b26b06cf058dda600a07fbbd951)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 17:40:38 +01:00
Richard Purdie dd5f6ae551 bitbake: fetch2/svn: Enhance to cope with subversion 1.7 upgrade
svn changed working checkout formats between 1.6 and 1.7. Its convoluted to
detect what format a given working copy is in so the simplest solution is simply
to run "svn upgrade" within the working copy.

The base svn command variable is relocated slightly to enable this new code to
work effectively.

(Bitbake rev: ebd3ecdb5f3c6d3fe1fad27cbed4d80f4277e92e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:15 +01:00
Richard Purdie 852266d0bc bitbake: usermanual: Improve task dependency documentation to match reality
(Bitbake rev: f67c0606fc681359fb0c68be55cfc9f11d410f17)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:15 +01:00
Richard Purdie 3488966926 bitbake: runqueue.py: Allow recrdeptasks that have self references
In some cases we want to pull in DEPENDS and RDEPENDS of recrdeptask
dependencies but we need a way to trigger or avoid this behaviour
depending on context. The logical syntax to trigger such behaviour
would be a self referencing recrdeptask:

do_a[recrdeptask] = "do_a do_b"

The dependency chains already recurse this kind of expression correctly, the
missing piece is to avoid any circular reference errors. Since the dependencies
have already been recursively resolved, simply removing any recrdeptask
references is enough to break the circular references.

This patch therefore removes any circular references using the set
difference_update() operator. There will be metadata tweaks required to
add any references needed to the extra taskname.

(Bitbake rev: a5324da9b8a0c9307a6c511ea9009f34be70c92b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Liming An 5d79175b87 bitbake: Hob: fixed some variables not clean bug in detail page
[YOCTO #2679]

(Bitbake rev: 73801f571e040dcdfeb15a15b9a484cbefaae70c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Enrico Scholz 86aeee98cf bitbake: git: do not execute 'git remote prune'
'git remote prune' at this location does not make much sense because
the following 'git remote rm' will prune stale and non-stale branches.

The 'prune' can cause trouble because it will access the network
bypassing the no-network code in bitbake. When this operation fails and
throws an exception, the next command (--> 'git remote rm') will be
skipped.  This in turn, will make all the following operations fail,
because they assume that the remote does not exist yet.

(Bitbake rev: 2ba23df5fad4b94d38a6aed97f7822226d72eb89)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Liming An a5b2c1e4ce bitbake: Hob: change 'run image' and 'deploy' Gui and work flow for building detail page
In build detail page, the response action of clicked the 'run image'
or 'deploy' button will accroding to below as ui design:
1)if there has one file in building result, it will responsed the
'run image'(now, we only support the qemu) or 'deploy' directly
2)if there has more than one file, it will popup a dialog with listed
created files type, they are has same action attributes 'deploy'
or 'runnable'.
Note: because the qemu image (runnable file) can't be deployed and
we can't generated a image that has the two attributes now, can be run
or can be deployed,  so the code will not deal with this case.

[YOCTO #2155]

(Bitbake rev: 0d24b1e85a11b68c8464cf15b49d3fc78f216818)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-29 14:46:47 +01:00
Richard Purdie 4129d5dc7c bitbake: runqueue.py: Handle multiple rdeptask entries
I'm not sure why we don't currently allow multiple entries in rdeptask when
we do in deptask. This makes the handling match between the two since
its trivial to fix.

(Bitbake rev: 19c84fe8854639768c874cc1449963a9867ad397)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie 18e3b500b9 bitbake: fetch2: Revert the regexp removal for the type field and instead anchor regexp
People are using regexps in the url type field so we need to preserve
this bitbake behaviour. To address the issues with https:// urls mapping
badly to file:// urls we anchor the regexp if its not already anchored.
There should be no expressions in the wild which would break with this
change.

(Bitbake rev: ce0579dc256251e523c6330641f98b9f5a0e5761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie c525c131a6 bitbake: test/fetch: Switch the comparision order to make test failures slightly clearer
(Bitbake rev: 2b1311e21172847b6a86cfb21a84fd00e4ab1ac5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie b13951f96d bitbake: test/fetch: Ensure cwd is valud for the git clone
(Bitbake rev: 60b1a9f52dfec98e55a879a637f7142b0175b452)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie 5fa6036d49 bitbake: runqueue: Reimplement recrdepends so it works more correctly
Currently, recrdepends is extremely greedy. For example:

do_foo[rdepends] = "somedep:sometask"
addtask foo

which adds foo with *no* dependencies, will suddenly start appearing
as a dependency in every task which uses recrdepends. So far this has
been mildy annoying but we now have use cases where this makes no sense
at all.

This reworks the recrdepends code to avoid this problem. To do this we
can no longer collapse things into lists just based on file ID. The problem
is this code is extremely performance sensitive. The "preparing runqueue"
phase spends a lot of time in these recursive dependency calculations so any
change here could negatively impact the user experience.

As such, this code has been carefully tested on convoluted dependency trees
with operations like "time bitbake world -g". The net result of this change
and the preceeding changes combined is a net speed up of these operations in
all cases measured.

Tests were made comparing "bitbake world -g" task-depends.dot before and after
this patch. There *are* differences for example -nativesdk do_build dependencies
on -native recipes are no longer present. All removed dependencies appear to
be sensible improvements to the system. The "rdepends" cross contamination
issue above is also fixed.

(Bitbake rev: 82d73423c57569b984ee0ae3d93e3c3bd5dc5216)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie be22b92627 bitbake: runqueue.py: Convert depends variable to use sets
This gives some small performance gains and sets the scene for other
improvements by removing the need for duplicate detection code.

(Bitbake rev: 6fd723479e8d49227fd58040b3485c1d5afc4bc5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie edfb2ba32c bitbake: taskdata: Add gettask_id_fromfnid helper function
This is like gettask_id but doesn't require translation of fnid -> fn
first which the function then translates back. This gives a sizeable
performance improvement since a significant number of lookups are avoided.

(Bitbake rev: 3190cb83e2af195a464f669c5aa8aedbf795160e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Cristian Iorga 2e4bd35df8 bitbake: Fix for Hob bug #2323
Removed unnecessary button from Recipes screen and
replaced the button that diplayed packages size and total image size
from Packages screen with a label.

(Bitbake rev: e6ff1d4bab43fdcd8af1230f1d54615f53c1978e)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00
Kang Kai b224ed2065 bitbake: hig.py: use module tempfile to create temp file
I am sorry that use os.tmpname which casue a security warning.
Follow Darren's suggestion to use tempfile.NamedTemporaryFile instead.

(Bitbake rev: fe514a130579302312f68821536d108c8ceb4363)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00