mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-16 16:37:10 +08:00
vendor: update buildkit to master@ae9d0f5
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
2
vendor/github.com/tonistiigi/fsutil/Dockerfile
generated
vendored
2
vendor/github.com/tonistiigi/fsutil/Dockerfile
generated
vendored
@ -1,4 +1,4 @@
|
||||
#syntax=docker/dockerfile:1.4
|
||||
#syntax=docker/dockerfile:1
|
||||
ARG GO_VERSION=1.18
|
||||
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.1.0 AS xx
|
||||
|
3
vendor/github.com/tonistiigi/fsutil/followlinks.go
generated
vendored
3
vendor/github.com/tonistiigi/fsutil/followlinks.go
generated
vendored
@ -1,7 +1,6 @@
|
||||
package fsutil
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@ -75,7 +74,7 @@ func (r *symlinkResolver) readSymlink(p string, allowWildcard bool) ([]string, e
|
||||
realPath := filepath.Join(r.root, p)
|
||||
base := filepath.Base(p)
|
||||
if allowWildcard && containsWildcards(base) {
|
||||
fis, err := ioutil.ReadDir(filepath.Dir(realPath))
|
||||
fis, err := os.ReadDir(filepath.Dir(realPath))
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
return nil, nil
|
||||
|
3
vendor/github.com/tonistiigi/fsutil/fs.go
generated
vendored
3
vendor/github.com/tonistiigi/fsutil/fs.go
generated
vendored
@ -3,7 +3,6 @@ package fsutil
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
@ -103,7 +102,7 @@ func (fs *subDirFS) Walk(ctx context.Context, fn filepath.WalkFunc) error {
|
||||
func (fs *subDirFS) Open(p string) (io.ReadCloser, error) {
|
||||
parts := strings.SplitN(filepath.Clean(p), string(filepath.Separator), 2)
|
||||
if len(parts) == 0 {
|
||||
return ioutil.NopCloser(&emptyReader{}), nil
|
||||
return io.NopCloser(&emptyReader{}), nil
|
||||
}
|
||||
d, ok := fs.m[parts[0]]
|
||||
if !ok {
|
||||
|
24
vendor/github.com/tonistiigi/fsutil/walker.go
generated
vendored
24
vendor/github.com/tonistiigi/fsutil/walker.go
generated
vendored
@ -8,7 +8,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/pkg/fileutils"
|
||||
"github.com/moby/patternmatcher"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/tonistiigi/fsutil/types"
|
||||
)
|
||||
@ -57,8 +57,8 @@ func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) err
|
||||
|
||||
var (
|
||||
includePatterns []string
|
||||
includeMatcher *fileutils.PatternMatcher
|
||||
excludeMatcher *fileutils.PatternMatcher
|
||||
includeMatcher *patternmatcher.PatternMatcher
|
||||
excludeMatcher *patternmatcher.PatternMatcher
|
||||
)
|
||||
|
||||
if opt != nil && opt.IncludePatterns != nil {
|
||||
@ -83,7 +83,7 @@ func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) err
|
||||
|
||||
onlyPrefixIncludes := true
|
||||
if len(includePatterns) != 0 {
|
||||
includeMatcher, err = fileutils.NewPatternMatcher(includePatterns)
|
||||
includeMatcher, err = patternmatcher.New(includePatterns)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "invalid includepatterns: %s", opt.IncludePatterns)
|
||||
}
|
||||
@ -99,7 +99,7 @@ func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) err
|
||||
|
||||
onlyPrefixExcludeExceptions := true
|
||||
if opt != nil && opt.ExcludePatterns != nil {
|
||||
excludeMatcher, err = fileutils.NewPatternMatcher(opt.ExcludePatterns)
|
||||
excludeMatcher, err = patternmatcher.New(opt.ExcludePatterns)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "invalid excludepatterns: %s", opt.ExcludePatterns)
|
||||
}
|
||||
@ -117,8 +117,8 @@ func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) err
|
||||
path string
|
||||
origpath string
|
||||
pathWithSep string
|
||||
includeMatchInfo fileutils.MatchInfo
|
||||
excludeMatchInfo fileutils.MatchInfo
|
||||
includeMatchInfo patternmatcher.MatchInfo
|
||||
excludeMatchInfo patternmatcher.MatchInfo
|
||||
calledFn bool
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) err
|
||||
skip := false
|
||||
|
||||
if includeMatcher != nil {
|
||||
var parentIncludeMatchInfo fileutils.MatchInfo
|
||||
var parentIncludeMatchInfo patternmatcher.MatchInfo
|
||||
if len(parentDirs) != 0 {
|
||||
parentIncludeMatchInfo = parentDirs[len(parentDirs)-1].includeMatchInfo
|
||||
}
|
||||
@ -208,7 +208,7 @@ func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) err
|
||||
}
|
||||
|
||||
if excludeMatcher != nil {
|
||||
var parentExcludeMatchInfo fileutils.MatchInfo
|
||||
var parentExcludeMatchInfo patternmatcher.MatchInfo
|
||||
if len(parentDirs) != 0 {
|
||||
parentExcludeMatchInfo = parentDirs[len(parentDirs)-1].excludeMatchInfo
|
||||
}
|
||||
@ -319,11 +319,11 @@ func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) err
|
||||
})
|
||||
}
|
||||
|
||||
func patternWithoutTrailingGlob(p *fileutils.Pattern) string {
|
||||
func patternWithoutTrailingGlob(p *patternmatcher.Pattern) string {
|
||||
patStr := p.String()
|
||||
// We use filepath.Separator here because fileutils.Pattern patterns
|
||||
// We use filepath.Separator here because patternmatcher.Pattern patterns
|
||||
// get transformed to use the native path separator:
|
||||
// https://github.com/moby/moby/blob/79651b7a979b40e26af353ad283ca7ea5d67a855/pkg/fileutils/fileutils.go#L54
|
||||
// https://github.com/moby/patternmatcher/blob/130b41bafc16209dc1b52a103fdac1decad04f1a/patternmatcher.go#L52
|
||||
patStr = strings.TrimSuffix(patStr, string(filepath.Separator)+"**")
|
||||
patStr = strings.TrimSuffix(patStr, string(filepath.Separator)+"*")
|
||||
return patStr
|
||||
|
Reference in New Issue
Block a user