mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
vendor buildah@main
Note that the bud-logfile-with-split-logfile-by-platform test is skipped on the remote client (see #14544). Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
10
vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
generated
vendored
10
vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
generated
vendored
@@ -7,7 +7,6 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/containers/buildah/define"
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
"github.com/opencontainers/runc/libcontainer/devices"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -18,9 +17,6 @@ func DeviceFromPath(device string) (define.ContainerDevices, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if unshare.IsRootless() && src != dst {
|
||||
return nil, errors.Errorf("Renaming device %s to %s is not supported in rootless containers", src, dst)
|
||||
}
|
||||
srcInfo, err := os.Stat(src)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error getting info of source device %s", src)
|
||||
@@ -32,7 +28,8 @@ func DeviceFromPath(device string) (define.ContainerDevices, error) {
|
||||
return nil, errors.Wrapf(err, "%s is not a valid device", src)
|
||||
}
|
||||
dev.Path = dst
|
||||
devs = append(devs, *dev)
|
||||
device := define.BuildahDevice{Device: *dev, Source: src, Destination: dst}
|
||||
devs = append(devs, device)
|
||||
return devs, nil
|
||||
}
|
||||
|
||||
@@ -44,7 +41,8 @@ func DeviceFromPath(device string) (define.ContainerDevices, error) {
|
||||
for _, d := range srcDevices {
|
||||
d.Path = filepath.Join(dst, filepath.Base(d.Path))
|
||||
d.Permissions = devices.Permissions(permissions)
|
||||
devs = append(devs, *d)
|
||||
device := define.BuildahDevice{Device: *d, Source: src, Destination: dst}
|
||||
devs = append(devs, device)
|
||||
}
|
||||
return devs, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user