mirror of
https://github.com/containers/podman.git
synced 2025-12-07 06:11:07 +08:00
update c/common to latest main
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
9
vendor/github.com/containers/common/pkg/supplemented/supplemented.go
generated
vendored
9
vendor/github.com/containers/common/pkg/supplemented/supplemented.go
generated
vendored
@@ -14,6 +14,7 @@ import (
|
||||
multierror "github.com/hashicorp/go-multierror"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
// supplementedImageReference groups multiple references together.
|
||||
@@ -139,7 +140,7 @@ func (s *supplementedImageReference) NewImageSource(ctx context.Context, sys *ty
|
||||
}
|
||||
sources[manifestDigest] = src
|
||||
|
||||
// Parse the manifest as a list of images.
|
||||
// Parse the manifest as a list of images and artifacts.
|
||||
list, err := manifest.ListFromBlob(manifestBytes, manifestType)
|
||||
if err != nil {
|
||||
return fmt.Errorf("parsing manifest blob %q as a %q: %w", string(manifestBytes), manifestType, err)
|
||||
@@ -155,7 +156,11 @@ func (s *supplementedImageReference) NewImageSource(ctx context.Context, sys *ty
|
||||
}
|
||||
chaseInstances = []digest.Digest{instance}
|
||||
case cp.CopySpecificImages:
|
||||
chaseInstances = s.instances
|
||||
for _, instance := range list.Instances() {
|
||||
if slices.Contains(s.instances, instance) {
|
||||
chaseInstances = append(chaseInstances, instance)
|
||||
}
|
||||
}
|
||||
case cp.CopyAllImages:
|
||||
chaseInstances = list.Instances()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user