mirror of
https://github.com/containers/podman.git
synced 2025-06-17 06:57:43 +08:00
Use imageParts.referenceWithRegistry in getPullRefPair
CHANGES BEHAVIOR. This bypasses .assemble, and preserves the original lack of tag / original digest instead of adding :latest/:none (still subject to ParseStoreReference normalization). Using the original digest seems clearly correct; dropping the :latest suffix from .image strings only affects user-visible input; later uses of the return value of pullImageFrom... use ParseStoreReference, which calls reference.TagNameOnly, so the image name should be processed the same way whether it contains a tag or not. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@ -76,9 +76,11 @@ func (ir *Runtime) getPullRefPair(srcRef types.ImageReference, destName string)
|
||||
decomposedDest, err := decompose(destName)
|
||||
if err == nil && !decomposedDest.hasRegistry {
|
||||
// If the image doesn't have a registry, set it as the default repo
|
||||
decomposedDest.registry = DefaultLocalRegistry
|
||||
decomposedDest.hasRegistry = true
|
||||
destName = decomposedDest.assemble()
|
||||
ref, err := decomposedDest.referenceWithRegistry(DefaultLocalRegistry)
|
||||
if err != nil {
|
||||
return pullRefPair{}, err
|
||||
}
|
||||
destName = ref.String()
|
||||
}
|
||||
|
||||
reference := destName
|
||||
|
Reference in New Issue
Block a user