fetch2: Clean up srcrev_internal_helper

Currently INVALID and None are checked as incorrect values under different
circumstances. This code standardises those checks to be consistent. We
should phase out the use of "INVALID".

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2: Sanity check SRCREV matches rev/tag parameter

Add a sanity check so that if some SRCREV is set and a rev parameter is given
to the url, the revision given should match.

Any tag parameter behaves the same as rev. If both are specified, error to
tell the user we're confused rather than do something which may or may not
be what they intended.

Also add some unittests for this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2: Improve invalid SRCREV error message

The current message can be ambiguous, improve it (and also rename a
variable to clean up the rest of the function).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2/git: Anchor names when using ls-remote

When specifying tags, they're searched for unanchored so foo/bar could
match:

refs/heads/abc/foo/bar
refs/heads/xyz/foo/bar
refs/heads/foo/bar

This change anchors the expressions so they are based against heads
or tags (or any other base level tree that has been created).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2/git: Dereference unresolved tags with ls-remote

We need to deference tags when trying to map them to commit IDs with
ls-remote. If we don't do this, a given commit might not show up
later in a specific branch. There appears to be no good reason not
to do this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
world-image: add extra target

* similar to world target, but collects all PACKAGES
* recipes marked with EXCLUDE_FROM_WORLD are excluded from world as well
  as world-image
* recipes marked with EXCLUDE_FROM_WORLD_IMAGE are excluded completely
  from world-image, sometimes you can build 2 recipes in same sysroot,
  but cannot install them in the same image
* PACKAGES listed in EXCLUDE_PACKAGES_FROM_WORLD_IMAGE are also
  excluded. You can remove e.g. ${PN}-dbg, but keep all other PACKAGES.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
runqueue: Don't fail without match found

* WIP, because I haven't checked the reasons why this happens
  I'm using this now only to see which recipes/tasks are failing
  like this

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>