]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
12 years agoutils: Improve better_compile error message
Richard Purdie [Wed, 8 May 2013 17:16:00 +0000 (18:16 +0100)] 
utils: Improve better_compile error message

Similarly to the better_exec improvements, improve the compile failure
messages to be more user readable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoutils: Improve better_exec traceback handling
Richard Purdie [Wed, 8 May 2013 17:14:53 +0000 (18:14 +0100)] 
utils: Improve better_exec traceback handling

The current bitbake tracebacks are hard to read/confusing and sometimes
incomplete. This patch attempts to do better by:

* Moving the note about the exact exception to the end to make things
  read in sequence
* Merged the initial stack trace to become part of the code dump
* Added handling for "/xxxx" file paths since we can load these files
  and include the data as part of the trace
* Dropped the ERROR: prefix to every line, allowing the error messages to
  be spacially accosicated in the UIs
* Moved the "From:" line to the top of each code block and ensured its present
  consistently

With the complexity now in this funciton, I've added try/except wrapping around
it to ensure we catch exceptions in the exception handler too.

Example before:

"""
ERROR: Error executing a python function in /media/build1/poky/meta/recipes-core/eglibc/eglibc-initial_2.17.bb:
TypeError: 'filter' object is not subscriptable

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File "do_populate_lic", line 13, in <module>
ERROR:
ERROR:   File "do_populate_lic", line 6, in do_populate_lic
ERROR:
ERROR:   File "license.bbclass", line 99, in find_license_files
ERROR:
ERROR:   File "/media/build1/poky/meta/lib/oe/license.py", line 38, in visit_string
ERROR:     if pos > 0 and license_pattern.match(elements[pos-1]):
ERROR:
ERROR: The code that was being executed was:
ERROR:      0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
ERROR:      0010:    copy_license_files(lic_files_paths, destdir)
ERROR:      0011:
ERROR:      0012:
ERROR:  *** 0013:do_populate_lic(d)
ERROR:      0014:
ERROR: [From file: 'do_populate_lic', lineno: 13, function: <module>]
ERROR:      0002:def do_populate_lic(d):
ERROR:      0003:    """
ERROR:      0004:    Populate LICENSE_DIRECTORY with licenses.
ERROR:      0005:    """
ERROR:  *** 0006:    lic_files_paths = find_license_files(d)
ERROR:      0007:
ERROR:      0008:    # The base directory we wrangle licenses to
ERROR:      0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
ERROR:      0010:    copy_license_files(lic_files_paths, destdir)
ERROR: [From file: 'do_populate_lic', lineno: 6, function: do_populate_lic]
ERROR:      0095:        lic_files_paths.append((os.path.basename(path), srclicfile))
ERROR:      0096:
ERROR:      0097:    v = FindVisitor()
ERROR:      0098:    try:
ERROR:  *** 0099:        v.visit_string(license_types)
ERROR:      0100:    except oe.license.InvalidLicense as exc:
ERROR:      0101:        bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
ERROR:      0102:    except SyntaxError:
ERROR:      0103:        bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
ERROR: [From file: 'license.bbclass', lineno: 99, function: find_license_files]
ERROR: Function failed: do_populate_lic
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp/work/i586-poky-linux/eglibc-initial/2.17-r3/temp/log.do_populate_lic.17442
"""

Example after:

