Revert "Add shared content label to namespaces"
This reverts commit e692a01926.
Signed-off-by: Cody Roseborough <cdr@amazon.com>
This commit is contained in:
@@ -55,28 +55,6 @@ func (s *imageStore) Get(ctx context.Context, name string) (images.Image, error)
|
||||
|
||||
if err := view(ctx, s.db, func(tx *bolt.Tx) error {
|
||||
bkt := getImagesBucket(tx, namespace)
|
||||
if bkt == nil || bkt.Bucket([]byte(name)) == nil {
|
||||
nsbkt := getNamespacesBucket(tx)
|
||||
cur := nsbkt.Cursor()
|
||||
for k, _ := cur.First(); k != nil; k, _ = cur.Next() {
|
||||
// If this namespace has the sharedlabel
|
||||
if hasSharedLabel(tx, string(k)) {
|
||||
// and has the image we are looking for
|
||||
bkt = getImagesBucket(tx, string(k))
|
||||
if bkt == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
ibkt := bkt.Bucket([]byte(name))
|
||||
if ibkt == nil {
|
||||
continue
|
||||
}
|
||||
// we are done
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if bkt == nil {
|
||||
return fmt.Errorf("image %q: %w", name, errdefs.ErrNotFound)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user