mirror of
https://github.com/containers/skopeo.git
synced 2025-09-07 01:30:16 +00:00
Vendor in latest containers storage
We want to get support into skopeo for handling override_kernel_checks so that we can use overlay backend on RHEL. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
8
vendor/github.com/containers/storage/containers.go
generated
vendored
8
vendor/github.com/containers/storage/containers.go
generated
vendored
@@ -2,7 +2,6 @@ package storage
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -13,11 +12,6 @@ import (
|
||||
"github.com/containers/storage/pkg/truncindex"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrContainerUnknown indicates that there was no container with the specified name or ID
|
||||
ErrContainerUnknown = errors.New("container not known")
|
||||
)
|
||||
|
||||
// A Container is a reference to a read-write layer with metadata.
|
||||
type Container struct {
|
||||
// ID is either one which was specified at create-time, or a random
|
||||
@@ -245,6 +239,7 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat
|
||||
if _, idInUse := r.byid[id]; idInUse {
|
||||
return nil, ErrDuplicateID
|
||||
}
|
||||
names = dedupeNames(names)
|
||||
for _, name := range names {
|
||||
if _, nameInUse := r.byname[name]; nameInUse {
|
||||
return nil, ErrDuplicateName
|
||||
@@ -294,6 +289,7 @@ func (r *containerStore) removeName(container *Container, name string) {
|
||||
}
|
||||
|
||||
func (r *containerStore) SetNames(id string, names []string) error {
|
||||
names = dedupeNames(names)
|
||||
if container, ok := r.lookup(id); ok {
|
||||
for _, name := range container.Names {
|
||||
delete(r.byname, name)
|
||||
|
Reference in New Issue
Block a user