mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-09 14:16:43 +02:00
eclass/epatch: Sync with Gentoo
It's from Gentoo commit d0f772a98c7a25d3b1016935e5f3b478e10965c9.
This commit is contained in:
parent
4ab2bfafb6
commit
57c421bd81
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: epatch.eclass
|
||||
@ -190,7 +190,7 @@ epatch() {
|
||||
local patchname=${x##*/}
|
||||
|
||||
# Apply single patches, or forced sets of patches, or
|
||||
# patches with ARCH dependant names.
|
||||
# patches with ARCH dependent names.
|
||||
# ???_arch_foo.patch
|
||||
# Else, skip this input altogether
|
||||
local a=${patchname#*_} # strip the ???_
|
||||
@ -272,7 +272,7 @@ epatch() {
|
||||
fi
|
||||
|
||||
# Check for absolute paths in patches. If sandbox is disabled,
|
||||
# people could (accidently) patch files in the root filesystem.
|
||||
# people could (accidentally) patch files in the root filesystem.
|
||||
# Or trigger other unpleasantries #237667. So disallow -p0 on
|
||||
# such patches.
|
||||
local abs_paths=$(grep -E -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user