stages/ostree.aleph: don't manipulate image name from origin
It appears to work with the `docker://` prefix as well as the `registry:` prefix. ``` $ ostree container image list --repo=/ostree/repo docker://quay.io/fedora/fedora-coreos:rawhide $ $ ostree container image metadata --repo=/ostree/repo docker://quay.io/fedora/fedora-coreos:rawhide | md5sum aaf7fa84896358730f0a69c330db31a6 - $ ostree container image metadata --repo=/ostree/repo registry:quay.io/fedora/fedora-coreos:rawhide | md5sum aaf7fa84896358730f0a69c330db31a6 - ``` Let's just keep the name unmodified. This also fixes it so that `registry:` doesn't get prepended to refs that aren't from a registry like: ``` $ cat /ostree/deploy/rhcos/deploy/3824ff6c279d0f4ef043e80f448eeb0d24269d50e452224a5614f915ee73fb7e.0.origin [origin] container-image-reference=ostree-unverified-image:oci-archive:/rhcos-416.92.202401191512-0-ostree.x86_64.ociarchive $ ostree container image metadata --repo=/ostree/repo oci-archive:/rhcos-416.92.202401191512-0-ostree.x86_64.ociarchive | wc -c 16292 ```
This commit is contained in:
parent
f5d6d11f1d
commit
d9363d4561
1 changed files with 1 additions and 3 deletions
|
|
@ -78,11 +78,9 @@ def aleph_container(tree, imgref):
|
|||
raise ValueError(f"Image ref {imgref} has unsupported type (supported: 'ostree-remote-registry', \
|
||||
'ostree-remote-image', 'ostree-image-signed', or 'ostree-unverified-registry')")
|
||||
|
||||
img_name = img_name.removeprefix('docker://')
|
||||
|
||||
extra_args = []
|
||||
extra_args.append(f"--repo={tree}/ostree/repo")
|
||||
extra_args.append(f"registry:{img_name}")
|
||||
extra_args.append(img_name)
|
||||
|
||||
container_data_json = ostree.cli("container", "image", "metadata", *extra_args).stdout.rstrip()
|
||||
container_data = json.loads(container_data_json)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue