Revert "Add shared content label to namespaces"

This reverts commit e692a01926.

Signed-off-by: Cody Roseborough <cdr@amazon.com>
This commit is contained in:
Cody Roseborough
2022-01-12 10:56:48 -08:00
parent 6e211a774f
commit 8dd36423b6
6 changed files with 1 additions and 253 deletions

View File

@@ -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)
}