This commit is contained in:
parent
3e3958e2cd
commit
0c309b60e4
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e787af9b7d2be9f0138d78da3086b37a5c2ff7c33ad19549805bc4cffbb68b2a
|
||||
size 13552
|
||||
oid sha256:5976375a49b913bacb5aafa2e1471666731621f19bd3d7872c2eacb035824f9e
|
||||
size 15858
|
||||
|
@ -1,99 +0,0 @@
|
||||
| Matt Zyzik wrote:
|
||||
| > All,
|
||||
| >
|
||||
| > Previously, the behavior of globstar mimicked that of ksh/zsh for such a
|
||||
| > command: "ls -adl **/*.cs".
|
||||
| >
|
||||
| > Now I've upgraded to Bash 4.0.24 from Bash 4.0.17 and the behavior is
|
||||
| > different (seemingly incorrect). Previously, the above-mentioned command
|
||||
| > would list all *.cs files in the current directory and all
|
||||
| > subdirectories. With the latest Bash, it only lists *.cs files in
|
||||
| > subdirectories. The *.cs files in the current working directory are
|
||||
| > ignored.
|
||||
| >
|
||||
| > I think this is a bug. Again, "ls -adl **/*.cs" is now _not_ picking up
|
||||
| > *.cs files in the current working directory.
|
||||
|
|
||||
| OK. I finally had some time to look at this.
|
||||
|
|
||||
| The issue is that you can't always add a null placeholder for the current
|
||||
| directory (the original bash-4.0 code) or never add one (patch 24). You
|
||||
| have to add one in certain circumstances, when it gets handled later in
|
||||
| the process.
|
||||
|
|
||||
| Try the attached patch. It undoes portions of patch 24 and uses a
|
||||
| different scheme to figure out when to add the null placeholder. It
|
||||
| seems to work for all cases without any regressions.
|
||||
|
|
||||
| Chet
|
||||
|
|
||||
*** ../bash-4.0-patched/lib/glob/glob.c 2009-05-22 12:32:26.000000000 -0400
|
||||
--- lib/glob/glob.c 2009-05-22 12:35:55.000000000 -0400
|
||||
***************
|
||||
*** 666,672 ****
|
||||
}
|
||||
|
||||
! /* compat: if GX_ALLDIRS, add the passed directory also, but don't add an
|
||||
! empty directory name. */
|
||||
! if (add_current && (flags & GX_NULLDIR) == 0)
|
||||
{
|
||||
sdlen = strlen (dir);
|
||||
--- 666,673 ----
|
||||
}
|
||||
|
||||
! /* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty
|
||||
! directory name as a placeholder if GX_NULLDIR (in which case the passed
|
||||
! directory name is "."). */
|
||||
! if (add_current)
|
||||
{
|
||||
sdlen = strlen (dir);
|
||||
***************
|
||||
*** 680,684 ****
|
||||
nextlink->next = lastlink;
|
||||
lastlink = nextlink;
|
||||
! bcopy (dir, nextname, sdlen + 1);
|
||||
++count;
|
||||
}
|
||||
--- 681,688 ----
|
||||
nextlink->next = lastlink;
|
||||
lastlink = nextlink;
|
||||
! if (flags & GX_NULLDIR)
|
||||
! nextname[0] = '\0';
|
||||
! else
|
||||
! bcopy (dir, nextname, sdlen + 1);
|
||||
++count;
|
||||
}
|
||||
***************
|
||||
*** 1008,1016 ****
|
||||
/* Just return what glob_vector () returns appended to the
|
||||
directory name. */
|
||||
dflags = flags & ~GX_MARKDIRS;
|
||||
if (directory_len == 0)
|
||||
dflags |= GX_NULLDIR;
|
||||
if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
|
||||
! dflags |= GX_ALLDIRS|GX_ADDCURDIR;
|
||||
temp_results = glob_vector (filename,
|
||||
(directory_len == 0 ? "." : directory_name),
|
||||
--- 1012,1033 ----
|
||||
/* Just return what glob_vector () returns appended to the
|
||||
directory name. */
|
||||
+ /* If flags & GX_ALLDIRS, we're called recursively */
|
||||
dflags = flags & ~GX_MARKDIRS;
|
||||
if (directory_len == 0)
|
||||
dflags |= GX_NULLDIR;
|
||||
if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
|
||||
! {
|
||||
! dflags |= GX_ALLDIRS|GX_ADDCURDIR;
|
||||
! #if 0
|
||||
! /* If we want all directories (dflags & GX_ALLDIRS) and we're not
|
||||
! being called recursively as something like `echo **/*.o'
|
||||
! ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from
|
||||
! adding a null directory name to the front of the temp_results
|
||||
! array. We turn off ADDCURDIR if not called recursively and
|
||||
! dlen == 0 */
|
||||
! #endif
|
||||
! if (directory_len == 0 && (flags & GX_ALLDIRS) == 0)
|
||||
! dflags &= ~GX_ADDCURDIR;
|
||||
! }
|
||||
temp_results = glob_vector (filename,
|
||||
(directory_len == 0 ? "." : directory_name),
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 28 13:19:20 CEST 2009 - werner@suse.de
|
||||
|
||||
- Update to newest patch level 28
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 2 14:45:19 CEST 2009 - werner@suse.de
|
||||
|
||||
|
16
bash.spec
16
bash.spec
@ -28,7 +28,7 @@ Recommends: bash-lang = %bash_vers
|
||||
Suggests: command-not-found
|
||||
AutoReqProv: on
|
||||
Version: 4.0
|
||||
Release: 13
|
||||
Release: 14
|
||||
Summary: The GNU Bourne-Again Shell
|
||||
Url: http://www.gnu.org/software/bash/bash.html
|
||||
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2
|
||||
@ -60,7 +60,6 @@ Patch22: readline-6.0-wrap.patch
|
||||
Patch23: readline-5.2-conf.patch
|
||||
Patch30: readline-6.0-destdir.patch
|
||||
Patch40: bash-4.0.10-typo.patch
|
||||
Patch41: bash-4.0.24-globstar-nulldir.patch
|
||||
Patch42: bash-4.0.24-acl.dif
|
||||
Patch43: bash-4.0.24-memleak-read.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -91,7 +90,7 @@ Group: Documentation/Man
|
||||
Provides: bash:%{_infodir}/bash.info.gz
|
||||
PreReq: %install_info_prereq
|
||||
Version: 4.0
|
||||
Release: 13
|
||||
Release: 14
|
||||
AutoReqProv: on
|
||||
|
||||
%description -n bash-doc
|
||||
@ -111,7 +110,7 @@ License: GPL v2 or later
|
||||
Summary: Include Files mandatory for Development of bash loadable builtins
|
||||
Group: Development/Languages/C and C++
|
||||
Version: 4.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
AutoReqProv: on
|
||||
|
||||
%description -n bash-devel
|
||||
@ -131,7 +130,7 @@ License: GPL v2 or later
|
||||
Summary: Loadable bash builtins
|
||||
Group: System/Shells
|
||||
Version: 4.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
AutoReqProv: on
|
||||
|
||||
%description -n bash-loadables
|
||||
@ -200,7 +199,7 @@ Summary: The Readline Library
|
||||
Group: System/Libraries
|
||||
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
|
||||
Version: 6.0
|
||||
Release: 13
|
||||
Release: 14
|
||||
Recommends: readline-doc = %{version}
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
@ -229,7 +228,7 @@ Summary: Include Files and Libraries mandatory for Development
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: bash:%{_libdir}/libreadline.a
|
||||
Version: 6.0
|
||||
Release: 13
|
||||
Release: 14
|
||||
Requires: libreadline6 = %{version}
|
||||
Requires: ncurses-devel
|
||||
Recommends: readline-doc = %{version}
|
||||
@ -258,7 +257,7 @@ Group: System/Libraries
|
||||
Provides: readline:%{_infodir}/readline.info.gz
|
||||
PreReq: %install_info_prereq
|
||||
Version: 6.0
|
||||
Release: 13
|
||||
Release: 14
|
||||
AutoReqProv: on
|
||||
|
||||
%description -n readline-doc
|
||||
@ -298,7 +297,6 @@ unset p
|
||||
%patch22 -p0 -b .wrap
|
||||
%patch23 -p0 -b .conf
|
||||
%patch40 -p0 -b .typo
|
||||
%patch41 -p0 -b .globstar
|
||||
%patch42 -p0 -b .acl
|
||||
%patch43 -p0 -b .leak
|
||||
%patch0 -p0
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:832e90fa8d832ddc04432957a768fd591996cee1c7ef044cc380e9e99f9c5e3f
|
||||
size 2139
|
||||
oid sha256:22b42db504a41a7f91efd06f0ab2891df8bcd056598e85f3cd7e5e323f73a6c1
|
||||
size 2635
|
||||
|
Loading…
Reference in New Issue
Block a user