diff options
author | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2019-01-28 11:36:16 +0000 |
---|---|---|
committer | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2019-01-28 11:36:16 +0000 |
commit | 564cb2450a8657762e16c1d26d1373987dc4a6c5 (patch) | |
tree | e3b1b67d57bb6e25b33bb19aa3492f6427fe66eb | |
parent | 222753ac50e00d14fd27c62f725c4ba4c514f3e5 (diff) | |
parent | bef802916fe764495ea5abbb220a46597ca79b22 (diff) | |
download | buildstream-564cb2450a8657762e16c1d26d1373987dc4a6c5.tar.gz |
Merge branch 'aevri/bst_track_guidance' into 'master'
Fixup refs to 'bst track' and 'bst fetch'
See merge request BuildStream/buildstream!1086
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | buildstream/_gitsourcebase.py | 2 | ||||
-rw-r--r-- | buildstream/_loader/loader.py | 4 | ||||
-rw-r--r-- | buildstream/_pipeline.py | 4 | ||||
-rw-r--r-- | buildstream/plugins/elements/junction.py | 6 | ||||
-rw-r--r-- | buildstream/plugins/sources/bzr.py | 2 | ||||
-rw-r--r-- | buildstream/plugins/sources/deb.py | 2 | ||||
-rw-r--r-- | buildstream/plugins/sources/git.py | 2 | ||||
-rw-r--r-- | buildstream/plugins/sources/remote.py | 2 | ||||
-rw-r--r-- | buildstream/plugins/sources/tar.py | 2 | ||||
-rw-r--r-- | buildstream/plugins/sources/zip.py | 2 | ||||
-rw-r--r-- | doc/source/format_project_refs.rst | 4 | ||||
-rw-r--r-- | tests/frontend/completions.py | 2 |
13 files changed, 18 insertions, 18 deletions
@@ -20,7 +20,7 @@ buildstream 1.3.1 an element's sources and generated build scripts you can do the command `bst source-checkout --include-build-scripts --tar foo.bst some-file.tar` - o BREAKING CHANGE: `bst track` and `bst fetch` commands are now osbolete. + o BREAKING CHANGE: `bst track` and `bst fetch` commands are now obsolete. Their functionality is provided by `bst source track` and `bst source fetch` respectively. diff --git a/buildstream/_gitsourcebase.py b/buildstream/_gitsourcebase.py index 1d33bd539..b986f7543 100644 --- a/buildstream/_gitsourcebase.py +++ b/buildstream/_gitsourcebase.py @@ -605,7 +605,7 @@ class _GitSourceBase(Source): detail = "The ref provided for the element does not exist locally " + \ "in the provided track branch / tag '{}'.\n".format(self.tracking) + \ "You may wish to track the element to update the ref from '{}' ".format(self.tracking) + \ - "with `bst track`,\n" + \ + "with `bst source track`,\n" + \ "or examine the upstream at '{}' for the specific ref.".format(self.mirror.url) self.warn("{}: expected ref '{}' was not found in given track '{}' for staged repository: '{}'\n" diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py index 16e880388..13761fb31 100644 --- a/buildstream/_loader/loader.py +++ b/buildstream/_loader/loader.py @@ -557,7 +557,7 @@ class Loader(): ticker(filename, 'Fetching subproject from {} source'.format(source.get_kind())) source._fetch(sources[0:idx]) else: - detail = "Try fetching the project with `bst fetch {}`".format(filename) + detail = "Try fetching the project with `bst source fetch {}`".format(filename) raise LoadError(LoadErrorReason.SUBPROJECT_FETCH_NEEDED, "Subproject fetch needed for junction: {}".format(filename), detail=detail) @@ -565,7 +565,7 @@ class Loader(): # Handle the case where a subproject has no ref # elif source.get_consistency() == Consistency.INCONSISTENT: - detail = "Try tracking the junction element with `bst track {}`".format(filename) + detail = "Try tracking the junction element with `bst source track {}`".format(filename) raise LoadError(LoadErrorReason.SUBPROJECT_INCONSISTENT, "Subproject has no ref for junction: {}".format(filename), detail=detail) diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index 3dc3019eb..7cf36f5a7 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -373,7 +373,7 @@ class Pipeline(): if source._get_consistency() == Consistency.INCONSISTENT: detail += " {} is missing ref\n".format(source) detail += '\n' - detail += "Try tracking these elements first with `bst track`\n" + detail += "Try tracking these elements first with `bst source track`\n" raise PipelineError("Inconsistent pipeline", detail=detail, reason="inconsistent-pipeline") @@ -406,7 +406,7 @@ class Pipeline(): if source._get_consistency() != Consistency.CACHED: detail += " {}\n".format(source) detail += '\n' - detail += "Try fetching these elements first with `bst fetch`,\n" + \ + detail += "Try fetching these elements first with `bst source fetch`,\n" + \ "or run this command with `--fetch` option\n" raise PipelineError("Uncached sources", detail=detail, reason="uncached-sources") diff --git a/buildstream/plugins/elements/junction.py b/buildstream/plugins/elements/junction.py index 7f9817359..2550e1f79 100644 --- a/buildstream/plugins/elements/junction.py +++ b/buildstream/plugins/elements/junction.py @@ -79,7 +79,7 @@ depend on a junction element itself. Therefore, if you require the most up-to-date version of a subproject, you must explicitly track the junction element by invoking: - `bst track JUNCTION_ELEMENT`. + `bst source track JUNCTION_ELEMENT`. Furthermore, elements within the subproject are also not tracked by default. For this, we must specify the `--track-cross-junctions` option. This option @@ -93,7 +93,7 @@ cached yet. However, they can be fetched explicitly: .. code:: - bst fetch junction.bst + bst source fetch junction.bst Other commands such as ``bst build`` implicitly fetch junction sources. @@ -146,7 +146,7 @@ class JunctionElement(Element): def get_unique_key(self): # Junctions do not produce artifacts. get_unique_key() implementation - # is still required for `bst fetch`. + # is still required for `bst source fetch`. return 1 def configure_sandbox(self, sandbox): diff --git a/buildstream/plugins/sources/bzr.py b/buildstream/plugins/sources/bzr.py index 5b993c043..de5dbdcc7 100644 --- a/buildstream/plugins/sources/bzr.py +++ b/buildstream/plugins/sources/bzr.py @@ -46,7 +46,7 @@ bzr - stage files from a bazaar repository # but revisions on a branch are of the form # <revision-branched-from>.<branch-number>.<revision-since-branching> # e.g. 6622.1.6. - # The ref must be specified to build, and 'bst track' will update the + # The ref must be specified to build, and 'bst source track' will update the # revision number to the one on the tip of the branch specified in 'track'. ref: 6622 diff --git a/buildstream/plugins/sources/deb.py b/buildstream/plugins/sources/deb.py index 1b7dafd31..e45994951 100644 --- a/buildstream/plugins/sources/deb.py +++ b/buildstream/plugins/sources/deb.py @@ -34,7 +34,7 @@ deb - stage files from .deb packages kind: deb # Specify the deb url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo.deb diff --git a/buildstream/plugins/sources/git.py b/buildstream/plugins/sources/git.py index 4160797d6..5e6834979 100644 --- a/buildstream/plugins/sources/git.py +++ b/buildstream/plugins/sources/git.py @@ -112,7 +112,7 @@ git - stage files from a git repository # o Enable `track-tags` feature # o Set the `track` parameter to the desired commit sha which # the current `ref` points to - # o Run `bst track` for these elements, this will result in + # o Run `bst source track` for these elements, this will result in # populating the `tags` portion of the refs without changing # the refs # o Restore the `track` parameter to the branches which you have diff --git a/buildstream/plugins/sources/remote.py b/buildstream/plugins/sources/remote.py index a6b02fd1c..562a8f226 100644 --- a/buildstream/plugins/sources/remote.py +++ b/buildstream/plugins/sources/remote.py @@ -37,7 +37,7 @@ remote - stage files from remote urls # executable: true # Specify the url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo diff --git a/buildstream/plugins/sources/tar.py b/buildstream/plugins/sources/tar.py index 195c05958..d4e30d9ba 100644 --- a/buildstream/plugins/sources/tar.py +++ b/buildstream/plugins/sources/tar.py @@ -33,7 +33,7 @@ tar - stage files from tar archives kind: tar # Specify the tar url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo.tar diff --git a/buildstream/plugins/sources/zip.py b/buildstream/plugins/sources/zip.py index f5fac3a48..03efcef79 100644 --- a/buildstream/plugins/sources/zip.py +++ b/buildstream/plugins/sources/zip.py @@ -29,7 +29,7 @@ zip - stage files from zip archives kind: zip # Specify the zip url. Using an alias defined in your project - # configuration is encouraged. 'bst track' will update the + # configuration is encouraged. 'bst source track' will update the # sha256sum in 'ref' to the downloaded file's sha256sum. url: upstream:foo.zip diff --git a/doc/source/format_project_refs.rst b/doc/source/format_project_refs.rst index 799b5e761..8dcb2448d 100644 --- a/doc/source/format_project_refs.rst +++ b/doc/source/format_project_refs.rst @@ -21,9 +21,9 @@ When a ``project.refs`` file is in use, any source references found in the :ref:`inline source declarations <format_sources>` are considered invalid and will be ignored, and a warning will be emitted for them. -When ``bst track`` is run for your project, the ``project.refs`` file +When ``bst source track`` is run for your project, the ``project.refs`` file will be updated instead of the inline source declarations. In the absence -of a ``project.refs`` file, ``bst track`` will create one automatically +of a ``project.refs`` file, ``bst source track`` will create one automatically with the tracking results. An interesting property of ``project.refs`` is that it allows for diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py index 8b549e3ba..007064f89 100644 --- a/tests/frontend/completions.py +++ b/tests/frontend/completions.py @@ -160,7 +160,7 @@ def test_options(cli, cmd, word_idx, expected): ('bst show --deps b', 3, ['build ']), ('bst show --deps=b', 2, ['build ']), ('bst show --deps r', 3, ['run ']), - ('bst track --deps ', 3, ['all ', 'none ']), + ('bst source track --deps ', 4, ['all ', 'none ']), ]) def test_option_choice(cli, cmd, word_idx, expected): assert_completion(cli, cmd, word_idx, expected) |