From 94fcc631ef91240e51c57638b936a1bb9d974376 Mon Sep 17 00:00:00 2001 From: Roman Rakus Date: Mon, 15 Dec 2008 13:47:06 +0000 Subject: [PATCH] Fix in fc builtin. Resolves: #438841 --- bash-3.2-fc.patch | 29 +++++++++++++++++++++++++++++ bash.spec | 10 ++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 bash-3.2-fc.patch diff --git a/bash-3.2-fc.patch b/bash-3.2-fc.patch new file mode 100644 index 0000000..cb3f91f --- /dev/null +++ b/bash-3.2-fc.patch @@ -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)) + { + + diff --git a/bash.spec b/bash.spec index aa020a5..cf89ce5 100644 --- a/bash.spec +++ b/bash.spec @@ -1,7 +1,7 @@ Version: 3.2 Name: bash -Summary: The GNU Bourne Again shell (bash) version %{version} -Release: 32%{?dist} +Summary: The GNU Bourne Again shell version %{version} +Release: 33%{?dist} Group: System Environment/Shells License: GPLv2+ 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 Patch144: bash-3.2-command_not_found.patch Patch145: bash-3.2-audit.patch +Patch146: bash-3.2-fc.patch Requires(post): ncurses-libs BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -186,6 +187,7 @@ compliance over previous versions. %patch143 -p1 -b .ssh_source_bash %patch144 -p1 -b .command_not_found %patch145 -p1 -b .audit +%patch146 -p1 -b .fc echo %{version} > _distribution echo %{release} > _patchlevel @@ -327,6 +329,10 @@ fi %doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Mon Dec 15 2008 Roman Rakus - 3.2-33 +- fc builtin fix + Resolves: #438841 + * Mon Dec 15 2008 Roman Rakus - 3.2-32 - Enabling auditing Resolves: #476216