hob2: set beginning folders for FileChooserDialog

Set begining folders FileChooserDialog for the select images and
some local directory configurations. That may make user feel more
convenient.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
HOB: 'str' object has no attribute 'close'

For builddetailspage.py:
  The "f" was a stream in the past, it is a string now, so it doesn't
  need f.close(), and change its name to "branch".

  And we don't need the "2>&1" since bb.process.run() can handle it, it
  will raise exception when error occurs, we should handle the exception
  ourselves if we want to ignore the error.

For hig.py:
  Use bb.process.Popen() since it doesn't need the return value. If we
  use bb.process.run(), the parent process will wait for the child process
  to terminate to get the result.

[YOCTO #2511]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: Fixed a compatible issue for indicator icon view

Because some screen not support the alpha visual channel, so the function
'screen.get_rgba_colormap()' will return None, it's a compatible issue, so
change it by another way.

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: add the 'build new' be as the primary action for 'Image detail' page

As ui design, we should set at least one primary action for 'My Image' and
'Image detail' screen as the differnt selected image. if no 'run image' or
no 'save as template' or no 'deploy image' we should set 'build new image'

[YOCTO #2326]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: handle sanity check failures as a separate event

In order to show a friendlier error message that does not bury the
actual sanity error in our typical preamble about disabling sanity
checks, use a separate event to indicate that sanity checks failed.

This change is intended to work together with the related change to
sanity.bbclass in OE-Core.

Fixes [YOCTO #2336].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/data_smart.py: don't report variable in ExpansionError if not set

If the variable name is not specified then don't confuse the error message
by starting off with "Failure expanding variable None...".

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: fix UnboundLocalError when exception occurs during parsing

Fix a recent regression where we see the following additional error
after an error occurs during parsing:

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/paul/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1202, in updateCache
    if not self.parser.parse_next():
  File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1672, in parse_next
    self.virtuals += len(result)
UnboundLocalError: local variable 'result' referenced before assignment

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: report recipe being parsed when ExpansionError occurs

When an ExpansionError occurs during parsing it is useful to know which
recipe was being parsed when it occurred.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/fetch2: ignore remote URIs when doing file checksums

Skip evaluating remote URIs when doing local file checksums, because we
don't need to process them and doing so will trigger a parse failure if
SRCREV is not fully specified. Whilst this is just delaying a check
until runtime (when do_fetch runs for the recipe) we're only validating
this here accidentally and if we did wish to check it during parsing it
ought to be done explicitly.

Fixes [YOCTO #2512]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: include varflags in checksums

Add a dependency to each variable on a filtered list of its varflags.
This is intended to catch things such as SRC_URI checksums, varflags
controlling extra functionality from classes (e.g. the recently updated
update-alternatives class in OE-Core), etc. and ensure their values
influence the sstate checksums.

There is an exclusion list which needs to be set via bitbake.conf
(BB_SIGNATURE_EXCLUDE_FLAGS), if this is not set then the functionality
is disabled. The existing vardepsexclude mechanism can also be used to
exclude undesired varflags, but they must be fully specified, e.g.:

do_patch[vardepsexclude] += "do_patch[someflag]"

Implements [YOCTO #2517].

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