[Notes] [Git][BuildStream/buildstream][tpollard/774] 3 commits: man/: update with changes since Apr 2018



Title: GitLab

Jürg Billeter pushed to branch tpollard/774 at BuildStream / buildstream

Commits:

23 changed files:

Changes:

  • buildstream/_frontend/cli.py
    ... ... @@ -469,6 +469,10 @@ def push(app, elements, deps, remote):
    469 469
         The default destination is the highest priority configured cache. You can
    
    470 470
         override this by passing a different cache URL with the `--remote` flag.
    
    471 471
     
    
    472
    +    If bst has been configured to include build trees on artifact pulls,
    
    473
    +    an attempt will be made to pull any required build trees to avoid the
    
    474
    +    skipping of partial artifacts being pushed.
    
    475
    +
    
    472 476
         Specify `--deps` to control which artifacts to push:
    
    473 477
     
    
    474 478
         \b
    

  • buildstream/_stream.py
    ... ... @@ -327,6 +327,10 @@ class Stream():
    327 327
         # If `remote` specified as None, then regular configuration will be used
    
    328 328
         # to determine where to push artifacts to.
    
    329 329
         #
    
    330
    +    # If any of the given targets are missing their expected buildtree artifact,
    
    331
    +    # a pull queue will be created if user context and available remotes allow for
    
    332
    +    # attempting to fetch them.
    
    333
    +    #
    
    330 334
         def push(self, targets, *,
    
    331 335
                  selection=PipelineSelection.NONE,
    
    332 336
                  remote=None):
    
    ... ... @@ -345,8 +349,17 @@ class Stream():
    345 349
                 raise StreamError("No artifact caches available for pushing artifacts")
    
    346 350
     
    
    347 351
             self._pipeline.assert_consistent(elements)
    
    348
    -        self._add_queue(PushQueue(self._scheduler))
    
    349
    -        self._enqueue_plan(elements)
    
    352
    +
    
    353
    +        # Check if we require a pull queue, with given artifact state and context
    
    354
    +        require_buildtrees = self._buildtree_pull_required(elements)
    
    355
    +        if require_buildtrees:
    
    356
    +            self._message(MessageType.INFO, "Attempting to fetch missing artifact buildtrees")
    
    357
    +            self._add_queue(PullQueue(self._scheduler))
    
    358
    +            self._enqueue_plan(require_buildtrees)
    
    359
    +
    
    360
    +        push_queue = PushQueue(self._scheduler)
    
    361
    +        self._add_queue(push_queue)
    
    362
    +        self._enqueue_plan(elements, queue=push_queue)
    
    350 363
             self._run()
    
    351 364
     
    
    352 365
         # checkout()
    
    ... ... @@ -1237,3 +1250,28 @@ class Stream():
    1237 1250
                 parts.append(element.normal_name)
    
    1238 1251
     
    
    1239 1252
             return os.path.join(directory, *reversed(parts))
    
    1253
    +
    
    1254
    +    # _buildtree_pull_required()
    
    1255
    +    #
    
    1256
    +    # Check if current task, given config, requires element buildtree artifact
    
    1257
    +    #
    
    1258
    +    # Args:
    
    1259
    +    #    elements (list): elements to check if buildtrees are required
    
    1260
    +    #
    
    1261
    +    # Returns:
    
    1262
    +    #    (list): elements requiring buildtrees
    
    1263
    +    #
    
    1264
    +    def _buildtree_pull_required(self, elements):
    
    1265
    +        required_list = []
    
    1266
    +
    
    1267
    +        # If context is set to not pull buildtrees, or no fetch remotes, return empty list
    
    1268
    +        if not (self._context.pull_buildtrees or self._artifacts.has_fetch_remotes()):
    
    1269
    +            return required_list
    
    1270
    +
    
    1271
    +        for element in elements:
    
    1272
    +            # Check if element is partially cached without its buildtree, as the element
    
    1273
    +            # artifact may not be cached at all
    
    1274
    +            if element._cached() and not element._cached_buildtree():
    
    1275
    +                required_list.append(element)
    
    1276
    +
    
    1277
    +        return required_list

  • buildstream/element.py
    ... ... @@ -1422,7 +1422,7 @@ class Element(Plugin):
    1422 1422
                                                      .format(workspace.get_absolute_path())):
    
    1423 1423
                                 workspace.stage(temp_staging_directory)
    
    1424 1424
                     # Check if we have a cached buildtree to use
    
    1425
    -                elif self.__cached_buildtree():
    
    1425
    +                elif self._cached_buildtree():
    
    1426 1426
                         artifact_base, _ = self.__extract()
    
    1427 1427
                         import_dir = os.path.join(artifact_base, 'buildtree')
    
    1428 1428
                     else:
    
    ... ... @@ -1808,7 +1808,7 @@ class Element(Plugin):
    1808 1808
     
    
    1809 1809
             # Do not push elements that aren't cached, or that are cached with a dangling buildtree
    
    1810 1810
             # artifact unless element type is expected to have an an empty buildtree directory
    
    1811
    -        if not self.__cached_buildtree():
    
    1811
    +        if not self._cached_buildtree():
    
    1812 1812
                 return True
    
    1813 1813
     
    
    1814 1814
             # Do not push tainted artifact
    
    ... ... @@ -1998,6 +1998,29 @@ class Element(Plugin):
    1998 1998
         def _get_source_element(self):
    
    1999 1999
             return self
    
    2000 2000
     
    
    2001
    +    # _cached_buildtree()
    
    2002
    +    #
    
    2003
    +    # Check if element artifact contains expected buildtree. An
    
    2004
    +    # element's buildtree artifact will not be present if the rest
    
    2005
    +    # of the partial artifact is not cached.
    
    2006
    +    #
    
    2007
    +    # Returns:
    
    2008
    +    #     (bool): True if artifact cached with buildtree, False if
    
    2009
    +    #             element not cached or missing expected buildtree.
    
    2010
    +    #
    
    2011
    +    def _cached_buildtree(self):
    
    2012
    +        context = self._get_context()
    
    2013
    +
    
    2014
    +        if not self._cached():
    
    2015
    +            return False
    
    2016
    +
    
    2017
    +        key_strength = _KeyStrength.STRONG if context.get_strict() else _KeyStrength.WEAK
    
    2018
    +        if not self.__artifacts.contains_subdir_artifact(self, self._get_cache_key(strength=key_strength),
    
    2019
    +                                                         'buildtree'):
    
    2020
    +            return False
    
    2021
    +
    
    2022
    +        return True
    
    2023
    +
    
    2001 2024
         #############################################################
    
    2002 2025
         #                   Private Local Methods                   #
    
    2003 2026
         #############################################################
    
    ... ... @@ -2764,27 +2787,6 @@ class Element(Plugin):
    2764 2787
     
    
    2765 2788
             return True
    
    2766 2789
     
    
    2767
    -    # __cached_buildtree():
    
    2768
    -    #
    
    2769
    -    # Check if cached element artifact contains expected buildtree
    
    2770
    -    #
    
    2771
    -    # Returns:
    
    2772
    -    #     (bool): True if artifact cached with buildtree, False if
    
    2773
    -    #             element not cached or missing expected buildtree
    
    2774
    -    #
    
    2775
    -    def __cached_buildtree(self):
    
    2776
    -        context = self._get_context()
    
    2777
    -
    
    2778
    -        if not self._cached():
    
    2779
    -            return False
    
    2780
    -        elif context.get_strict():
    
    2781
    -            if not self.__artifacts.contains_subdir_artifact(self, self.__strict_cache_key, 'buildtree'):
    
    2782
    -                return False
    
    2783
    -        elif not self.__artifacts.contains_subdir_artifact(self, self.__weak_cache_key, 'buildtree'):
    
    2784
    -            return False
    
    2785
    -
    
    2786
    -        return True
    
    2787
    -
    
    2788 2790
         # __pull_directories():
    
    2789 2791
         #
    
    2790 2792
         # Which directories to include or exclude given the current
    

  • man/bst-artifact-server.1
    1
    +.TH "BST-ARTIFACT-SERVER" "1" "29-Nov-2018" "" "bst-artifact-server Manual"
    
    2
    +.SH NAME
    
    3
    +bst-artifact-server \- CAS Artifact Server
    
    4
    +.SH SYNOPSIS
    
    5
    +.B bst-artifact-server
    
    6
    +[OPTIONS] REPO
    
    7
    +.SH OPTIONS
    
    8
    +.TP
    
    9
    +\fB\-p,\fP \-\-port INTEGER
    
    10
    +Port number  [required]
    
    11
    +.TP
    
    12
    +\fB\-\-server\-key\fP TEXT
    
    13
    +Private server key for TLS (PEM-encoded)
    
    14
    +.TP
    
    15
    +\fB\-\-server\-cert\fP TEXT
    
    16
    +Public server certificate for TLS (PEM-encoded)
    
    17
    +.TP
    
    18
    +\fB\-\-client\-certs\fP TEXT
    
    19
    +Public client certificates for TLS (PEM-encoded)
    
    20
    +.TP
    
    21
    +\fB\-\-enable\-push\fP
    
    22
    +Allow clients to upload blobs and update artifact cache
    \ No newline at end of file

  • man/bst-build.1
    1
    -.TH "BST BUILD" "1" "26-Apr-2018" "" "bst build Manual"
    
    1
    +.TH "BST BUILD" "1" "29-Nov-2018" "" "bst build Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-build \- Build elements in a pipeline
    
    4 4
     .SH SYNOPSIS
    

  • man/bst-checkout.1
    1
    -.TH "BST CHECKOUT" "1" "26-Apr-2018" "" "bst checkout Manual"
    
    1
    +.TH "BST CHECKOUT" "1" "29-Nov-2018" "" "bst checkout Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-checkout \- Checkout a built artifact
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -12,7 +12,7 @@ Checkout a built artifact to the specified location
    12 12
     \fB\-f,\fP \-\-force
    
    13 13
     Allow files to be overwritten
    
    14 14
     .TP
    
    15
    -\fB\-f,\fP \-\-deps
    
    15
    +\fB\-d,\fP \-\-deps [run|none]
    
    16 16
     The dependencies to checkout (default: run)
    
    17 17
     .TP
    
    18 18
     \fB\-\-integrate\fP / \-\-no\-integrate
    
    ... ... @@ -22,5 +22,4 @@ Whether to run integration commands
    22 22
     Checkout hardlinks instead of copies (handle with care)
    
    23 23
     .TP
    
    24 24
     \fB\-\-tar\fP
    
    25
    -Create a tarball from the artifact contents instead of a file tree. If
    
    26
    -LOCATION is '-', the tarball will be dumped to the standard output.
    25
    +Create a tarball from the artifact contents instead of a file tree. If LOCATION is '-', the tarball will be dumped to the standard output.
    \ No newline at end of file

  • man/bst-fetch.1
    1
    -.TH "BST FETCH" "1" "26-Apr-2018" "" "bst fetch Manual"
    
    1
    +.TH "BST FETCH" "1" "29-Nov-2018" "" "bst fetch Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-fetch \- Fetch sources in a pipeline
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -6,14 +6,14 @@ bst\-fetch \- Fetch sources in a pipeline
    6 6
     [OPTIONS] [ELEMENTS]...
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Fetch sources required to build the pipeline
    
    9
    -
    
    9
    +.PP
    
    10 10
     By default this will only try to fetch sources which are
    
    11 11
     required for the build plan of the specified target element,
    
    12 12
     omitting sources for any elements which are already built
    
    13 13
     and available in the artifact cache.
    
    14
    -
    
    14
    +.PP
    
    15 15
     Specify `--deps` to control which sources to fetch:
    
    16
    -
    
    16
    +.PP
    
    17 17
     
    
    18 18
         none:  No dependencies, just the element itself
    
    19 19
         plan:  Only dependencies required for the build plan
    

  • man/bst-help.1
    1
    +.TH "BST HELP" "1" "29-Nov-2018" "" "bst help Manual"
    
    2
    +.SH NAME
    
    3
    +bst\-help \- Print usage information
    
    4
    +.SH SYNOPSIS
    
    5
    +.B bst help
    
    6
    +[OPTIONS] COMMAND
    
    7
    +.SH DESCRIPTION
    
    8
    +Print usage information about a given command
    
    9
    +    
    \ No newline at end of file

  • man/bst-init.1
    1
    -.TH "BST INIT" "1" "26-Apr-2018" "" "bst init Manual"
    
    1
    +.TH "BST INIT" "1" "29-Nov-2018" "" "bst init Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-init \- Initialize a new BuildStream project
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -6,10 +6,10 @@ bst\-init \- Initialize a new BuildStream project
    6 6
     [OPTIONS]
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Initialize a new BuildStream project
    
    9
    -
    
    9
    +.PP
    
    10 10
     Creates a new BuildStream project.conf in the project
    
    11 11
     directory.
    
    12
    -
    
    12
    +.PP
    
    13 13
     Unless `--project-name` is specified, this will be an
    
    14 14
     interactive session.
    
    15 15
     .SH OPTIONS
    
    ... ... @@ -18,7 +18,7 @@ interactive session.
    18 18
     The project name to use
    
    19 19
     .TP
    
    20 20
     \fB\-\-format\-version\fP INTEGER
    
    21
    -The required format version (default: 8)
    
    21
    +The required format version (default: 18)
    
    22 22
     .TP
    
    23 23
     \fB\-\-element\-path\fP PATH
    
    24 24
     The subdirectory to store elements in (default: elements)
    

  • man/bst-pull.1
    1
    -.TH "BST PULL" "1" "26-Apr-2018" "" "bst pull Manual"
    
    1
    +.TH "BST PULL" "1" "29-Nov-2018" "" "bst pull Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-pull \- Pull a built artifact
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -6,13 +6,13 @@ bst\-pull \- Pull a built artifact
    6 6
     [OPTIONS] [ELEMENTS]...
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Pull a built artifact from the configured remote artifact cache.
    
    9
    -
    
    9
    +.PP
    
    10 10
     By default the artifact will be pulled one of the configured caches
    
    11 11
     if possible, following the usual priority order. If the `--remote` flag
    
    12 12
     is given, only the specified cache will be queried.
    
    13
    -
    
    13
    +.PP
    
    14 14
     Specify `--deps` to control which artifacts to pull:
    
    15
    -
    
    15
    +.PP
    
    16 16
     
    
    17 17
         none:  No dependencies, just the element itself
    
    18 18
         all:   All dependencies
    

  • man/bst-push.1
    1
    -.TH "BST PUSH" "1" "26-Apr-2018" "" "bst push Manual"
    
    1
    +.TH "BST PUSH" "1" "29-Nov-2018" "" "bst push Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-push \- Push a built artifact
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -6,12 +6,12 @@ bst\-push \- Push a built artifact
    6 6
     [OPTIONS] [ELEMENTS]...
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Push a built artifact to a remote artifact cache.
    
    9
    -
    
    9
    +.PP
    
    10 10
     The default destination is the highest priority configured cache. You can
    
    11 11
     override this by passing a different cache URL with the `--remote` flag.
    
    12
    -
    
    12
    +.PP
    
    13 13
     Specify `--deps` to control which artifacts to push:
    
    14
    -
    
    14
    +.PP
    
    15 15
     
    
    16 16
         none:  No dependencies, just the element itself
    
    17 17
         all:   All dependencies
    

  • man/bst-shell.1
    1
    -.TH "BST SHELL" "1" "26-Apr-2018" "" "bst shell Manual"
    
    1
    +.TH "BST SHELL" "1" "29-Nov-2018" "" "bst shell Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-shell \- Shell into an element's sandbox environment
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -6,18 +6,18 @@ bst\-shell \- Shell into an element's sandbox environment
    6 6
     [OPTIONS] ELEMENT [COMMAND]...
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Run a command in the target element's sandbox environment
    
    9
    -
    
    9
    +.PP
    
    10 10
     This will stage a temporary sysroot for running the target
    
    11 11
     element, assuming it has already been built and all required
    
    12 12
     artifacts are in the local cache.
    
    13
    -
    
    13
    +.PP
    
    14 14
     Use the --build option to create a temporary sysroot for
    
    15 15
     building the element instead.
    
    16
    -
    
    16
    +.PP
    
    17 17
     Use the --sysroot option with an existing failed build
    
    18 18
     directory or with a checkout of the given target, in order
    
    19 19
     to use a specific sysroot.
    
    20
    -
    
    20
    +.PP
    
    21 21
     If no COMMAND is specified, the default is to attempt
    
    22 22
     to run an interactive shell.
    
    23 23
     .SH OPTIONS
    

  • man/bst-show.1
    1
    -.TH "BST SHOW" "1" "26-Apr-2018" "" "bst show Manual"
    
    1
    +.TH "BST SHOW" "1" "29-Nov-2018" "" "bst show Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-show \- Show elements in the pipeline
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -6,25 +6,25 @@ bst\-show \- Show elements in the pipeline
    6 6
     [OPTIONS] [ELEMENTS]...
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Show elements in the pipeline
    
    9
    -
    
    9
    +.PP
    
    10 10
     By default this will show all of the dependencies of the
    
    11 11
     specified target element.
    
    12
    -
    
    12
    +.PP
    
    13 13
     Specify `--deps` to control which elements to show:
    
    14
    -
    
    14
    +.PP
    
    15 15
     
    
    16 16
         none:  No dependencies, just the element itself
    
    17 17
         plan:  Dependencies required for a build plan
    
    18 18
         run:   Runtime dependencies, including the element itself
    
    19 19
         build: Build time dependencies, excluding the element itself
    
    20 20
         all:   All dependencies
    
    21
    -
    
    21
    +.PP
    
    22 22
     
    
    23 23
     FORMAT
    
    24 24
     ~~~~~~
    
    25 25
     The --format option controls what should be printed for each element,
    
    26 26
     the following symbols can be used in the format string:
    
    27
    -
    
    27
    +.PP
    
    28 28
     
    
    29 29
         %{name}           The element name
    
    30 30
         %{key}            The abbreviated cache key (if all sources are consistent)
    
    ... ... @@ -36,17 +36,17 @@ the following symbols can be used in the format string:
    36 36
         %{public}         Public domain data
    
    37 37
         %{workspaced}     If the element is workspaced
    
    38 38
         %{workspace-dirs} A list of workspace directories
    
    39
    -
    
    39
    +.PP
    
    40 40
     The value of the %{symbol} without the leading '%' character is understood
    
    41 41
     as a pythonic formatting string, so python formatting features apply,
    
    42 42
     examle:
    
    43
    -
    
    43
    +.PP
    
    44 44
     
    
    45 45
         bst show target.bst --format \
    
    46 46
             'Name: %{name: ^20} Key: %{key: ^8} State: %{state}'
    
    47
    -
    
    47
    +.PP
    
    48 48
     If you want to use a newline in a format string in bash, use the '$' modifier:
    
    49
    -
    
    49
    +.PP
    
    50 50
     
    
    51 51
         bst show target.bst --format \
    
    52 52
             $'---------- %{name} ----------\n%{vars}'
    
    ... ... @@ -62,7 +62,4 @@ The dependencies to show (default: all)
    62 62
     Staging or alphabetic ordering of dependencies
    
    63 63
     .TP
    
    64 64
     \fB\-f,\fP \-\-format FORMAT
    
    65
    -Format string for each element
    
    66
    -.TP
    
    67
    -\fB\-\-downloadable\fP
    
    68
    -Refresh downloadable state
    \ No newline at end of file
    65
    +Format string for each element
    \ No newline at end of file

  • man/bst-source-bundle.1
    1
    -.TH "BST SOURCE-BUNDLE" "1" "26-Apr-2018" "" "bst source-bundle Manual"
    
    1
    +.TH "BST SOURCE-BUNDLE" "1" "29-Nov-2018" "" "bst source-bundle Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-source-bundle \- Produce a build bundle to be manually executed
    
    4 4
     .SH SYNOPSIS
    
    5 5
     .B bst source-bundle
    
    6
    -[OPTIONS] TARGET
    
    6
    +[OPTIONS] ELEMENT
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Produce a source bundle to be manually executed
    
    9 9
         
    
    ... ... @@ -16,10 +16,10 @@ Elements to except from the tarball
    16 16
     Compress the tar file using the given algorithm.
    
    17 17
     .TP
    
    18 18
     \fB\-\-track\fP
    
    19
    -Track new source references before building
    
    19
    +Track new source references before bundling
    
    20 20
     .TP
    
    21 21
     \fB\-f,\fP \-\-force
    
    22
    -Overwrite files existing in checkout directory
    
    22
    +Overwrite an existing tarball
    
    23 23
     .TP
    
    24 24
     \fB\-\-directory\fP TEXT
    
    25 25
     The directory to write the tarball to
    \ No newline at end of file

  • man/bst-source-checkout.1
    1
    +.TH "BST SOURCE-CHECKOUT" "1" "29-Nov-2018" "" "bst source-checkout Manual"
    
    2
    +.SH NAME
    
    3
    +bst\-source-checkout \- Checkout sources for an element
    
    4
    +.SH SYNOPSIS
    
    5
    +.B bst source-checkout
    
    6
    +[OPTIONS] ELEMENT LOCATION
    
    7
    +.SH DESCRIPTION
    
    8
    +Checkout sources of an element to the specified location
    
    9
    +    
    
    10
    +.SH OPTIONS
    
    11
    +.TP
    
    12
    +\fB\-\-except\fP PATH
    
    13
    +Except certain dependencies
    
    14
    +.TP
    
    15
    +\fB\-d,\fP \-\-deps [build|none|run|all]
    
    16
    +The dependencies whose sources to checkout (default: none)
    
    17
    +.TP
    
    18
    +\fB\-\-fetch\fP
    
    19
    +Fetch elements if they are not fetched
    \ No newline at end of file

  • man/bst-track.1
    1
    -.TH "BST TRACK" "1" "26-Apr-2018" "" "bst track Manual"
    
    1
    +.TH "BST TRACK" "1" "29-Nov-2018" "" "bst track Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-track \- Track new source references
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -7,12 +7,12 @@ bst\-track \- Track new source references
    7 7
     .SH DESCRIPTION
    
    8 8
     Consults the specified tracking branches for new versions available
    
    9 9
     to build and updates the project with any newly available references.
    
    10
    -
    
    10
    +.PP
    
    11 11
     By default this will track just the specified element, but you can also
    
    12 12
     update a whole tree of dependencies in one go.
    
    13
    -
    
    13
    +.PP
    
    14 14
     Specify `--deps` to control which sources to track:
    
    15
    -
    
    15
    +.PP
    
    16 16
     
    
    17 17
         none:  No dependencies, just the specified elements
    
    18 18
         all:   All dependencies of all specified elements
    

  • man/bst-workspace-close.1
    1
    -.TH "BST WORKSPACE CLOSE" "1" "26-Apr-2018" "" "bst workspace close Manual"
    
    1
    +.TH "BST WORKSPACE CLOSE" "1" "29-Nov-2018" "" "bst workspace close Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-workspace\-close \- Close workspaces
    
    4 4
     .SH SYNOPSIS
    

  • man/bst-workspace-list.1
    1
    -.TH "BST WORKSPACE LIST" "1" "26-Apr-2018" "" "bst workspace list Manual"
    
    1
    +.TH "BST WORKSPACE LIST" "1" "29-Nov-2018" "" "bst workspace list Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-workspace\-list \- List open workspaces
    
    4 4
     .SH SYNOPSIS
    
    5 5
     .B bst workspace list
    
    6 6
     [OPTIONS]
    
    7 7
     .SH DESCRIPTION
    
    8
    -List open workspaces
    \ No newline at end of file
    8
    +List open workspaces

  • man/bst-workspace-open.1
    1
    -.TH "BST WORKSPACE OPEN" "1" "26-Apr-2018" "" "bst workspace open Manual"
    
    1
    +.TH "BST WORKSPACE OPEN" "1" "29-Nov-2018" "" "bst workspace open Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-workspace\-open \- Open a new workspace
    
    4 4
     .SH SYNOPSIS
    
    5 5
     .B bst workspace open
    
    6
    -[OPTIONS] ELEMENT DIRECTORY
    
    6
    +[OPTIONS] ELEMENTS...
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Open a workspace for manual source modification
    
    9 9
     .SH OPTIONS
    
    ... ... @@ -12,7 +12,10 @@ Open a workspace for manual source modification
    12 12
     Do not checkout the source, only link to the given directory
    
    13 13
     .TP
    
    14 14
     \fB\-f,\fP \-\-force
    
    15
    -Overwrite files existing in checkout directory
    
    15
    +The workspace will be created even if the directory in which it will be created is not empty or if a workspace for that element already exists
    
    16 16
     .TP
    
    17 17
     \fB\-\-track\fP
    
    18
    -Track and fetch new source references before checking out the workspace
    \ No newline at end of file
    18
    +Track and fetch new source references before checking out the workspace
    
    19
    +.TP
    
    20
    +\fB\-\-directory\fP DIRECTORY
    
    21
    +Only for use when a single Element is given: Set the directory to use to create the workspace
    \ No newline at end of file

  • man/bst-workspace-reset.1
    1
    -.TH "BST WORKSPACE RESET" "1" "26-Apr-2018" "" "bst workspace reset Manual"
    
    1
    +.TH "BST WORKSPACE RESET" "1" "29-Nov-2018" "" "bst workspace reset Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-workspace\-reset \- Reset a workspace to its original state
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -8,6 +8,9 @@ bst\-workspace\-reset \- Reset a workspace to its original state
    8 8
     Reset a workspace to its original state
    
    9 9
     .SH OPTIONS
    
    10 10
     .TP
    
    11
    +\fB\-\-soft\fP
    
    12
    +Reset workspace state without affecting its contents
    
    13
    +.TP
    
    11 14
     \fB\-\-track\fP
    
    12 15
     Track and fetch the latest source before resetting
    
    13 16
     .TP
    

  • man/bst-workspace.1
    1
    -.TH "BST WORKSPACE" "1" "26-Apr-2018" "" "bst workspace Manual"
    
    1
    +.TH "BST WORKSPACE" "1" "29-Nov-2018" "" "bst workspace Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst\-workspace \- Manipulate developer workspaces
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -11,18 +11,15 @@ Manipulate developer workspaces
    11 11
     \fBopen\fP
    
    12 12
       Open a new workspace
    
    13 13
       See \fBbst workspace-open(1)\fP for full documentation on the \fBopen\fP command.
    
    14
    -
    
    15
    -.PP
    
    16
    -\fBlist\fP
    
    17
    -  List open workspaces
    
    18
    -  See \fBbst workspace-list(1)\fP for full documentation on the \fBlist\fP command.
    
    19
    -
    
    20 14
     .PP
    
    21 15
     \fBclose\fP
    
    22 16
       Close workspaces
    
    23 17
       See \fBbst workspace-close(1)\fP for full documentation on the \fBclose\fP command.
    
    24
    -
    
    25 18
     .PP
    
    26 19
     \fBreset\fP
    
    27 20
       Reset a workspace to its original state
    
    28 21
       See \fBbst workspace-reset(1)\fP for full documentation on the \fBreset\fP command.
    
    22
    +.PP
    
    23
    +\fBlist\fP
    
    24
    +  List open workspaces
    
    25
    +  See \fBbst workspace-list(1)\fP for full documentation on the \fBlist\fP command.
    \ No newline at end of file

  • man/bst.1
    1
    -.TH "BST" "1" "26-Apr-2018" "" "bst Manual"
    
    1
    +.TH "BST" "1" "29-Nov-2018" "" "bst Manual"
    
    2 2
     .SH NAME
    
    3 3
     bst \- Build and manipulate BuildStream projects...
    
    4 4
     .SH SYNOPSIS
    
    ... ... @@ -6,15 +6,15 @@ bst \- Build and manipulate BuildStream projects...
    6 6
     [OPTIONS] COMMAND [ARGS]...
    
    7 7
     .SH DESCRIPTION
    
    8 8
     Build and manipulate BuildStream projects
    
    9
    -
    
    9
    +.PP
    
    10 10
     Most of the main options override options in the
    
    11 11
     user preferences configuration file.
    
    12 12
     .SH OPTIONS
    
    13 13
     .TP
    
    14 14
     \fB\-\-version\fP
    
    15
    -
    
    15
    +.PP
    
    16 16
     .TP
    
    17
    -\fB\-c,\fP \-\-config PATH
    
    17
    +\fB\-c,\fP \-\-config FILE
    
    18 18
     Configuration file to use
    
    19 19
     .TP
    
    20 20
     \fB\-C,\fP \-\-directory DIRECTORY
    
    ... ... @@ -61,58 +61,62 @@ Elements must be rebuilt when their dependencies have changed
    61 61
     .TP
    
    62 62
     \fB\-o,\fP \-\-option OPTION VALUE
    
    63 63
     Specify a project option
    
    64
    +.TP
    
    65
    +\fB\-\-default\-mirror\fP TEXT
    
    66
    +The mirror to fetch from first, before attempting other mirrors
    
    67
    +.TP
    
    68
    +\fB\-\-pull\-buildtrees\fP
    
    69
    +Include an element's build tree when pulling remote element artifacts
    
    64 70
     .SH COMMANDS
    
    65 71
     .PP
    
    66
    -\fBcheckout\fP
    
    67
    -  Checkout a built artifact
    
    68
    -  See \fBbst-checkout(1)\fP for full documentation on the \fBcheckout\fP command.
    
    69
    -
    
    70
    -.PP
    
    71
    -\fBfetch\fP
    
    72
    -  Fetch sources in a pipeline
    
    73
    -  See \fBbst-fetch(1)\fP for full documentation on the \fBfetch\fP command.
    
    74
    -
    
    75
    -.PP
    
    76
    -\fBsource-bundle\fP
    
    77
    -  Produce a build bundle to be manually executed
    
    78
    -  See \fBbst-source-bundle(1)\fP for full documentation on the \fBsource-bundle\fP command.
    
    79
    -
    
    80
    -.PP
    
    81
    -\fBshow\fP
    
    82
    -  Show elements in the pipeline
    
    83
    -  See \fBbst-show(1)\fP for full documentation on the \fBshow\fP command.
    
    84
    -
    
    85
    -.PP
    
    86
    -\fBworkspace\fP
    
    87
    -  Manipulate developer workspaces
    
    88
    -  See \fBbst-workspace(1)\fP for full documentation on the \fBworkspace\fP command.
    
    89
    -
    
    90
    -.PP
    
    91
    -\fBtrack\fP
    
    92
    -  Track new source references
    
    93
    -  See \fBbst-track(1)\fP for full documentation on the \fBtrack\fP command.
    
    94
    -
    
    72
    +\fBhelp\fP
    
    73
    +  Print usage information
    
    74
    +  See \fBbst-help(1)\fP for full documentation on the \fBhelp\fP command.
    
    95 75
     .PP
    
    96 76
     \fBinit\fP
    
    97 77
       Initialize a new BuildStream project
    
    98 78
       See \fBbst-init(1)\fP for full documentation on the \fBinit\fP command.
    
    99
    -
    
    100
    -.PP
    
    101
    -\fBshell\fP
    
    102
    -  Shell into an element's sandbox environment
    
    103
    -  See \fBbst-shell(1)\fP for full documentation on the \fBshell\fP command.
    
    104
    -
    
    105 79
     .PP
    
    106 80
     \fBbuild\fP
    
    107 81
       Build elements in a pipeline
    
    108 82
       See \fBbst-build(1)\fP for full documentation on the \fBbuild\fP command.
    
    109
    -
    
    83
    +.PP
    
    84
    +\fBfetch\fP
    
    85
    +  Fetch sources in a pipeline
    
    86
    +  See \fBbst-fetch(1)\fP for full documentation on the \fBfetch\fP command.
    
    87
    +.PP
    
    88
    +\fBtrack\fP
    
    89
    +  Track new source references
    
    90
    +  See \fBbst-track(1)\fP for full documentation on the \fBtrack\fP command.
    
    110 91
     .PP
    
    111 92
     \fBpull\fP
    
    112 93
       Pull a built artifact
    
    113 94
       See \fBbst-pull(1)\fP for full documentation on the \fBpull\fP command.
    
    114
    -
    
    115 95
     .PP
    
    116 96
     \fBpush\fP
    
    117 97
       Push a built artifact
    
    118 98
       See \fBbst-push(1)\fP for full documentation on the \fBpush\fP command.
    
    99
    +.PP
    
    100
    +\fBshow\fP
    
    101
    +  Show elements in the pipeline
    
    102
    +  See \fBbst-show(1)\fP for full documentation on the \fBshow\fP command.
    
    103
    +.PP
    
    104
    +\fBshell\fP
    
    105
    +  Shell into an element's sandbox environment
    
    106
    +  See \fBbst-shell(1)\fP for full documentation on the \fBshell\fP command.
    
    107
    +.PP
    
    108
    +\fBcheckout\fP
    
    109
    +  Checkout a built artifact
    
    110
    +  See \fBbst-checkout(1)\fP for full documentation on the \fBcheckout\fP command.
    
    111
    +.PP
    
    112
    +\fBsource-checkout\fP
    
    113
    +  Checkout sources for an element
    
    114
    +  See \fBbst-source-checkout(1)\fP for full documentation on the \fBsource-checkout\fP command.
    
    115
    +.PP
    
    116
    +\fBworkspace\fP
    
    117
    +  Manipulate developer workspaces
    
    118
    +  See \fBbst-workspace(1)\fP for full documentation on the \fBworkspace\fP command.
    
    119
    +.PP
    
    120
    +\fBsource-bundle\fP
    
    121
    +  Produce a build bundle to be manually executed
    
    122
    +  See \fBbst-source-bundle(1)\fP for full documentation on the \fBsource-bundle\fP command.
    \ No newline at end of file

  • tests/integration/pullbuildtrees.py
    ... ... @@ -38,7 +38,8 @@ def test_pullbuildtrees(cli, tmpdir, datafiles, integration_cache):
    38 38
     
    
    39 39
         # Create artifact shares for pull & push testing
    
    40 40
         with create_artifact_share(os.path.join(str(tmpdir), 'share1')) as share1,\
    
    41
    -        create_artifact_share(os.path.join(str(tmpdir), 'share2')) as share2:
    
    41
    +        create_artifact_share(os.path.join(str(tmpdir), 'share2')) as share2,\
    
    42
    +        create_artifact_share(os.path.join(str(tmpdir), 'share3')) as share3:
    
    42 43
             cli.configure({
    
    43 44
                 'artifacts': {'url': share1.repo, 'push': True},
    
    44 45
                 'artifactdir': os.path.join(str(tmpdir), 'artifacts')
    
    ... ... @@ -123,6 +124,32 @@ def test_pullbuildtrees(cli, tmpdir, datafiles, integration_cache):
    123 124
             assert share2.has_artifact('test', element_name, cli.get_element_key(project, element_name))
    
    124 125
             default_state(cli, tmpdir, share1)
    
    125 126
     
    
    127
    +        # Assert that bst push will automatically attempt to pull a missing buildtree
    
    128
    +        # if pull-buildtrees is set, however as share3 is the only defined remote and is empty,
    
    129
    +        # assert that no element artifact buildtrees are pulled (no available remote buildtree) and thus the
    
    130
    +        # artifact cannot be pushed.
    
    131
    +        result = cli.run(project=project, args=['pull', element_name])
    
    132
    +        assert element_name in result.get_pulled_elements()
    
    133
    +        cli.configure({'artifacts': {'url': share3.repo, 'push': True}})
    
    134
    +        result = cli.run(project=project, args=['--pull-buildtrees', 'push', element_name])
    
    135
    +        assert "Attempting to fetch missing artifact buildtrees" in result.stderr
    
    136
    +        assert element_name not in result.get_pulled_elements()
    
    137
    +        assert not os.path.isdir(buildtreedir)
    
    138
    +        assert element_name not in result.get_pushed_elements()
    
    139
    +        assert not share3.has_artifact('test', element_name, cli.get_element_key(project, element_name))
    
    140
    +
    
    141
    +        # Assert that if we add an extra remote that has the buildtree artfact cached, bst push will
    
    142
    +        # automatically attempt to pull it and will be successful, leading to the full artifact being pushed
    
    143
    +        # to the empty share3. This gives the ability to attempt push currently partial artifacts to a remote,
    
    144
    +        # without exlipictly requiring a bst pull.
    
    145
    +        cli.configure({'artifacts': [{'url': share1.repo, 'push': False}, {'url': share3.repo, 'push': True}]})
    
    146
    +        result = cli.run(project=project, args=['--pull-buildtrees', 'push', element_name])
    
    147
    +        assert "Attempting to fetch missing artifact buildtrees" in result.stderr
    
    148
    +        assert element_name in result.get_pulled_elements()
    
    149
    +        assert os.path.isdir(buildtreedir)
    
    150
    +        assert element_name in result.get_pushed_elements()
    
    151
    +        assert share3.has_artifact('test', element_name, cli.get_element_key(project, element_name))
    
    152
    +
    
    126 153
     
    
    127 154
     # Ensure that only valid pull-buildtrees boolean options make it through the loading
    
    128 155
     # process.
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]