summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-06-26 15:59:21 +0200
committerJürg Billeter <j@bitron.ch>2019-06-27 10:46:27 +0200
commit868ff50c721164a9c24e076e163bed02145c4624 (patch)
tree3cf24ec870b0d6a14a909c3c816415253c475935 /src
parentaf033797ccaaf27d6e30748416dbdd2284249006 (diff)
downloadbuildstream-868ff50c721164a9c24e076e163bed02145c4624.tar.gz
Fetch sources as needed for bst source checkout
This removes the --fetch option of bst source checkout, always enabling fetch support. This is in line with fetching subprojects as needed.
Diffstat (limited to 'src')
-rw-r--r--src/buildstream/_frontend/cli.py5
-rw-r--r--src/buildstream/_stream.py8
2 files changed, 3 insertions, 10 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 53adb188c..bbb9240f4 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -751,8 +751,6 @@ def source_track(app, elements, deps, except_, cross_junctions):
@click.option('--deps', '-d', default='none',
type=click.Choice(['build', 'none', 'run', 'all']),
help='The dependencies whose sources to checkout (default: none)')
-@click.option('--fetch', 'fetch_', default=False, is_flag=True,
- help='Fetch elements if they are not fetched')
@click.option('--tar', 'tar', default=False, is_flag=True,
help='Create a tarball from the element\'s sources instead of a '
'file tree.')
@@ -760,7 +758,7 @@ def source_track(app, elements, deps, except_, cross_junctions):
@click.argument('element', required=False, type=click.Path(readable=False))
@click.argument('location', type=click.Path(), required=False)
@click.pass_obj
-def source_checkout(app, element, location, force, deps, fetch_, except_,
+def source_checkout(app, element, location, force, deps, except_,
tar, build_scripts):
"""Checkout sources of an element to the specified location
@@ -786,7 +784,6 @@ def source_checkout(app, element, location, force, deps, fetch_, except_,
location=location,
force=force,
deps=deps,
- fetch=fetch_,
except_targets=except_,
tar=tar,
include_build_scripts=build_scripts)
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index a7db33bb9..195be55ba 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -631,14 +631,12 @@ class Stream():
# target (str): The target element whose sources to checkout
# location (str): Location to checkout the sources to
# deps (str): The dependencies to checkout
- # fetch (bool): Whether to fetch missing sources
# except_targets (list): List of targets to except from staging
#
def source_checkout(self, target, *,
location=None,
force=False,
deps='none',
- fetch=False,
except_targets=(),
tar=False,
include_build_scripts=False):
@@ -650,14 +648,13 @@ class Stream():
except_targets=except_targets)
# Assert all sources are cached in the source dir
- if fetch:
- self._fetch(elements, fetch_original=True)
+ self._fetch(elements)
self._pipeline.assert_sources_cached(elements)
# Stage all sources determined by scope
try:
self._source_checkout(elements, location, force, deps,
- fetch, tar, include_build_scripts)
+ tar, include_build_scripts)
except BstError as e:
raise StreamError("Error while writing sources"
": '{}'".format(e), detail=e.detail, reason=e.reason) from e
@@ -1340,7 +1337,6 @@ class Stream():
location=None,
force=False,
deps='none',
- fetch=False,
tar=False,
include_build_scripts=False):
location = os.path.abspath(location)