Skip to content

Commit 086e46b

Browse files
committed
update mock-hermetic-repo
1 parent fc3f220 commit 086e46b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mock/py/mock-hermetic-repo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ def prepare_image(image_specification, bootstrap_data, outputdir):
134134
# e.g. embedded docker reference for v1 images), so better safe than sorry
135135
pull_cmd = ["skopeo", "sync", "--src", "docker", "--dest", "dir",
136136
"--scoped", "--preserve-digests"]
137+
# skopeo (currently) can't live with tag + sha, so strip the tag
138+
image_specification = image_specification.split(':')[0]
137139
if "architecture" in bootstrap_data:
138140
pull_cmd += ["--override-arch", bootstrap_data["architecture"]]
139141
if "pull_digest" in bootstrap_data:

mock/py/mockbuild/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ def process_hermetic_build_config(cmdline_opts, config_opts):
807807

808808
# Use the offline image for bootstrapping.
809809
# skopeo (currently) can't live with tag + sha, so strip the tag
810-
image_pullspec = data['config']['bootstrap_image'].split(':')[:-1]
810+
image_pullspec = data['config']['bootstrap_image'].split(':')[0]
811811
image_pullspec += "@" + data['bootstrap']['pull_digest']
812812
bootstrap_dir = os.path.join(final_offline_repo, image_pullspec)
813813
config_opts["bootstrap_image"] = f"dir:{bootstrap_dir}"

0 commit comments

Comments
 (0)