Relates to moby/moby#38758 / moby/moby#38404 (comment) / golang/go@a2a3dd0
Due to a change in Go 1.12, some file modes are no longer being returned as os. ModeDevice, but as os.ModeCharDevice. This caused pulling images to break on docker (moby/moby#38404 (comment)).
I'm not very familiar with this repository, but a quick search showed some similar uses in this package, so I suspect some of those will have to be updated accordingly.
|
case (fi.Mode() & os.ModeDevice) == os.ModeDevice: |
|
if err := copyDevice(target, fi); err != nil { |
|
return errors.Wrapf(err, "failed to create device") |
|
} |
|
case base.Mode()&os.ModeDevice != 0: |
|
return newDevice(*base, b.Path, b.Major, b.Minor) |
|
func newDevice(base resource, paths []string, major, minor uint64) (Device, error) { |
|
if base.Mode()&os.ModeDevice == 0 { |
|
return nil, fmt.Errorf("not a device") |
|
} |
|
} else if (fi.Mode() & os.ModeDevice) == 0 { |
|
return fmt.Errorf("%q should be a device, but is not", resource.Path()) |
|
if fi.Mode()&os.ModeDevice != 0 { |
|
if mode&os.ModeDevice != 0 { |
Relates to moby/moby#38758 / moby/moby#38404 (comment) / golang/go@a2a3dd0
Due to a change in Go 1.12, some file modes are no longer being returned as
os. ModeDevice, but asos.ModeCharDevice. This caused pulling images to break on docker (moby/moby#38404 (comment)).I'm not very familiar with this repository, but a quick search showed some similar uses in this package, so I suspect some of those will have to be updated accordingly.
continuity/fs/copy.go
Lines 137 to 140 in 004b464
continuity/resource.go
Lines 552 to 553 in c2ac4ec
continuity/resource.go
Lines 434 to 437 in c2ac4ec
continuity/context.go
Lines 501 to 502 in c2ac4ec
continuity/context.go
Line 192 in c2ac4ec
continuity/devices/devices_unix.go
Line 46 in c2ac4ec