Test for /run/systemd only if mandb.timer is actually installed

- resolves: #1223244
This commit is contained in:
Jan Chaloupka 2015-05-20 12:25:25 +02:00
parent 516be49262
commit ab9c4ea572

View File

@ -4,7 +4,7 @@
Summary: Tools for searching and reading man pages Summary: Tools for searching and reading man pages
Name: man-db Name: man-db
Version: 2.7.1 Version: 2.7.1
Release: 5%{?dist} Release: 6%{?dist}
# GPLv2+ .. man-db # GPLv2+ .. man-db
# GPLv3+ .. gnulib # GPLv3+ .. gnulib
License: GPLv2+ and GPLv3+ License: GPLv2+ and GPLv3+
@ -77,10 +77,12 @@ install -D -p -m 0644 init/systemd/man-db.conf $RPM_BUILD_ROOT/usr/lib/tmpfiles.
# stop and disable timer from previous builds # stop and disable timer from previous builds
%pre %pre
if [ -e /usr/lib/systemd/system/mandb.timer ]; then
if test -d /run/systemd; then if test -d /run/systemd; then
systemctl stop man-db.timer systemctl stop man-db.timer
systemctl -q disable man-db.timer systemctl -q disable man-db.timer
fi fi
fi
# clear the old cache # clear the old cache
%post %post
@ -133,6 +135,10 @@ fi
%lang(zh_CN) %{_datadir}/man/zh_CN/man*/* %lang(zh_CN) %{_datadir}/man/zh_CN/man*/*
%changelog %changelog
* Wed May 20 2015 jchaloup <jchaloup@redhat.com> - 2.7.1-6
- Test for /run/systemd only if mandb.timer is actually installed
resolves: #1223244
* Tue May 12 2015 Colin Walters <walters@redhat.com> - 2.7.1-5 * Tue May 12 2015 Colin Walters <walters@redhat.com> - 2.7.1-5
- Test for /run/systemd to detect systemd state rather than invoking - Test for /run/systemd to detect systemd state rather than invoking
rpm in % pre - it is not really supported by rpm. rpm in % pre - it is not really supported by rpm.