- Add safeguards around the posttrans/postun scripts.

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=101
This commit is contained in:
Tomáš Chvátal 2014-01-30 12:42:54 +00:00 committed by Git OBS Bridge
parent c9c59ed56f
commit 95079dcb81
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jan 30 12:42:48 UTC 2014 - tchvatal@suse.com
- Add safeguards around the posttrans/postun scripts.
-------------------------------------------------------------------
Wed Jan 29 12:04:16 UTC 2014 - tchvatal@suse.com

View File

@ -724,11 +724,18 @@ Provides additional %{langname} translations and resources for %{project}. \
\
%posttrans %{pkgname} \
rpm -ql %{pkgname} > %{_datadir}/libreoffice/%{pkgname}_list.txt || true \
%{_datadir}/libreoffice/link-to-ooo-home %{_datadir}/libreoffice/%{pkgname}_list.txt || true \
if [ -f %{_datadir}/libreoffice/%{pkgname}_list.txt ] ; then \
%{_datadir}/libreoffice/link-to-ooo-home %{_datadir}/libreoffice/%{pkgname}_list.txt || true \
else \
echo "Unable to generate filelist" \
rpm -ql %{pkgname} \
fi \
\
%postun %{pkgname} \
test "$1" = "0" && %{_datadir}/libreoffice/link-to-ooo-home --unlink %{_datadir}/libreoffice/%{pkgname}_list.txt \
test "$1" = "0" && rm -f %{_datadir}/libreoffice/%{pkgname}_list.txt 2> /dev/null \
if [ "$1" = "0" -a -f %{_datadir}/libreoffice/%{pkgname}_list.txt ]; then \
%{_datadir}/libreoffice/link-to-ooo-home --unlink %{_datadir}/libreoffice/%{pkgname}_list.txt || true \
rm -f %{_datadir}/libreoffice/%{pkgname}_list.txt 2> /dev/null || true \
fi \
%{nil}
%langpack -l af -n Afrikaans