"""
ERROR: Error executing a python function in /media/build1/poky/meta/recipes-core/eglibc/eglibc-initial_2.17.bb:

The stack trace of python calls that resulted in this exception/failure was:
File: 'do_populate_lic', lineno: 13, function: <module>
     0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
     0010:    copy_license_files(lic_files_paths, destdir)
     0011:
     0012:
 *** 0013:do_populate_lic(d)
     0014:
File: 'do_populate_lic', lineno: 6, function: do_populate_lic
     0002:def do_populate_lic(d):
     0003:    """
     0004:    Populate LICENSE_DIRECTORY with licenses.
     0005:    """
 *** 0006:    lic_files_paths = find_license_files(d)
     0007:
     0008:    # The base directory we wrangle licenses to
     0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
     0010:    copy_license_files(lic_files_paths, destdir)
File: 'license.bbclass', lineno: 99, function: find_license_files
     0095:        lic_files_paths.append((os.path.basename(path), srclicfile))
     0096:
     0097:    v = FindVisitor()
     0098:    try:
 *** 0099:        v.visit_string(license_types)
     0100:    except oe.license.InvalidLicense as exc:
     0101:        bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
     0102:    except SyntaxError:
     0103:        bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
File: '/media/build1/poky/meta/lib/oe/license.py', lineno: 38, function: visit_string
     0034:        new_elements = []
     0035:        elements = filter(lambda x: x.strip(), license_operator.split(licensestr))
     0036:        for pos, element in enumerate(elements):
     0037:            if license_pattern.match(element):
 *** 0038:                if pos > 0 and license_pattern.match(elements[pos-1]):
     0039:                    new_elements.append('&')
     0040:                element = '"' + element + '"'
     0041:            elif not license_operator.match(element):
     0042:                raise InvalidLicense(element)
Exception: TypeError: 'filter' object is not subscriptable

ERROR: Function failed: do_populate_lic
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp/work/i586-poky-linux/eglibc-initial/2.17-r3/temp/log.do_populate_lic.3275
ERROR: Task 9 (/media/build1/poky/meta/recipes-core/eglibc/eglibc-initial_2.17.bb, do_populate_lic) failed with exit code '1
"""

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobin/bitbake: Ensure early errors are shown to the user
Richard Purdie [Tue, 7 May 2013 08:23:47 +0000 (08:23 +0000)] 
bin/bitbake: Ensure early errors are shown to the user

Currently if errors occur early in the init process, the errors may
not be shown to the user. This change ensures that if a failure does
occur, the messages are flushed from the queue and shown to the user.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2/svn: Do not save authentication
Vanveerdeghem, Simon [Fri, 12 Apr 2013 06:35:38 +0000 (08:35 +0200)] 
fetch2/svn: Do not save authentication

Signed-off-by: Simon Vanveerdeghem <simon.vanveerdeghem@barco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: remove stack trace depth limitation
Bogdan Marinescu [Tue, 23 Apr 2013 13:43:45 +0000 (16:43 +0300)] 
bitbake: remove stack trace depth limitation

In case of an error in bitbake, the stack trace is limited to 5
items. This is an endless source of confusion and it makes bugs
reports impractical, since a full stack trace can't be included
in the bug report. This patch simply removes the depth limit.

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart.py: add some internal bitbake variables to configuration hash
Laurentiu Palcu [Fri, 3 May 2013 14:37:17 +0000 (17:37 +0300)] 
data_smart.py: add some internal bitbake variables to configuration hash

Take __BBTASKS, __BBHANDLERS and __BBANONFUNCS into account when
computing the configuration hash.

