diff options
author | P. J. McDermott <pjm@nac.net> | 2013-06-21 10:59:03 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-06-21 10:59:03 (EDT) |
commit | 1f241a7edb7aae0df0bba6ce1b35bfd13774d58a (patch) | |
tree | 6a60a9fdb020a01dd7e38c4c4fb6c1afe2ff484a /patches | |
parent | 0783e3addcd290d9365d2912d86f8a91b46deb2e (diff) |
Add patch to fix "bad regex" awk errors.
Fixes errors like the following:
awk -f scripts/gen-sorted.awk \
-v subdirs='csu assert ctype locale intl catgets math setjmp signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd posix io termios resource misc socket sysvipc gmon gnulib iconv iconvdata wctype manual shadow gshadow po argp crypt nss localedata timezone rt conform debug libidn dlfcn elf' \
-v srcpfx='' \
nptl/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs sysdeps/unix/Subdirs assert/Depend intl/Depend catgets/Depend stdlib/Depend stdio-common/Depend libio/Depend malloc/Depend string/Depend wcsmbs/Depend time/Depend posix/Depend iconvdata/Depend nss/Depend localedata/Depend rt/Depend debug/Depend > /usr/src/eglibc_2.17~r22751+sip1-1/tmp/libcbuild/sysd-sorted-tmp
awk: bad regex '\/[^': Invalid regular expression
Diffstat (limited to 'patches')
-rw-r--r-- | patches/05_fix-bad-regex-in-awk-script.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/05_fix-bad-regex-in-awk-script.patch b/patches/05_fix-bad-regex-in-awk-script.patch new file mode 100644 index 0000000..cf9aeeb --- /dev/null +++ b/patches/05_fix-bad-regex-in-awk-script.patch @@ -0,0 +1,45 @@ +From: "P. J. McDermott" <pjm@nac.net> +Description: Fix "bad regex" in scripts/gen-sorted.awk + BusyBox awk parses this: + . + sub(/\/[^/]+$/, "", subdir); + . + into this (using POSIX.1 terminal symbols): + . + BUILTIN_FUNC_NAME: sub + '(': ( + ERE: \/[^ + . + and fails because it cannot compile the regular expression "\/[^". + . + The slash in the bracket expression must be escaped to be parsed as expected in + BusyBox awk. + +diff -Naur src.orig/libc/scripts/gen-sorted.awk src/libc/scripts/gen-sorted.awk +--- src.orig/libc/scripts/gen-sorted.awk 2006-08-16 21:18:26.000000000 -0400 ++++ src/libc/scripts/gen-sorted.awk 2013-06-21 10:37:33.855053579 -0400 +@@ -16,7 +16,7 @@ + { + subdir = type = FILENAME; + sub(/^.*\//, "", type); +- sub(/\/[^/]+$/, "", subdir); ++ sub(/\/[^\/]+$/, "", subdir); + sub(/^.*\//, "", subdir); + thisdir = ""; + } +@@ -56,13 +56,13 @@ + # The Subdirs file comes from an add-on that should have the subdirectory. + dir = FILENAME; + do +- sub(/\/[^/]+$/, "", dir); ++ sub(/\/[^\/]+$/, "", dir); + while (dir !~ /\/sysdeps$/); + sub(/\/sysdeps$/, "", dir); + if (system("test -d " dir "/" thisdir) == 0) + dir = dir "/" thisdir; + else { +- sub(/\/[^/]+$/, "", dir); ++ sub(/\/[^\/]+$/, "", dir); + if (system("test -d " dir "/" thisdir) == 0) + dir = dir "/" thisdir; + else { |