mirror of
https://github.com/containers/podman.git
synced 2025-06-28 06:18:57 +08:00
Add a *types.SystemContext parameter to getCopyOptions and DRO.GetSystemContext
All callers of getCopyOptions also call GetSystemContext with the same three parameters; we will want to simplify this by passing the first SystemContext to getCopyOptions, which can then inherit this data instead of so many parameters everywhere. For now, just add a *types.SystemContext parameter without using it. Should not change behavior (but does not add unit tests). Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
This commit is contained in:

committed by
Atomic Bot

parent
2d5410d349
commit
1054b8d2c5
@ -551,7 +551,7 @@ func (i *Image) PushImageToReference(ctx context.Context, dest types.ImageRefere
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
copyOptions := getCopyOptions(writer, signaturePolicyPath, nil, dockerRegistryOptions, signingOptions, authFile, manifestMIMEType, forceCompress, additionalDockerArchiveTags)
|
||||
copyOptions := getCopyOptions(sc, writer, signaturePolicyPath, nil, dockerRegistryOptions, signingOptions, authFile, manifestMIMEType, forceCompress, additionalDockerArchiveTags)
|
||||
if dest.Transport().Name() == DockerTransport {
|
||||
imgRef := dest.DockerReference()
|
||||
if imgRef == nil { // This should never happen; such references can’t be created.
|
||||
@ -906,7 +906,7 @@ func (ir *Runtime) Import(ctx context.Context, path, reference string, writer io
|
||||
return nil, err
|
||||
}
|
||||
defer policyContext.Destroy()
|
||||
copyOptions := getCopyOptions(writer, "", nil, nil, signingOptions, "", "", false, nil)
|
||||
copyOptions := getCopyOptions(sc, writer, "", nil, nil, signingOptions, "", "", false, nil)
|
||||
dest, err := is.Transport.ParseStoreReference(ir.store, reference)
|
||||
if err != nil {
|
||||
errors.Wrapf(err, "error getting image reference for %q", reference)
|
||||
|
Reference in New Issue
Block a user