1 |
Signed-off-by: Sam James <sam@g.o> |
2 |
--- |
3 |
eclass/epatch.eclass | 6 +++--- |
4 |
1 file changed, 3 insertions(+), 3 deletions(-) |
5 |
|
6 |
diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass |
7 |
index 5d18befe55b9..6a9c460da0a3 100644 |
8 |
--- a/eclass/epatch.eclass |
9 |
+++ b/eclass/epatch.eclass |
10 |
@@ -1,4 +1,4 @@ |
11 |
-# Copyright 1999-2021 Gentoo Authors |
12 |
+# Copyright 1999-2022 Gentoo Authors |
13 |
# Distributed under the terms of the GNU General Public License v2 |
14 |
|
15 |
# @ECLASS: epatch.eclass |
16 |
@@ -285,13 +285,13 @@ epatch() { |
17 |
# people could (accidently) patch files in the root filesystem. |
18 |
# Or trigger other unpleasantries #237667. So disallow -p0 on |
19 |
# such patches. |
20 |
- local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }') |
21 |
+ local abs_paths=$(grep -E -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }') |
22 |
if [[ -n ${abs_paths} ]] ; then |
23 |
count=1 |
24 |
printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}" |
25 |
fi |
26 |
# Similar reason, but with relative paths. |
27 |
- local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") |
28 |
+ local rel_paths=$(grep -E -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") |
29 |
if [[ -n ${rel_paths} ]] ; then |
30 |
echo |
31 |
eerror "Rejected Patch: ${patchname}!" |
32 |
-- |
33 |
2.35.1 |