mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
epatch.eclass: egrep -> grep -E
Deprecated for a while but newer grep emits deprecation warnings. Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: epatch.eclass
|
||||
@@ -285,13 +285,13 @@ epatch() {
|
||||
# people could (accidently) patch files in the root filesystem.
|
||||
# Or trigger other unpleasantries #237667. So disallow -p0 on
|
||||
# such patches.
|
||||
local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
|
||||
local abs_paths=$(grep -E -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
|
||||
if [[ -n ${abs_paths} ]] ; then
|
||||
count=1
|
||||
printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}"
|
||||
fi
|
||||
# Similar reason, but with relative paths.
|
||||
local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}")
|
||||
local rel_paths=$(grep -E -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}")
|
||||
if [[ -n ${rel_paths} ]] ; then
|
||||
echo
|
||||
eerror "Rejected Patch: ${patchname}!"
|
||||
|
||||
Reference in New Issue
Block a user