bitbake/fetch2: Remove hardcoded file removal and use clean method

Under certain circumstances, bitbake could remove files which were
outside its control since it unconditionally removes ud.localpath.
In the file:// case this can point at external paths.

This patch converts it to use the clean() method which will remove
files when its safe to do so but not in the file:// case since the
file:// handler has an empty clean method. This means bitbake no
longer removes files outside its control and is generally much safer.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/fetch2: Improve stamp creation in mirror code

Under certain contitions such as local file:// mirrors of all files,
bitbake might not check checksums. This is not desirable and we should
always check the checksum where possible.

This only exception to this is the git mirror tarball case where the
checksum is unknown but we need to create the .done stamp for other
reasons. This patch preserves thta functionality but in a more specific
section of code where this doesn't interfere in normal checksums.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/fetch2: Improve visibility of checksum warnings when fetching from mirrors

When fetching from mirrors, checksum errors would get buried in the
logs. This raises their profile so a warning is logged on the console
when fetcher checksum issues are encountered, even if other attempts
are made to get the file (which may or may not have the same issue).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/fetch: If checksums are available, check them for any file, local or remote

Currently, checksums are only checked for remote files. This changes
the check to apply to any file we have checksum data for. A mismatch
against a file is fatal but in the local case, no warnings are shown
about missing checksums.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/fetch: Spell out which fetcher backends support and recommend checksums

There were some hardcoded behaviours in the system for which backends
support checksums verses which backends recommend them verses which
don't recommend them.

This moves the functionality into specific fetchers and then makes the
general code generic. This cleans up the codebase and fixes some corner
cases such as trying to checksum directories returned by the git fetcher.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
knotty2: return exit code

'bitbake -u knotty2' never failed which was caused by main() not
propagating the exit code.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob: Apply a line length to consistantly display image descriptions

[YOCTO #2310]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hob:add function about clicked a row to load image file for 'my images' page

[YOCTO #2238]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/crumbs/: replace custom HobNotebook

The custom HobNotebook widget was implemented to address perceived
deficiencies in the gtk.Notebook API.

Recent inspection reveals that the API is capable of all that Hob
requires of it and therefore maintaining a custom class to provide
similar functionality does not make sense.

Addresses [YOCTO #2276]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/crumbs/hobwidget: use light text in HobIndicator

Dark text on a dark background is difficult to read. Further the design
document uses white text.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/crumbs/imageconfiguration: fix combo boxes drop-down width

The width of the combo boxes drop down should match the combo box
itself.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/crumbs/[package|recipe]selectionpage: include button

The indication of the included packages/recipes in the top right of the
GUI, per design, is a button which switches the Notebook to the included
tab.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: update required pygtk to 2.22.0 and gtk+ to 2.20.0

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>