github.com/vanadium-archive/go.jiri@v0.0.0-20160715023856-abfb8b131290/profiles/profilescmdline/help.go (about)

     1  // Copyright 2015 The Vanadium Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package profilescmdline
     6  
     7  // HelpMsg returns a detailed help message for the profiles packages.
     8  func HelpMsg() string {
     9  	return `
    10  Profiles are used to manage external sofware dependencies and offer a balance
    11  between providing no support at all and a full blown package manager.
    12  Profiles can be built natively as well as being cross compiled.
    13  A profile is a named collection of software required for a given system component or
    14  application. Current example profiles include 'syncbase' which consists
    15  of the leveldb and snappy libraries or 'android' which consists of all of the
    16  android components and downloads needed to build android applications. Profiles
    17  are built for specific targets.
    18  
    19  Targets
    20  
    21  Profiles generally refer to uncompiled source code that needs to be compiled for
    22  a specific "target". Targets hence represent compiled code and consist of:
    23  
    24  1. An 'architecture' that refers to the CPU to be generate code for
    25  
    26  2. An 'operating system' that refers to the operating system to generate code for
    27  
    28  3. A lexicographically orderd set of supported versions, one of which is designated
    29  as the default.
    30  
    31  4. An 'environment' which is a set of environment variables to use when compiling the profile
    32  
    33  Targets thus provide the basic support needed for cross compilation.
    34  
    35  Targets are versioned and multiple versions may be installed and used simultaneously.
    36  Versions are ordered lexicographically and each target specifies a 'default'
    37  version to be used when a specific version is not explicitly requested. A request
    38  to 'upgrade' the profile will result in the installation of the default version
    39  of the targets currently installed if that default version is not already installed.
    40  
    41  
    42  The Supported Commands
    43  
    44  Profiles, or more correctly, targets for specific profiles may be installed or
    45  removed. When doing so, the name of the profile is required, but the other
    46  components of the target are optional and will default to the values of the
    47  system that the commands are run on (so-called native builds) and the default
    48  version for that target. Once a profile is installed it may be referred to by
    49  its tag for subsequent removals.
    50  
    51  The are also update and cleanup commands. Update installs the default version
    52  of the requested profile or for all profiles for the already installed targets.
    53  Cleanup will uninstall targets whose version is older than the default.
    54  
    55  Finally, there are commands to list the available and installed profiles and
    56  to access the environment variables specified and stored in each profile
    57  installation and a command (recreate) to generate a list of commands that
    58  can be run to recreate the currently installed profiles.
    59  
    60  The Profiles Database
    61  
    62  The profiles packages manages a database that tracks the installed profiles
    63  and their configurations. Other command line tools and packages are expected
    64  to read information about the currently installed profiles from this database
    65  via the profiles package. The profile command line tools support displaying the
    66  database (via the list command) or for specifying an alternate version of the
    67  file (via the -profiles-db flag) which is generally useful for debugging.
    68  
    69  Adding Profiles
    70  
    71  Profiles are intended to be provided as go packages that register themselves
    72  with the profile command line tools via the *v.io/jiri/profiles* package.
    73  They must implement the interfaces defined by that package and be imported
    74  (e.g. import _ "myprofile") by the command line tools that are to use them.
    75  `
    76  }