buildframework/helium/doc/src/manual/blocks.rst
changeset 645 b8d81fa19e7d
equal deleted inserted replaced
643:27cf35f95864 645:b8d81fa19e7d
       
     1 ..  ============================================================================ 
       
     2     Name        : blocks.rst
       
     3     Part of     : Helium 
       
     4     
       
     5     Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     6     All rights reserved.
       
     7     This component and the accompanying materials are made available
       
     8     under the terms of the License "Eclipse Public License v1.0"
       
     9     which accompanies this distribution, and is available
       
    10     at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    11     
       
    12     Initial Contributors:
       
    13     Nokia Corporation - initial contribution.
       
    14     
       
    15     Contributors:
       
    16     
       
    17     Description:
       
    18     
       
    19     ============================================================================
       
    20 
       
    21 .. index::
       
    22   module: Blocks
       
    23 
       
    24 ======
       
    25 Blocks
       
    26 ======
       
    27 
       
    28 .. contents::
       
    29 
       
    30 .. _`Blocks-Intro-label`:
       
    31 
       
    32 Blocks Introduction
       
    33 ====================
       
    34 
       
    35 Blocks is a packaging framework, which allows you to create bundles 
       
    36 with interdependencies (like rpm or deb packages) base on the outcome of the build.
       
    37 
       
    38 
       
    39 Enabling Blocks input generation
       
    40 ================================
       
    41 
       
    42 The input generation consists in gathering data from build steps throughout the build to allow the generation
       
    43 of the future bundle. Not all the steps are supported, so the build engineer must keep in mind that custom
       
    44 exports or modification of the binaries after a controlled build step might lead to bundles with inconsistent content.
       
    45  
       
    46 In order to enable blocks input generation you simply need to define the **blocks.enabled** property to true. Intermediate 
       
    47 configuration file will be generated under **blocks.config.dir**.
       
    48 
       
    49 e.g::
       
    50    
       
    51    hlm -Dblocks.enabled=true....
       
    52 
       
    53 
       
    54 Currently supported steps are:
       
    55  * SBSv2 compilation
       
    56  * Configuration export using cMaker (only if cmaker-what is called)
       
    57  * ROM image creation
       
    58 
       
    59 
       
    60 Bundle generation
       
    61 =================
       
    62 
       
    63 Once the data have been gathered during the build, it is then possible to create bundles. To do so you need to call the 
       
    64 **blocks-create-bundles** target. Generated bundle will be created under **blocks.bundle.dir**.
       
    65 
       
    66 e.g::
       
    67    
       
    68    hlm -Dblocks.enabled=true .... blocks-create-bundles
       
    69    
       
    70 
       
    71 Blocks workspace management with Helium 
       
    72 =======================================
       
    73 
       
    74 Helium allows you to use any build environment as Blocks workspace. The :hlm-t:`blocks-create-workspace` will handle the
       
    75 automatic creation of workspace base on the current build.drive used. If the current build.drive represent an
       
    76 already existing workspace then it will reuse it. The :hlm-p:blocks.workspace.id property will contain the Blocks workspace
       
    77 id. Also when new workspace is created some repositories can be automatically added using the **blocks.repositories.id** reference
       
    78 to an hlm:blocksRepositorySet object.
       
    79 
       
    80 ::
       
    81    
       
    82    <hlm:blocksRepositorySet id="blocks.repositories.id">
       
    83        <repository name="test-repo" url="file:E:\my-repo" />
       
    84    </hlm:blocksRepositorySet>
       
    85    
       
    86 
       
    87 
       
    88 Installing bundles
       
    89 ==================
       
    90 The :hlm-t:`blocks-install-bundles` target will allow you to install packages under the workspace, to do so, you can configure
       
    91 the following references using patternset:
       
    92 
       
    93 ::
       
    94    
       
    95    <patternset id="blocks.bundle.filter.id">
       
    96        <include name="some.pkg.name.*" /> 
       
    97        <exclude name="some.other.pkg.name.*" /> 
       
    98    </patternset>
       
    99 
       
   100    <patternset id="blocks.group.filter.id">
       
   101        <include name="some.pkg.name.*" /> 
       
   102        <exclude name="some.other.pkg.name.*" /> 
       
   103    </patternset>
       
   104    
       
   105       
       
   106 The **blocks.bundle.filter.id** patternset will allow you to filter bundles based on their name. And **blocks.bundle.filter.id** patternset will allow you
       
   107 to install group selected group of bundles.
       
   108 
       
   109 Finally the workspace can be updated using the :hlm-t:`blocks-update-bundles` target.
       
   110