Skip to content
Snippets Groups Projects
Commit 8457fb49 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

fix: spackdir not needed for stage "build-base-image"

Change-Id: I8fb1fe396c83c50eabd57cf09012c63adc6923ba
parent 9c44e5f1
No related branches found
No related tags found
No related merge requests found
...@@ -134,9 +134,6 @@ args = parser.parse_args() ...@@ -134,9 +134,6 @@ args = parser.parse_args()
root_dir = pathlib.Path(__file__).parent.parent root_dir = pathlib.Path(__file__).parent.parent
# check provided paths # check provided paths
if not args.spack_dir.is_dir():
raise NotADirectoryError("spack_dir is required to be a path to an "
"existing directory.")
if (args.meta_dir is not None) and (not args.meta_dir.is_dir()): if (args.meta_dir is not None) and (not args.meta_dir.is_dir()):
raise NotADirectoryError("meta-dir is required to be a path to an " raise NotADirectoryError("meta-dir is required to be a path to an "
"existing directory.") "existing directory.")
...@@ -191,14 +188,19 @@ env.update({ ...@@ -191,14 +188,19 @@ env.update({
"YASHCHIKI_JOBS": str(args.jobs), "YASHCHIKI_JOBS": str(args.jobs),
}) })
needs_spackdir = False
if "fetch" in args.stages: if "fetch" in args.stages:
env.update({"YASHCHIKI_ENABLE_STAGE_FETCH": "1"}) env.update({"YASHCHIKI_ENABLE_STAGE_FETCH": "1"})
needs_spackdir = True
if "build-base" in args.stages: if "build-base" in args.stages:
env.update({"YASHCHIKI_ENABLE_STAGE_BUILD_BASE": "1"}) env.update({"YASHCHIKI_ENABLE_STAGE_BUILD_BASE": "1"})
needs_spackdir = True
if "build-spack" in args.stages: if "build-spack" in args.stages:
env.update({"YASHCHIKI_ENABLE_STAGE_BUILD_SPACK": "1"}) env.update({"YASHCHIKI_ENABLE_STAGE_BUILD_SPACK": "1"})
needs_spackdir = True
if "image" in args.stages: if "image" in args.stages:
env.update({"YASHCHIKI_ENABLE_STAGE_IMAGE": "1"}) env.update({"YASHCHIKI_ENABLE_STAGE_IMAGE": "1"})
...@@ -207,6 +209,11 @@ if args.stages != all_stages: ...@@ -207,6 +209,11 @@ if args.stages != all_stages:
if not pathlib.Path(args.sandboxes_dir, args.style).exists(): if not pathlib.Path(args.sandboxes_dir, args.style).exists():
raise RuntimeError("Using yashchiki with incomplete set of stages is only possible for using an existing sandbox.") raise RuntimeError("Using yashchiki with incomplete set of stages is only possible for using an existing sandbox.")
if needs_spackdir:
if not args.spack_dir.is_dir():
raise NotADirectoryError("spack_dir is required to be a path to an "
"existing directory.")
if args.build_cache_on_failure_name: if args.build_cache_on_failure_name:
env.update({"YASHCHIKI_BUILD_CACHE_ON_FAILURE_NAME": args.build_cache_on_failure_name}) env.update({"YASHCHIKI_BUILD_CACHE_ON_FAILURE_NAME": args.build_cache_on_failure_name})
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment