mirror of
https://github.com/containers/podman.git
synced 2025-10-20 20:54:45 +08:00
vendor: update common and buildah
vendor the following dependencies: - https://github.com/containers/common/pull/2375 - https://github.com/containers/buildah/pull/6074 Closes: https://github.com/containers/podman/issues/25634 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
21
vendor/github.com/openshift/imagebuilder/builder.go
generated
vendored
21
vendor/github.com/openshift/imagebuilder/builder.go
generated
vendored
@ -3,6 +3,7 @@ package imagebuilder
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
@ -716,14 +717,14 @@ var builtinAllowedBuildArgs = map[string]bool{
|
||||
"no_proxy": true,
|
||||
}
|
||||
|
||||
// ParseIgnore returns a list of the excludes in the specified path
|
||||
// path should be a file with the .dockerignore format
|
||||
// ParseIgnoreReader returns a list of the excludes in the provided file
|
||||
// which uses the .dockerignore format
|
||||
// extracted from fsouza/go-dockerclient and modified to drop comments and
|
||||
// empty lines.
|
||||
func ParseIgnore(path string) ([]string, error) {
|
||||
func ParseIgnoreReader(r io.Reader) ([]string, error) {
|
||||
var excludes []string
|
||||
|
||||
ignores, err := ioutil.ReadFile(path)
|
||||
ignores, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return excludes, err
|
||||
}
|
||||
@ -739,6 +740,18 @@ func ParseIgnore(path string) ([]string, error) {
|
||||
return excludes, nil
|
||||
}
|
||||
|
||||
// ParseIgnore returns a list returned by having ParseIgnoreReader() read the
|
||||
// specified path
|
||||
func ParseIgnore(path string) ([]string, error) {
|
||||
var excludes []string
|
||||
|
||||
ignores, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return excludes, err
|
||||
}
|
||||
return ParseIgnoreReader(bytes.NewReader(ignores))
|
||||
}
|
||||
|
||||
// ParseDockerIgnore returns a list of the excludes in the .containerignore or .dockerignore file.
|
||||
func ParseDockerignore(root string) ([]string, error) {
|
||||
excludes, err := ParseIgnore(filepath.Join(root, ".containerignore"))
|
||||
|
Reference in New Issue
Block a user