mirror of
https://github.com/containers/podman.git
synced 2025-12-03 03:39:44 +08:00
Update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
committed by
Paul Holzinger
parent
32d96f40c3
commit
444f19cb2a
13
vendor/github.com/containers/storage/drivers/driver.go
generated
vendored
13
vendor/github.com/containers/storage/drivers/driver.go
generated
vendored
@@ -111,6 +111,10 @@ type ProtoDriver interface {
|
||||
Exists(id string) bool
|
||||
// Returns a list of layer ids that exist on this driver (does not include
|
||||
// additional storage layers). Not supported by all backends.
|
||||
// If the driver requires that layers be removed in a particular order,
|
||||
// usually due to parent-child relationships that it cares about, The
|
||||
// list should be sorted well enough so that if all layers need to be
|
||||
// removed, they can be removed in the order in which they're returned.
|
||||
ListLayers() ([]string, error)
|
||||
// Status returns a set of key-value pairs which give low
|
||||
// level diagnostic status about this driver.
|
||||
@@ -322,6 +326,7 @@ func getBuiltinDriver(name, home string, options Options) (Driver, error) {
|
||||
type Options struct {
|
||||
Root string
|
||||
RunRoot string
|
||||
ImageStore string
|
||||
DriverPriority []string
|
||||
DriverOptions []string
|
||||
UIDMaps []idtools.IDMap
|
||||
@@ -337,12 +342,12 @@ func New(name string, config Options) (Driver, error) {
|
||||
}
|
||||
|
||||
// Guess for prior driver
|
||||
driversMap := scanPriorDrivers(config.Root)
|
||||
driversMap := ScanPriorDrivers(config.Root)
|
||||
|
||||
// use the supplied priority list unless it is empty
|
||||
prioList := config.DriverPriority
|
||||
if len(prioList) == 0 {
|
||||
prioList = priority
|
||||
prioList = Priority
|
||||
}
|
||||
|
||||
for _, name := range prioList {
|
||||
@@ -414,12 +419,12 @@ func isDriverNotSupported(err error) bool {
|
||||
}
|
||||
|
||||
// scanPriorDrivers returns an un-ordered scan of directories of prior storage drivers
|
||||
func scanPriorDrivers(root string) map[string]bool {
|
||||
func ScanPriorDrivers(root string) map[string]bool {
|
||||
driversMap := make(map[string]bool)
|
||||
|
||||
for driver := range drivers {
|
||||
p := filepath.Join(root, driver)
|
||||
if _, err := os.Stat(p); err == nil && driver != "vfs" {
|
||||
if _, err := os.Stat(p); err == nil {
|
||||
driversMap[driver] = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user