summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-03-08 21:55:42 +0100
committerLars Wendler <polynomial-c@gentoo.org>2019-03-08 21:56:07 +0100
commit899e32aaae797bc4febb51b70bd2d370d6332585 (patch)
tree1de14526db3f33d5b2d28d21739ea542eb6d700b /app-shells/bash
parentsys-libs/openipmi: Removed old. (diff)
downloadgentoo-899e32aaae797bc4febb51b70bd2d370d6332585.tar.gz
gentoo-899e32aaae797bc4febb51b70bd2d370d6332585.tar.bz2
gentoo-899e32aaae797bc4febb51b70bd2d370d6332585.zip
app-shells/bash: Bump to version 5.0_p2-r2. Removed old.
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-shells/bash')
-rw-r--r--app-shells/bash/bash-5.0_p2-r2.ebuild (renamed from app-shells/bash/bash-5.0_p2-r1.ebuild)2
-rw-r--r--app-shells/bash/files/bash-5.0-globpat-backslashes.patch38
2 files changed, 36 insertions, 4 deletions
diff --git a/app-shells/bash/bash-5.0_p2-r1.ebuild b/app-shells/bash/bash-5.0_p2-r2.ebuild
index 9410c85e0ce..7383e634420 100644
--- a/app-shells/bash/bash-5.0_p2-r1.ebuild
+++ b/app-shells/bash/bash-5.0_p2-r2.ebuild
@@ -68,8 +68,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.0-history-zero-length.patch
"${FILESDIR}"/${PN}-5.0-history-append.patch
"${FILESDIR}"/${PN}-5.0-optimize-connection-fork.patch
- "${FILESDIR}"/${PN}-5.0-globpat-backslashes.patch
"${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
+ "${FILESDIR}"/${PN}-5.0-globpat-backslashes.patch
)
pkg_setup() {
diff --git a/app-shells/bash/files/bash-5.0-globpat-backslashes.patch b/app-shells/bash/files/bash-5.0-globpat-backslashes.patch
index b3f6d680ea4..21acaf7e7ff 100644
--- a/app-shells/bash/files/bash-5.0-globpat-backslashes.patch
+++ b/app-shells/bash/files/bash-5.0-globpat-backslashes.patch
@@ -53,8 +53,18 @@
! return bsquote ? 2 : 0;
}
+*** ../bash-5.0-patched/lib/glob/glob.h 2013-10-28 14:46:12.000000000 -0400
+--- lib/glob/glob.h 2019-03-07 11:06:47.000000000 -0500
+***************
+*** 31,34 ****
+--- 31,35 ----
+ #define GX_ADDCURDIR 0x200 /* internal -- add passed directory name */
+ #define GX_GLOBSTAR 0x400 /* turn on special handling of ** */
++ #define GX_RECURSE 0x800 /* internal -- glob_filename called recursively */
+
+ extern int glob_pattern_p __P((const char *));
*** ../bash-5.0-patched/lib/glob/glob.c 2018-09-20 10:53:23.000000000 -0400
---- lib/glob/glob.c 2019-01-31 19:14:13.000000000 -0500
+--- lib/glob/glob.c 2019-03-07 14:23:43.000000000 -0500
***************
*** 1062,1066 ****
unsigned int directory_len;
@@ -89,15 +99,37 @@
{
char **directories, *d, *p;
***************
+*** 1176,1180 ****
+ d[directory_len - 1] = '\0';
+
+! directories = glob_filename (d, dflags);
+
+ if (free_dirname)
+--- 1195,1199 ----
+ d[directory_len - 1] = '\0';
+
+! directories = glob_filename (d, dflags|GX_RECURSE);
+
+ if (free_dirname)
+***************
*** 1333,1336 ****
---- 1352,1360 ----
+--- 1352,1369 ----
return (NULL);
}
-+ if (directory_len > 0 && hasglob == 2) /* need to dequote */
++ /* If we have a directory name with quoted characters, and we are
++ being called recursively to glob the directory portion of a pathname,
++ we need to dequote the directory name before returning it so the
++ caller can read the directory */
++ if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) != 0)
+ {
+ dequote_pathname (directory_name);
+ directory_len = strlen (directory_name);
+ }
++
++ /* We could check whether or not the dequoted directory_name is a
++ directory and return it here, returning the original directory_name
++ if not, but we don't do that yet. I'm not sure it matters. */
++
/* Handle GX_MARKDIRS here. */
result[0] = (char *) malloc (directory_len + 1);
*** ../bash-5.0-patched/pathexp.c 2018-04-29 17:44:48.000000000 -0400