Commit Graph

2440 Commits

Author SHA1 Message Date
Richard Purdie c035bf9c21 bitbake: cooker.py: Drop confusing updateCache calls
updateCache() gets called by command.py when needed and needs to be iterated
over. The calls in cooker.py are therefore just plain wrong/confusing now.

(Bitbake rev: 8b7c65bba466bb6773c56849074978ce2c956129)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie d8cf6e956f bitbake: cooker: Remove pointless repeated import
(Bitbake rev: e01914a8eaa97a410cb5fe9480f2d96bb6553342)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie 06aaf0d0c9 bitbake: cooker: Fix get_bbfiles()
Its clear looking at the code the path argument has never been used and doesn't
work. Tweak the function to be a little more readable.

(Bitbake rev: d7047ceaf29b870ade3257e263e010f65aa8bc6e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie 51e54ed8a9 bitbake: cooker: Separate out collections handling code into its own class
The Cooker class is too large and needs to be split up into different
functional units. Splitting out the collections code into its own class
seems like a good place to start to try and disentangle things.

(Bitbake rev: ca1fcbb6e214c155a05328779d3d326e10c5eac0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie 6ebdeb48c4 bitbake: cooker: Drop unused variables from collect_bbfiles()
(Bitbake rev: 67a8e13eed6433bd1e4fab82ece5f6774b42fa00)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Olof Johansson 88a7b041fb bitbake: pysh: Say what kind of token isn't implemented
When the shell lexer finds an unrecognized dollar token, the error
message should contain what kind of token it is having problems with.

(Bitbake rev: 1acb9c338018c612db519d2db823c66b567863b9)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:35:10 +01:00
Cristiana Voicu d98419ae70 bitbake: hob: assure consistency for image size label
After the image was build, update the image size in the packagelistpage.

[YOCTO #4388]
(Bitbake rev: 4d6d02e61b32d1d710c708774f08cc5e7764415d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Cristiana Voicu 9c60292b6f bitbake: hob: clicking on "cancel" should reset table sorting to default
Changed the "cancel" callback function for both recipes and packages
list page.

[YOCTO #4333]
(Bitbake rev: 05ebbaa2426716c6254c4a98872020d02d2944bd)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Cristiana Voicu 24f060805f bitbake: hob: "Brought in by" sorting should take into account the (+#) information
[YOCTO #4332]
(Bitbake rev: 226a5f2d0947460cb6df9e97f0146b65f96a7f8c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Cristiana Voicu 39d3409d31 bitbake: hob: sort alphabetically results in groups of recipes/packages
When you search a string, there are 2 groups: recipes/packages starting
with that string, and the rest. These 2 groups are now sorted.

[YOCTO #4111]
(Bitbake rev: 8d2b2a1c97570d3c6b40727f1afa1db8c00882f9)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Andrei Dinu 6dab4d0148 bitbake: Updated information in tooltips
Updated information for "Additional free space" and
"Image basic size" to match the description in the
manual.

[HOB #4354]
[HOB #4355]

(Bitbake rev: d3eac3f104689137c071c91a343ca4558b9d9f17)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:32 +01:00
Richard Purdie e5d077d57f bitbake: lib: print is a function in moderm python, covert remaining users
(Bitbake rev: d0b180d868390a464b6799ad90db6bbe0350e158)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:24 +01:00
Richard Purdie 3e86a6cdde bitbake: lib: Use modern expcetion syntax
(Bitbake rev: a4a37b6a83faa62f61433122c4583e93e64f7372)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:24 +01:00
Richard Purdie a823c88839 bitbake: prserv: Drop StandardError usage
StandardError doesn't exist in python 3, use Exception instead.

(Bitbake rev: 4a40046036493f0cdf0f66487ad5ce083461a5c2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:24 +01:00
Richard Purdie 9b913576ea bitbake: siggen: Add missing error message parameter
There is clearly a missing parameter from this error message, add it.

(Bitbake rev: d98be5ea69b99fb7934fc3093422f139bc37a1cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie c6c341a555 bitbake: providers: Remove pointless lambda sort function
This lambda function is equivalent to the default sort used by sorted,
so we can simply remove this. The syntax isn't compatible with python 3.

(Bitbake rev: da8550fc884596222daa3f8794dce1abd01e5612)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie 5c3944c0f9 bitbake: cooker: Remove deprecated operator
The <> operator is deprecated, replace with !=.

(Bitbake rev: 4a43e58dd97ec6ea304eaa727c030973a5bc91b7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie 4a081b5a52 bitbake: lib: Clean up various file access syntax
Python 3 is stricter about how files are accessed. Specficially:

 * Use open(), not file()
 * Use binary mode for binary files (when checksumming)
 * Use with statements to ensure files get closed
 * Add missing file close statements

(Bitbake rev: 9f08b901375ba640f47596f1bcf43f98a931550f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Martin Jansa d529c11fa5 bitbake: git: remove symling before updating mirror tarball
* with read-only PREMIRROR (e.g. mounted over NFS or CIFS
  and referenced as file:///mnt/premirror) we cannot use
  BB_GENERATE_MIRROR_TARBALLS because all git2_abc.git.tar.gz
  files later became just symlinks to read-only location in PREMIRROR
  (it works fine on first build and for new components, because
  at that time there isn't tarball on PREMIRROR yet).

  ERROR: Fetcher failure: Fetch command failed with exit code 141, output:
  tar (child): /build/downloads/git2_abc.git.tar.gz: Cannot open: Read-only file system
  tar (child): Error is not recoverable: exiting now

(Bitbake rev: 3627b02f77c78beedadadd77c619b9e5edaae076)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:15:10 +01:00
Paul Eggleton fd8dcd7b88 bitbake: bin/bitbake: add a check for /dev/shm existing
Python multiprocessing needs /dev/shm, and if it doesn't exist (e.g. in
a chroot environment) or is not writable, you'll get
"OSError: [Errno 38] Function not implemented" or
"OSError: [Errno 13] Permission denied" with a traceback, which doesn't
really help to explain what is wrong.

Implements [YOCTO #4407].

(Bitbake rev: e7460d01f281f913a94192e1f4bd20688164bdd4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:14:12 +01:00
Richard Purdie a189ec4ae7 bitbake: utils: Improve better_compile error message
Similarly to the better_exec improvements, improve the compile failure
messages to be more user readable.

(Bitbake rev: 9bc92d0210e13e4cc98727f6c9ec2f47c2221e77)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:52 +01:00
Richard Purdie bc95ddec6d bitbake: 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
"""

(Bitbake rev: c5de66b870406d9bd1161a9b7e2b04fe6eb065fe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:52 +01:00
Richard Purdie f58e82b9e9 bitbake: 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.

(Bitbake rev: fda84c4285e0bc31c249b6dd5464aeb6ad622a9a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:52 +01:00
Vanveerdeghem, Simon 67ed18e656 bitbake: fetch2/svn: Do not save authentication
(Bitbake rev: a9b1e7c2ad13ff47acb629bae082d4f96e174f99)

Signed-off-by: Simon Vanveerdeghem <simon.vanveerdeghem@barco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Bogdan Marinescu 7709342e69 bitbake: 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.

(Bitbake rev: 02629c42fb09413d9da16cfe43e03338ce7db3ff)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Laurentiu Palcu 6db2025321 bitbake: 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]

(Bitbake rev: 260ced7452405fc43ce3d9dd6798236aa07cc716)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Richard Purdie a4cc40c622 bitbake: 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]

(Bitbake rev: 949c01228a977c3b92bfc0802f6c71b40d8e05b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Martin Donnelly 8779ebcc90 bitbake: goggle: fix invalid error check
runCommand was returning 'error' but checking for 'err'
resulting in an exception.

(Bitbake rev: 263aa44ed47e0cb03e1a97e7ed4a50bd9f828c78)

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Richard Purdie c88bfe215f bitbake: Update to version 1.19.0 for master
(Bitbake rev: c47088a86fd8ad06c1810d04d9537c4cd01e8bef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:05 +01:00
Paul Eggleton 9bbf6f350d bitbake: 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.

(Bitbake rev: 034b392e9877309f15940b258fc2c16f16fb40b5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Martin Jansa 07e83d04ac bitbake: 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

(Bitbake rev: 33c6b93597dd43ab03ce7b62ba3eeb1893a68c38)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Cristiana Voicu 3cc69d3413 bitbake: 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]
(Bitbake rev: 56822176e3d5e613654a46c983d2f979d7a9eebc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Robert Yang 612c25c597 bitbake: 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]

(Bitbake rev: 7e45149c292bc92314af9b42962fde8f603a179f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Richard Purdie ca6321fff4 bitbake: Update to version 1.18.0
(Bitbake rev: 94b54788cadabf6ebfb7711674646dbea6204805)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 16:17:22 +01:00
Mark Hatle 05d4f94c25 bitbake: 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".

(Bitbake rev: 7c568132c54a21161de28907159f902462f1e2bb)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 13:06:44 +01:00
Ioana Grigoropol 1b93e2bc91 bitbake: 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]
(Bitbake rev: 970e2e6f079fa9a49646f86364eae9a4ee241f90)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 09:23:18 +01:00
Cristian Iorga 4330e152ab bitbake: 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]

(Bitbake rev: 0b81a2c4a5611b64dbdd40131730a82c149b94a2)

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>
2013-04-10 09:23:18 +01:00
Andrei Dinu ef0ef862c1 bitbake: 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.

(Bitbake rev: 414fe98fe367ba44ea0fd20d8fe1296bcef58ea6)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 14:10:56 +01:00
Cristiana Voicu 0d47a7d8e8 bitbake: 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]
(Bitbake rev: b5b4b6e4fefa6a164a49b291a0993b1ff63947f4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 17:57:07 +01:00
Cristiana Voicu b5b1592dd3 bitbake: hob: add tooltip on "clear search" button
[YOCTO #4116]
(Bitbake rev: 3c1b63cf49bdbffef0728fc83bd5a35bc16fd3dc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 17:57:07 +01:00
Andrei Dinu 19ebf1debe bitbake: Removed popup when including a package
Fixed the functionality which made an information
dialog pop up when including any package.

[HOB #4138]

(Bitbake rev: 6cabbb241ab3959b3c8f084423469c0bfc9899bd)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 17:57:07 +01:00
Olof Johansson 911dbbd8ee bitbake: 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'.

(Bitbake rev: 9ff5f172096a4f51b6b085307506473405dc4f59)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:45:17 +00:00
Cristiana Voicu 2f4fe1ee11 bitbake: 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]
(Bitbake rev: d880ce966ca825aa66a23755fcb47497fb3f26c3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:25 +00:00
Andrei Dinu e98716fc92 bitbake: 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.

(Bitbake rev: ffb8e32166d0ab690131e753f91592011c3f7ffb)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:25 +00:00
Andrei Dinu 026914ea4c bitbake: 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.

(Bitbake rev: afa78ae15be3e0babadd5d86092a2852135cfcce)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Andrei Dinu d08acf97c9 bitbake: propertydialog.py : added 'Package files' functionality
Extended the packages page information with the
listing of the files brought in by every package.

(Bitbake rev: 42b1ce37b5c9a357108afdc01b0e9f008a84e6e3)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Andrei Dinu 6d9f418a6e bitbake: 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.

(Bitbake rev: f2d5f4ca9ac82599c74838844f7e54e481e023d3)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Andrei Dinu 43a3a4b5da bitbake: 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.

(Bitbake rev: 94e2f899457d6565442a933529dd3db261ab12f0)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Richard Purdie a6c6a8ddb6 bitbake: 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.

(Bitbake rev: 25e0b0bc50114f1fbf955de23cc0c96f5f7a41e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-25 15:58:31 +00:00
Richard Purdie 8054716544 bitbake: 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]

(Bitbake rev: ca7cd6c1318e0ef066f9e12e7516a47b2af3a7d1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-25 15:58:31 +00:00
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