mirror of
https://github.com/containers/podman.git
synced 2025-12-02 19:28:58 +08:00
Add support for image name history
We leverage the containers/storage image history tracking feature to show the previously used image names when running: `podman images --history` Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
16
vendor/github.com/containers/storage/drivers/copy/copy_linux.go
generated
vendored
16
vendor/github.com/containers/storage/drivers/copy/copy_linux.go
generated
vendored
@@ -16,6 +16,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
@@ -97,7 +98,7 @@ func legacyCopy(srcFile io.Reader, dstFile io.Writer) error {
|
||||
|
||||
func copyXattr(srcPath, dstPath, attr string) error {
|
||||
data, err := system.Lgetxattr(srcPath, attr)
|
||||
if err != nil {
|
||||
if err != nil && err != unix.EOPNOTSUPP {
|
||||
return err
|
||||
}
|
||||
if data != nil {
|
||||
@@ -271,6 +272,19 @@ func doCopyXattrs(srcPath, dstPath string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
xattrs, err := system.Llistxattr(srcPath)
|
||||
if err != nil && err != unix.EOPNOTSUPP {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, key := range xattrs {
|
||||
if strings.HasPrefix(key, "user.") {
|
||||
if err := copyXattr(srcPath, dstPath, key); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We need to copy this attribute if it appears in an overlay upper layer, as
|
||||
// this function is used to copy those. It is set by overlay if a directory
|
||||
// is removed and then re-created and should not inherit anything from the
|
||||
|
||||
Reference in New Issue
Block a user