Bump github.com/containers/storage from 1.30.0 to 1.30.1

Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.30.0 to 1.30.1.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.30.0...v1.30.1)

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2021-04-29 08:03:12 +00:00
committed by GitHub
parent db67fedcbd
commit 3645db9698
14 changed files with 300 additions and 27 deletions

View File

@@ -2115,6 +2115,37 @@ func (s *store) SetNames(id string, names []string) error {
return ristore.SetNames(id, deduped)
}
// Check is id refers to a RO Store
ristores, err := s.ROImageStores()
if err != nil {
return err
}
for _, s := range ristores {
store := s
store.RLock()
defer store.Unlock()
if modified, err := store.Modified(); modified || err != nil {
if err = store.Load(); err != nil {
return err
}
}
if i, err := store.Get(id); err == nil {
// Unlock R/O lock and lock with R/W lock
// Previous defer.Unlock() will free the new lock.
ristore.Unlock()
ristore.Lock()
if len(deduped) > 1 {
// Do not want to create image name in R/W storage
deduped = deduped[1:]
}
_, err := ristore.Create(id, deduped, i.TopLayer, i.Metadata, i.Created, i.Digest)
if err == nil {
return ristore.Save()
}
return err
}
}
rcstore, err := s.ContainerStore()
if err != nil {
return err