Enabled images filtering by specifying build target 18/23018/5 accepted/tizen/common/20140715.085520 submit/tizen/20140714.092215
authorJF Ding <jian-feng.ding@intel.com>
Mon, 16 Jun 2014 08:09:41 +0000 (16:09 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Mon, 14 Jul 2014 09:08:12 +0000 (17:08 +0800)
commitd098dae40bc81d709297882395d8f0bd101e0b00
tree020da8adbbe378e7dbb915fc2ed361bc1e42ca08
parent4b01601cd2d404d4d72a2399909fb8de5f5bc8e9
Enabled images filtering by specifying build target

Current problem is the kickstart definitions have no target
identification information in meta-* packages, which cause the generated
images in product for each snapshot will be duplicated among the
different targets. To resolve it, we need three modifications together:

1. Added the definition of relationship with images and targets, in
   meta-* packages. Sample as below:

   /profile/ivi/meta-ivi:/ivi-targets.yaml ->
   """
        Targets:
            -   Name: atom
                Images:
                    - ivi-efi-i586.yaml
                    - ivi-mbr-i586.yaml
            -   Name: emulator
                Images:
                    - ivi-mbr-i586-emul.yaml
   """

2. In the building of image-configurations: add extra command line
   options for kickstarter command:

    kickstarter ... --targetdef .../%{_profile}-targets.yaml \
                    --target %{_repository}

3. This patch: to provide the new --targetdef and --target options.
  3.1 --targetdef to specify the YAML file of targets definition
  3.2 --target to specify the dedicated build target to filter images

The final result will be: nothing changed to Jenkins jobs and BOSS, and
the image-configuration*.rpm will not their name but will only contain
the build target corresponding ks files.

To keep the compatibility of all the changes, rule-1st is:

 The order of change integration to product server will NOT break
 current work as most as possible.

So the integration order can be: {1, 3} -> {2}, change-2 should be the
last step.

Change-Id: Ie4fb251c8e6442880cb3b5386bd0dd9f4bd3adbe
Signed-off-by: JF Ding <jian-feng.ding@intel.com>
kswriter/KSWriter.py
kswriter/__init__.py
tools/kickstarter