Fix in fc builtin. Resolves: #438841

This commit is contained in:
Roman Rakus 2008-12-15 13:47:06 +00:00
parent cc6bd97cea
commit 94fcc631ef
2 changed files with 37 additions and 2 deletions

29
bash-3.2-fc.patch Normal file
View File

@ -0,0 +1,29 @@
diff -up bash-3.2/builtins/fc.def.fc bash-3.2/builtins/fc.def
--- bash-3.2/builtins/fc.def.fc 2006-07-28 02:44:09.000000000 +0100
+++ bash-3.2/builtins/fc.def 2008-03-13 17:21:15.000000000 +0000
@@ -290,11 +290,6 @@ fc_builtin (list)
line was actually added (HISTIGNORE may have caused it to not be),
so we check hist_last_line_added. */
- /* "When not listing, he fc command that caused the editing shall not be
- entered into the history list." */
- if (listing == 0 && hist_last_line_added)
- delete_last_history ();
-
last_hist = i - 1 - hist_last_line_added;
if (list)
@@ -322,6 +317,11 @@ fc_builtin (list)
histbeg = histend = last_hist;
}
+ /* "When not listing, he fc command that caused the editing shall not be
+ entered into the history list." */
+ if (listing == 0 && hist_last_line_added)
+ delete_last_history ();
+
/* We print error messages for line specifications out of range. */
if ((histbeg < 0) || (histend < 0))
{

View File

@ -1,7 +1,7 @@
Version: 3.2 Version: 3.2
Name: bash Name: bash
Summary: The GNU Bourne Again shell (bash) version %{version} Summary: The GNU Bourne Again shell version %{version}
Release: 32%{?dist} Release: 33%{?dist}
Group: System Environment/Shells Group: System Environment/Shells
License: GPLv2+ License: GPLv2+
Url: http://www.gnu.org/software/bash Url: http://www.gnu.org/software/bash
@ -88,6 +88,7 @@ Patch142: bash-3.2-execve_catch_signals.patch
Patch143: bash-3.2-ssh_source_bash.patch Patch143: bash-3.2-ssh_source_bash.patch
Patch144: bash-3.2-command_not_found.patch Patch144: bash-3.2-command_not_found.patch
Patch145: bash-3.2-audit.patch Patch145: bash-3.2-audit.patch
Patch146: bash-3.2-fc.patch
Requires(post): ncurses-libs Requires(post): ncurses-libs
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -186,6 +187,7 @@ compliance over previous versions.
%patch143 -p1 -b .ssh_source_bash %patch143 -p1 -b .ssh_source_bash
%patch144 -p1 -b .command_not_found %patch144 -p1 -b .command_not_found
%patch145 -p1 -b .audit %patch145 -p1 -b .audit
%patch146 -p1 -b .fc
echo %{version} > _distribution echo %{version} > _distribution
echo %{release} > _patchlevel echo %{release} > _patchlevel
@ -327,6 +329,10 @@ fi
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog %changelog
* Mon Dec 15 2008 Roman Rakus <rrakus@redhat.com> - 3.2-33
- fc builtin fix
Resolves: #438841
* Mon Dec 15 2008 Roman Rakus <rrakus@redhat.com> - 3.2-32 * Mon Dec 15 2008 Roman Rakus <rrakus@redhat.com> - 3.2-32
- Enabling auditing - Enabling auditing
Resolves: #476216 Resolves: #476216