From 5ccb4c73f14afb03d18353605e171cfdf5c3dd31 Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Tue, 25 May 2021 07:27:32 -0700 Subject: [PATCH] Back to master version of fsutil Signed-off-by: Aaron Lehmann --- go.mod | 4 +--- go.sum | 5 ++--- vendor/github.com/tonistiigi/fsutil/copy/copy.go | 6 +++--- vendor/modules.txt | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index b9fe09912839c..e24251cbc4369 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 github.com/sirupsen/logrus v1.7.0 github.com/stretchr/testify v1.7.0 - github.com/tonistiigi/fsutil v0.0.0-20210503153615-5c8be85fc731 + github.com/tonistiigi/fsutil v0.0.0-20210525040343-5dfbf5db66b9 github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea github.com/uber/jaeger-client-go v2.25.0+incompatible github.com/uber/jaeger-lib v2.2.0+incompatible // indirect @@ -74,8 +74,6 @@ replace ( github.com/golang/protobuf => github.com/golang/protobuf v1.3.5 github.com/hashicorp/go-immutable-radix => github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305 - // temporary, until https://github.com/tonistiigi/fsutil/pull/103 is merged - github.com/tonistiigi/fsutil => github.com/aaronlehmann/fsutil v0.0.0-20210524204258-ace084b6f5d7 // genproto: corresponds to containerd google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 // grpc: corresponds to protobuf diff --git a/go.sum b/go.sum index 361c761945e74..964ee09607a19 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,6 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/aaronlehmann/fsutil v0.0.0-20210524204258-ace084b6f5d7 h1:8dVjjxH0rtFdRWsfgmKOs18lgLxbxbpYDe7i7PJMOyA= -github.com/aaronlehmann/fsutil v0.0.0-20210524204258-ace084b6f5d7/go.mod h1:4Bcxev2PKmz1bFF6Mg3opy8w4kYQVvEXQGKVkQkP2Ac= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -457,7 +455,6 @@ github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM= github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= -github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= @@ -631,6 +628,8 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tonistiigi/fsutil v0.0.0-20210525040343-5dfbf5db66b9 h1:GjVg+yagwinnd2DMzPwxXYueyllIzhcPb+PFT2pwDsQ= +github.com/tonistiigi/fsutil v0.0.0-20210525040343-5dfbf5db66b9/go.mod h1:4Bcxev2PKmz1bFF6Mg3opy8w4kYQVvEXQGKVkQkP2Ac= github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe h1:pd7hrFSqUPxYS9IB+UMG1AB/8EXGXo17ssx0bSQ5L6Y= github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe/go.mod h1:/+MCh11CJf2oz0BXmlmqyopK/ad1rKkcOXPoYuPCJYU= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= diff --git a/vendor/github.com/tonistiigi/fsutil/copy/copy.go b/vendor/github.com/tonistiigi/fsutil/copy/copy.go index b2ade4791b3cb..569b4ed88576b 100644 --- a/vendor/github.com/tonistiigi/fsutil/copy/copy.go +++ b/vendor/github.com/tonistiigi/fsutil/copy/copy.go @@ -321,7 +321,7 @@ func (c *copier) copy(ctx context.Context, src, srcComponents, target string, ov switch { case fi.IsDir(): - if created, err := c.copyDirectory(ctx, src, srcComponents, target, fi, overwriteTargetMetadata, skipIncludePatterns); err != nil { + if created, err := c.copyDirectory(ctx, src, srcComponents, target, fi, overwriteTargetMetadata, skipIncludePatterns, include); err != nil { return err } else if !overwriteTargetMetadata || !skipIncludePatterns { copyFileInfo = created @@ -426,7 +426,7 @@ func (c *copier) createParentDirs(src, srcComponents, target string, overwriteTa return nil } -func (c *copier) copyDirectory(ctx context.Context, src, srcComponents, dst string, stat os.FileInfo, overwriteTargetMetadata, skipIncludePatterns bool) (bool, error) { +func (c *copier) copyDirectory(ctx context.Context, src, srcComponents, dst string, stat os.FileInfo, overwriteTargetMetadata, skipIncludePatterns, matchedExactly bool) (bool, error) { if !stat.IsDir() { return false, errors.Errorf("source is not directory") } @@ -437,7 +437,7 @@ func (c *copier) copyDirectory(ctx context.Context, src, srcComponents, dst stri // pattern exactly, go ahead and create the directory. Otherwise, delay to // handle include patterns like a/*/c where we do not want to create a/b // until we encounter a/b/c. - if skipIncludePatterns { + if matchedExactly || skipIncludePatterns { var err error created, err = copyDirectoryOnly(src, dst, stat, overwriteTargetMetadata) if err != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index a17a82ba5ce32..726ae7eba4f66 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -351,7 +351,7 @@ github.com/sirupsen/logrus # github.com/stretchr/testify v1.7.0 github.com/stretchr/testify/assert github.com/stretchr/testify/require -# github.com/tonistiigi/fsutil v0.0.0-20210503153615-5c8be85fc731 => github.com/aaronlehmann/fsutil v0.0.0-20210524204258-ace084b6f5d7 +# github.com/tonistiigi/fsutil v0.0.0-20210525040343-5dfbf5db66b9 github.com/tonistiigi/fsutil github.com/tonistiigi/fsutil/copy github.com/tonistiigi/fsutil/prefix