sources/skopeo: change local container format
Change the local storage format for containers to the `dir` format. The `dir` format will be used to retain signatures and manifests. The remove-signatures option is removed since the storage format now supports them. The final move (os.rename()) at the end of the fetch_one() method now creates the checksum directory if it doesn't exist and moves the child archive into it, adding to any existing archives that might exist in other formats (from a previous version downloading a `docker-archive`). Dropped the .tar suffix from the symlink in the skopeo stage since it's not necessary and the target of the link might be a directory now. The parent class exists() method checks if there is a *file* in the sources cache that matches the checksum. For containers, this used to be a file called container-image.tar under a directory that matches the checksum, so for containers it always returned False. Added an override for the skopeo source that checks for the new directory archive.
This commit is contained in:
parent
be76d6f355
commit
ce29a4af73
2 changed files with 23 additions and 14 deletions
|
|
@ -82,7 +82,7 @@ def main(inputs, output, options):
|
|||
# treats them special, like e.g. /some/path:tag, so we make a symlink to the real name
|
||||
# and pass the symlink name to skopeo to make it work with anything
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
linkname = os.path.join(tmpdir, "image.tar")
|
||||
linkname = os.path.join(tmpdir, "image")
|
||||
os.symlink(source, linkname)
|
||||
|
||||
if container_format == "dir":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue