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

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: Remove deprecated operator

The <> operator is deprecated, replace with !=.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
siggen: Add missing error message parameter

There is clearly a missing parameter from this error message, add it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
prserv: Drop StandardError usage

StandardError doesn't exist in python 3, use Exception instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib: Use modern expcetion syntax

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib: print is a function in moderm python, covert remaining users

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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]

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: "Brought in by" sorting should take into account the (+#) information

[YOCTO #4332]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: clicking on "cancel" should reset table sorting to default

Changed the "cancel" callback function for both recipes and packages
list page.

[YOCTO #4333]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: assure consistency for image size label

After the image was build, update the image size in the packagelistpage.

[YOCTO #4388]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: Drop unused variables from collect_bbfiles()

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: Remove pointless repeated import

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>