diff --git a/bash.spec b/bash.spec index 80f8591..e57eac8 100644 --- a/bash.spec +++ b/bash.spec @@ -6,7 +6,7 @@ Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 4%{?dist} +Release: 5%{?dist} Group: System Environment/Shells License: GPLv3+ Url: http://www.gnu.org/software/bash @@ -282,19 +282,23 @@ end f:close() %postun -p -t={} -for line in io.lines("/etc/shells") -do - if line ~= "/bin/bash" and line ~= "/bin/sh" - then - table.insert(t,line) +-- Run it only if we are uninstalling +if arg[2] == "0" +then + t={} + for line in io.lines("/etc/shells") + do + if line ~= "/bin/bash" and line ~= "/bin/sh" + then + table.insert(t,line) + end end -end -f = io.open("/etc/shells", "w+") -for n,line in pairs(t) -do - f:write(line.."\n") + f = io.open("/etc/shells", "w+") + for n,line in pairs(t) + do + f:write(line.."\n") + end end %files -f %{name}.lang @@ -316,6 +320,9 @@ end #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt %changelog +* Thu Nov 10 2011 Roman Rakus - 4.2.10-5 +- erase /bin/bash and /bin/sh in postun only if we are uninstalling (#752827) + * Wed Jun 22 2011 Roman Rakus - 4.2.10-4 - Don't crash when use `read' with associative array (#715050)