webos-repositories: Rename WEBOS_GIT_TAG to WEBOS_GIT_PARAM_TAG

:Release Notes:
Default WEBOS_GIT_PARAM_TAG value will later be set by
webos_enhanced_submissions and WEBOS_GIT_REPO_TAG will be used to
override default value.

:Detailed Notes:

:Testing Performed:
Only build tested.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Ib9aa7afb027206a2ba8b7271983f2d26cafe46b3
webos_enhanced_submissions, webos_submissions: Switch to use WEBOS_VERSION

:Release Notes:
Switch to "Decentralized BOM"

:Detailed Notes:
* findPreferredProvider shouldn't select provider based on PR
  because PR can be autoincremented
* nobody is using this syntax now
* it never worked correctly because of bug in bitbake code

* define WEBOS_GIT_PARAM_TAG in bbclass instead of recipes
  value can be:
  1) SRCREV when P_V contains underscore followed by revision
  2) submissions/${WEBOS_SUBMISSION}, when WEBOS_GIT_REPO_TAG
     isn't defined and SRCREV isn't in P_V
  3) ${WEBOS_GIT_TAG_CUSTOM} otherwise

* rename PREFERRED_VERSION to WEBOS_VERSION
  semantics of PREFERRED_VERSION is to select between multiple
  recipes with different versions not to define PV, rename it
  to WEBOS_VERSION to avoid confusion
  http://docs.openembedded.org/bitbake/html/ch04s04.html#id440478
  Example 4.7. Specifying version preference

* webos_submissions now only splits WEBOS_COMPONENT_VERSION and
  WEBOS_SUBMISSION from PV.
* webos_enhanced_submissions is splits WEBOS_VERSION to PV and
  SRCREV and defines WEBOS_GIT_PARAM_TAG.

:Testing Performed:
Builds the image from the same source even when tag is accidentally
moved to different revision.

:QA Notes:
No change in image

:Issues Addressed:
[GF-5328]  Improve build performance and allow to build completely from
           PREMIRROR
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I142f669deb4bbf6c53c0346b76bba4e43f19b2f6
webos_enhanced_submissions: Add sanity check for tags

:Release Notes:
When SRCREV as well as submission is set, compare if they correspond
to each other.

:Detailed Notes:
This check is executed only when do_fetch is executed, that means that
if someone moves the tag in remote repository, we won't notice it until
do_fetch is re-executed.

:Testing Performed:
I've set SRCREV to incorrect value and the warning was shown, I've
forced do_fetch to reexecute for recipe with WEBOS_GIT_TAG_CUSTOM and
recipe without SRCREV in WEBOS_VERSION, all worked fine.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-12496] Introduce sanity checks on WEBOS_VERSION

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I5bc4ad416ce62a700e06f483bac5b2277a5694eb
webkit-webos: Move PV to recipe

:Release Notes:
webos_submissions bbclass now parses PV directly instead of using
PREFERRED_VERSION_recipe-name

:Detailed Notes:

:Testing Performed:
Only build tested, the same versions are used in image.

:QA Notes:
No change in image.

:Build Notes:
This change needs to be applied together with new webos_submissions.

:Issues Addressed:
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Iaf511f95c795a197222783f236563122e23836a2
prepare-submission.sh: Add simple script for creating webos tags

:Release Notes:
Creating submission or version tags is a bit error prone, most common
issues are:
* tags are moved after they have been used in build
* tags aren't annotated, so we cannot find who created or moved tag
* tags don't match expected format or minimal submission (1),
  version (0.1.0)
* developers are tagging latest commit in their local tree (after they
  check that it was merged on gerrit), but even when it's the same
  commit it has different revision in master branch, because it was
  cherry-picked by gerrit.

:Detailed Notes:
This script checks for issues listed above, creates correct tags,
pushes tags and allows automatic update of WEBOS_VERSION in recipe
when -r parameter is used. It will also show how commit subject and
git log --oneline in ":Detailed Notes:" should look.

:Testing Performed:
Created couple of tags with every possible combination of used
parameters on normal clone as well as on bare clone, bare+mirror
clone cannot be used -> script detects that and shows error.

:QA Notes:
No change in image

:Issues Addressed:
[GF-5328]  Improve build performance and allow to build completely
           from PREMIRROR
[GF-12492] Convert PREFERRED_VERSION to WEBOS_VERSION and modify
           webos_enhanced_submissions.bbclass

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I9fe5d66c1e5cbb5e10628af6dd61d1b6c15d660d
webos-preferred-versions: Use WEBOS_VERSION in recipes

:Release Notes:
Switch to "Decentralized BOM".

:Detailed Notes:
* Global files are causing a lot of rebase/merge conflicts.
  *-preferred-version.inc file never worked correctly as BOM and BOM
  is now implemented from installed-packages.txt file which is more
  reliable and contains all parts use in image build.
* Moving it to recipe will also reduce the need to reparse everything,
  because when changing submission we won't modify global namespace
  so just one recipe will be reparsed
* This will also allow to have 2 recipes for the same component with
  different version (e.g. in different layers or with different do_install
  task) and let PREFERRED_VERSION select which one should be used based
  on DISTRO or MACHINE.

:Testing Performed:
Builds the same versions even when git tag is accidentaly moved to
different revision.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-5328]  Improve build performance and allow to build completely from
           PREMIRROR
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Ib2d55574686705a3bb4393ba88dfdb213f459389