[YOCTO #4447]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv/cooker: Handle PRService errors cleanly
Richard Purdie [Thu, 2 May 2013 14:46:11 +0000 (15:46 +0100)] 
prserv/cooker: Handle PRService errors cleanly

Current if the PR Service fails to start, bitbake carries on regardless or
hangs with no error message. This adds an exception and then handles it correctly
so the UIs correctly handle the error and exit cleanly.

[YOCTO #4010]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agogoggle: fix invalid error check
Martin Donnelly [Thu, 25 Apr 2013 16:41:06 +0000 (17:41 +0100)] 
goggle: fix invalid error check

runCommand was returning 'error' but checking for 'err'
resulting in an exception.

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: fix performance regression
Paul Eggleton [Mon, 15 Apr 2013 14:27:34 +0000 (15:27 +0100)] 
data: fix performance regression

BitBake commit 7c568132c54a21161de28907159f902462f1e2bb resulted in a
fairly serious performance regression during parsing, almost doubling
the time taken to do a full parse and almost certainly impacting
performance during building. The expandKeys function is called
frequently, and if we avoid using keys() and instead just use the normal
variable lookup mechanism, performance is restored.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: rename file with bad checksum instead of removing it completely
Martin Jansa [Fri, 12 Apr 2013 14:08:10 +0000 (16:08 +0200)] 
fetch2: rename file with bad checksum instead of removing it completely

* this can be useful when someone wan't to compare old file with
  bad checksum and new one

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Refine sorting mechanisms in Hob
Cristiana Voicu [Thu, 11 Apr 2013 12:07:59 +0000 (15:07 +0300)] 
hob: Refine sorting mechanisms in Hob

-refine sorting functions for each column from recipe list page
and package list page
-sort correctly size column from packages list page
-set default sroting order and secondary sorting criteria
-make included on included recipes/packages no sortable

[YOCTO #2346 & #4194]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agomonitordisk.py: disable inode checking for btrfs
Robert Yang [Mon, 15 Apr 2013 08:47:36 +0000 (16:47 +0800)] 
monitordisk.py: disable inode checking for btrfs

The btrfs doesn't have static inode, so disable the inode check for it,
the previouse patch has set it:

minInode = None

But this is incorrect, the minInode is just a temporary variable, it
should be:

self.devDict[k][2] = None

[YOCTO #3609]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoUpdate to version 1.19.0 for master
Richard Purdie [Wed, 10 Apr 2013 15:10:29 +0000 (16:10 +0100)] 
Update to version 1.19.0 for master

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoUpdate to version 1.18.0
Richard Purdie [Wed, 10 Apr 2013 15:08:53 +0000 (16:08 +0100)] 
Update to version 1.18.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata.py: Add a warning when expandKeys overwrites an existing key
Mark Hatle [Tue, 19 Mar 2013 20:28:51 +0000 (15:28 -0500)] 
data.py: Add a warning when expandKeys overwrites an existing key

When two variables are defined as:

${var} = "bar"
foo = "foobar"

The value of 'foo' when ${var} == foo becomes indeterminate.  We
want to warn a user when this situation has been encountered so they
can take corrective actions.

In the above example usually foo == bar, unless multilibs are enabled.
Then ml-foo = "ml-foobar".

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob:Only display scrolled list of images if needed
Ioana Grigoropol [Tue, 9 Apr 2013 10:25:48 +0000 (13:25 +0300)] 
hob:Only display scrolled list of images if needed

- do not set the Images window to always display a scroll bar if it is not needed

[Yocto #4171]
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake:hob: use a socks proxy mechanism for git
Cristian Iorga [Mon, 8 Apr 2013 16:06:33 +0000 (19:06 +0300)] 
bitbake:hob: use a socks proxy mechanism for git

Instead of a custom git proxy mechanism, Hob now
uses a SOCKS proxy in order to work with external
repos via the oe-git-proxy helper script.

Fixes [YOCTO #4187]

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Cristian Iorga <ubik3000@gmail.com>
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agopropertydialog adjustments for package.bbclass
Andrei Dinu [Wed, 3 Apr 2013 11:58:47 +0000 (14:58 +0300)] 
propertydialog adjustments for package.bbclass

After moving the code from packageinfo.bbclass to
package.bbclass, minor adjustments were made to the
parsing of the package items.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: giving focus to the search field loses the table sorting
Cristiana Voicu [Mon, 1 Apr 2013 10:36:25 +0000 (13:36 +0300)] 
hob: giving focus to the search field loses the table sorting

Giving focus to the search text field should not impact the table
sorting.

[YOCTO #4113]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: add tooltip on "clear search" button
Cristiana Voicu [Fri, 29 Mar 2013 13:40:18 +0000 (15:40 +0200)] 
hob: add tooltip on "clear search" button

[YOCTO #4116]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoRemoved popup when including a package
Andrei Dinu [Fri, 29 Mar 2013 13:26:37 +0000 (15:26 +0200)] 
Removed popup when including a package

Fixed the functionality which made an information
dialog pop up when including any package.

[HOB #4138]

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobb.tests.fetch: Opt-out for unittests that require network
Olof Johansson [Tue, 26 Mar 2013 08:28:38 +0000 (09:28 +0100)] 
bb.tests.fetch: Opt-out for unittests that require network

With this change, you can opt-out to skip unit tests that require an
internet connection. To opt-out, you'll set the environment variable
BB_SKIP_NETTESTS to 'yes'.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Search strings and results should be persistent
Cristiana Voicu [Wed, 27 Mar 2013 15:20:07 +0000 (17:20 +0200)] 
hob: Search strings and results should be persistent

Now, the search results stay until I clear the search field,
so that I can manipulate the search results.

[YOCTO #4112 & #4117]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agopackageselectionpage.py : added information to hob
Andrei Dinu [Thu, 28 Mar 2013 08:23:22 +0000 (10:23 +0200)] 
packageselectionpage.py : added information to hob

In order to have information for each package in hob,
a new item is added to the dictionary, represeting the
files that are brought in by each package.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohoblistmodel.py : passing the package information to hob
Andrei Dinu [Thu, 28 Mar 2013 08:23:21 +0000 (10:23 +0200)] 
hoblistmodel.py : passing the package information to hob

Added a new column to the model and also populating
it with the information brought in from the
packageinfo.bbclass.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agopropertydialog.py : added 'Package files' functionality
Andrei Dinu [Thu, 28 Mar 2013 08:23:20 +0000 (10:23 +0200)] 
propertydialog.py : added 'Package files' functionality

Extended the packages page information with the
listing of the files brought in by every package.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker.py : added variables related to cache_extra
Andrei Dinu [Thu, 28 Mar 2013 08:23:18 +0000 (10:23 +0200)] 
cooker.py : added variables related to cache_extra

So that the information added to cache_extra could
be accesed by hob, new variables were added in
the cooker.py.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocache_extra.py : added package information
Andrei Dinu [Thu, 28 Mar 2013 08:23:17 +0000 (10:23 +0200)] 
cache_extra.py : added package information

Added a new variable to cache_extra so that
the files brought in by a package can be
displayed in hob.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake/fetch: Add git submodules fetcher
Richard Purdie [Fri, 22 Mar 2013 14:18:18 +0000 (14:18 +0000)] 
bitbake/fetch: Add git submodules fetcher

This adds very basic git submodule support to the fetcher. It can be
used by replacing a git:// url prefix with a gitsm:// prefix, otherwise
behaviour is the same as the git fetcher. Whilst this code should be
functional, its not as efficient as the usual git fetcher due to the
need to checkout the tree to fetch/update the submodule information. git
doesn't support submodule operations on the bare clones the standard git
fetcher uses which is also problematic.

This code does however give a starting point to people wanting to use
submodules.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodoc/bitbake.1: Update with missing parameters
Richard Purdie [Mon, 25 Mar 2013 15:54:55 +0000 (15:54 +0000)] 
doc/bitbake.1: Update with missing parameters

Patch from Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> to
add missing parameters to bitbake man page. Added hob to ui list too.

[YCOTO #4049]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoAdjust spacing on information windows
Andrei Dinu [Fri, 22 Mar 2013 15:20:10 +0000 (17:20 +0200)] 
Adjust spacing on information windows

[Hob #4070]

- tweaked the spacing on info windows

- fixed text bolding in simple settings dialog

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: implementation of search functionality in Hob
Cristiana Voicu [Wed, 20 Mar 2013 12:35:06 +0000 (14:35 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Hob custom image build error
Cristiana Voicu [Wed, 20 Mar 2013 09:21:39 +0000 (11:21 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agorunqueue: Use taskData.fn_index[depdata] instead of uninitialized dep
Martin Jansa [Wed, 13 Mar 2013 20:01:51 +0000 (21:01 +0100)] 
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

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: some settings in Hob are not remembered
Cristiana Voicu [Mon, 11 Mar 2013 13:06:58 +0000 (15:06 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoutils.py: fix BB_ENV_WHITELIST
Robert Yang [Sat, 16 Mar 2013 08:07:41 +0000 (16:07 +0800)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agomonitordisk.py: monitor disks based on path
Robert Yang [Fri, 15 Mar 2013 07:42:48 +0000 (15:42 +0800)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocrumbs/recipeselectionpage: added events for the "Package Groups" "All recipes
Andrei Dinu [Tue, 5 Mar 2013 15:36:31 +0000 (17:36 +0200)] 
crumbs/recipeselectionpage: added events for the "Package Groups" "All recipes

" tabs and passing the information needed to the function created
in the builder.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocrumbs/packageselectionpage: added event for the "All packages" tab
Andrei Dinu [Tue, 5 Mar 2013 15:36:30 +0000 (17:36 +0200)] 
crumbs/packageselectionpage: added event for the "All packages" tab

and passing the information needed to the function created in the builder.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocrumbs/imageconfigurationpage: added information so that it displays correctly
Andrei Dinu [Tue, 5 Mar 2013 15:36:29 +0000 (17:36 +0200)] 
crumbs/imageconfigurationpage: added information so that it displays correctly

in the information dialogs.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohobwidget: added functionality for the information dialogs.
Andrei Dinu [Tue, 5 Mar 2013 15:36:28 +0000 (17:36 +0200)] 
hobwidget: added functionality for the information dialogs.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocrumbs/hoblistmodel: added information columns needed for prop dialogs
Andrei Dinu [Tue, 5 Mar 2013 15:36:27 +0000 (17:36 +0200)] 
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.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohig/simplesettingsdialog: added entries for information dialogs
Andrei Dinu [Tue, 5 Mar 2013 15:36:26 +0000 (17:36 +0200)] 
hig/simplesettingsdialog: added entries for information dialogs

added information so that it would display correctly in the information dialogs.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohig/propertydialog: new class added for the property windows.
Andrei Dinu [Tue, 5 Mar 2013 15:36:25 +0000 (17:36 +0200)] 
hig/propertydialog: new class added for the property windows.

this covers functionality for : recipe selection page
                                package selection page
                                information dialogs

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohig/advancedsettingsdialog: Added information for the information dialogs
Andrei Dinu [Tue, 5 Mar 2013 15:36:24 +0000 (17:36 +0200)] 
hig/advancedsettingsdialog: Added information for the information dialogs

added information so that it would display
 correctly in the information dialogs.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocrumbs/builder: Replaced the function that displayed tooltips
Andrei Dinu [Tue, 5 Mar 2013 15:36:23 +0000 (17:36 +0200)] 
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.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Use extra cache information
Andrei Dinu [Tue, 5 Mar 2013 15:36:22 +0000 (17:36 +0200)] 
cooker: Use extra cache information

-extended cooker.py so that the extra information in cache_extra.py could
 be used

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocache_extra: Add extra variables
Andrei Dinu [Tue, 5 Mar 2013 15:36:21 +0000 (17:36 +0200)] 
cache_extra: Add extra variables

- in order to have the information needed in the property
  windows, cache_extra.py was extended with variables.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-layers: fix duplicated help info
Robert Yang [Wed, 6 Mar 2013 05:36:23 +0000 (13:36 +0800)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoRevert "cooker: parse using bb.compat.Pool"
Richard Purdie [Wed, 6 Mar 2013 15:32:35 +0000 (15:32 +0000)] 
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.

12 years agoRevert "cooker: now that we use a Pool, raise the exceptions"
Richard Purdie [Wed, 6 Mar 2013 15:31:49 +0000 (15:31 +0000)] 
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.

12 years agosiggen: add quotes around variable values to see whitespace
Martin Jansa [Sat, 2 Mar 2013 16:50:05 +0000 (17:50 +0100)] 
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

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: now that we use a Pool, raise the exceptions
Christopher Larson [Mon, 25 Feb 2013 18:48:00 +0000 (11:48 -0700)] 
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]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoperforce.py: fix the perforce fetcher
Robert Yang [Mon, 4 Feb 2013 03:19:36 +0000 (03:19 +0000)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild.py: avoid deleting taint files when writing stamps
Paul Eggleton [Thu, 21 Feb 2013 15:23:35 +0000 (15:23 +0000)] 
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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoRevert "fetch2: Adapt encode/decode url to use URI class"
Richard Purdie [Wed, 20 Feb 2013 07:05:11 +0000 (23:05 -0800)] 
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.

12 years agoutils: Improve remove funciton to handle whitespace
Richard Purdie [Tue, 19 Feb 2013 22:31:52 +0000 (14:31 -0800)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake/fetch2: workaround urlparse in older python not support git
Matthew McClintock [Tue, 19 Feb 2013 20:20:01 +0000 (14:20 -0600)] 
bitbake/fetch2: workaround urlparse in older python not support git

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agowget: Improve mkdir handling
Richard Purdie [Tue, 19 Feb 2013 21:52:38 +0000 (13:52 -0800)] 
wget: Improve mkdir handling

If there there isn't a subdirectory to the downloadfilename, this was
failing. This patch avoids that issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: parse using bb.compat.Pool
Christopher Larson [Tue, 12 Feb 2013 17:28:47 +0000 (12:28 -0500)] 
cooker: parse using bb.compat.Pool

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
12 years agofetch2: Add SFTP fetcher
Olof Johansson [Tue, 29 Jan 2013 07:50:11 +0000 (08:50 +0100)] 
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.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Add editor modelines for bb.tests.*
Olof Johansson [Tue, 29 Jan 2013 07:50:10 +0000 (08:50 +0100)] 
fetch2: Add editor modelines for bb.tests.*

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Adapt encode/decode url to use URI class
Olof Johansson [Tue, 29 Jan 2013 07:50:09 +0000 (08:50 +0100)] 
fetch2: Adapt encode/decode url to use URI class

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: unittests for bb.fetch2.URI class
Olof Johansson [Tue, 29 Jan 2013 07:50:08 +0000 (08:50 +0100)] 
fetch2: unittests for bb.fetch2.URI class

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Add a class representing a generic URI
Olof Johansson [Tue, 29 Jan 2013 07:50:07 +0000 (08:50 +0100)] 
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.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Remove unused code in wget fetcher
Olof Johansson [Tue, 29 Jan 2013 07:50:06 +0000 (08:50 +0100)] 
fetch2: Remove unused code in wget fetcher

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Ensure directory for stampfile exists before trying to create it
Richard Purdie [Fri, 15 Feb 2013 16:17:30 +0000 (16:17 +0000)] 
fetch2: Ensure directory for stampfile exists before trying to create it

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoutils: Use rm -rf in remove()
Richard Purdie [Sun, 3 Feb 2013 16:51:34 +0000 (16:51 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: remove save/load template functionality
Cristiana Voicu [Thu, 31 Jan 2013 12:43:08 +0000 (14:43 +0200)] 
hob: remove save/load template functionality

The Hob templates functionality, in its current incarnation,
is confusing and has no clear utility.

[YOCTO #3696]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoknotty.py: fix unknown event bb.event.DiskFull
Robert Yang [Fri, 1 Feb 2013 08:56:45 +0000 (16:56 +0800)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-layers: make show-cross-depends avoid long path
Robert Yang [Wed, 6 Feb 2013 09:28:16 +0000 (17:28 +0800)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: remove parsing warnings when machine is changed
Cristiana Voicu [Mon, 4 Feb 2013 14:56:00 +0000 (16:56 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: no sanity checks re-run
Cristiana Voicu [Tue, 5 Feb 2013 14:52:02 +0000 (16:52 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agomonitordisk.py: disable the inode checking for some fs
Robert Yang [Mon, 4 Feb 2013 10:03:35 +0000 (18:03 +0800)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Improve lock/done stamp file paths for local files
Richard Purdie [Thu, 14 Feb 2013 21:38:17 +0000 (21:38 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake & hob: reparse config files, when sanity check updates bblayers.conf
Cristiana Voicu [Tue, 12 Feb 2013 13:27:22 +0000 (15:27 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Ensure expansions happen in URL parameters in uri_replace
Richard Purdie [Thu, 14 Feb 2013 21:36:30 +0000 (21:36 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoConfHandler: Use re.X to make long regexp more readable
Olof Johansson [Thu, 14 Feb 2013 11:28:32 +0000 (12:28 +0100)] 
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.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotests/codeparser: Hack around circular inclusion problem
Richard Purdie [Thu, 14 Feb 2013 21:35:25 +0000 (21:35 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agowget: Only use -O option when not spidering
Richard Purdie [Thu, 14 Feb 2013 21:33:04 +0000 (21:33 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocodeparser: Track bb.utils.contains usage
Richard Purdie [Thu, 14 Feb 2013 21:59:21 +0000 (21:59 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocodeparser: Track appendVar and prependVar calls as we do for getVar
Richard Purdie [Thu, 14 Feb 2013 21:57:36 +0000 (21:57 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoRemove whitelisted vars from non-task deps
Christopher Larson [Tue, 3 Apr 2012 23:23:49 +0000 (18:23 -0500)] 
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.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoConfHandler: Improve regexp to fix mis-parsing of += and no whitespace
Richard Purdie [Thu, 14 Feb 2013 10:31:12 +0000 (10:31 +0000)] 
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake/utils: Improve environment handling to allow UIs access to original environment
Richard Purdie [Mon, 11 Feb 2013 11:00:45 +0000 (11:00 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv/serv.py: Fix logging in daemon mode
Richard Purdie [Wed, 6 Feb 2013 23:18:19 +0000 (23:18 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: Always use separate process for PR Service
Richard Purdie [Wed, 6 Feb 2013 15:59:07 +0000 (15:59 +0000)] 
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoUpdate version to 1.17.0
Richard Purdie [Wed, 6 Feb 2013 13:07:35 +0000 (13:07 +0000)] 
Update version to 1.17.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Remove broken git variables from the environment
Darren Hart [Tue, 5 Feb 2013 22:52:45 +0000 (14:52 -0800)] 
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.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Export upper and lower case environment variables
Darren Hart [Tue, 5 Feb 2013 22:52:44 +0000 (14:52 -0800)] 
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

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker/utils: Drop custom 'interactive' variables list and store environment in BB_OR...
Richard Purdie [Tue, 5 Feb 2013 16:02:03 +0000 (16:02 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocompat/utils: Add copy of python multiprocessing pool for pre 2.7.3 issues
Richard Purdie [Wed, 6 Feb 2013 00:28:08 +0000 (00:28 +0000)] 
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: fetch2: Print the complete SRCREV variable name when INVALID
Darren Hart [Tue, 5 Feb 2013 10:31:37 +0000 (02:31 -0800)] 
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.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agosetup.py: Set the 'url' in setup.py to the OE BitBake page.
Bill Traynor [Thu, 31 Jan 2013 17:01:32 +0000 (12:01 -0500)] 
setup.py: Set the 'url' in setup.py to the OE BitBake page.

Removed the old berlios BitBake project page and inserted
the BitBake page from the OE project:
http://www.openembedded.org/wiki/BitBake

Signed-off-by: Bill Traynor <wmat@alphatroop.com>
12 years agobitbake-layers: print the recipe's depends that crosses a layer boundary
Robert Yang [Fri, 25 Jan 2013 08:35:10 +0000 (16:35 +0800)] 
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agossh.py: add example SRC_URI
Martin Jansa [Mon, 28 Jan 2013 15:56:42 +0000 (16:56 +0100)] 
ssh.py: add example SRC_URI

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agossh.py: throw ParameterError when someone tries ssh://foo; protocol=git
Martin Jansa [Mon, 28 Jan 2013 15:56:41 +0000 (16:56 +0100)] 
ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git

* taken from SFTP fetcher:
  http://patchwork.openembedded.org/patch/43027/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agossh: fix fetcher
Martin Jansa [Mon, 28 Jan 2013 15:56:40 +0000 (16:56 +0100)] 
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

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: eliminate the "by recipe" grouping in the packages table
Cristiana Voicu [Thu, 31 Jan 2013 11:50:16 +0000 (13:50 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Use a GtkTreeView to present and configure the sstate mirrors
Cristiana Voicu [Mon, 28 Jan 2013 13:33:39 +0000 (15:33 +0200)] 
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>