From 5794aabdfa5b220d4d6c8d72a5bcbff85a7eb2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Thu, 16 Nov 2017 11:19:54 +0100 Subject: [PATCH] make file trigger scriptlets not to fail in case systemd is unavailable drop systemd dependency --- man-db.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/man-db.spec b/man-db.spec index d520ca7..fffc11d 100644 --- a/man-db.spec +++ b/man-db.spec @@ -4,7 +4,7 @@ Summary: Tools for searching and reading man pages Name: man-db Version: 2.7.6.1 -Release: 6%{?dist} +Release: 7%{?dist} # GPLv2+ .. man-db # GPLv3+ .. gnulib License: GPLv2+ and GPLv3+ @@ -27,8 +27,6 @@ Provides: man-pages-reader = %{version} Provides: bundled(gnulib) = %{gnulib_ver} Requires: coreutils, grep, groff-base, gzip, less -# for file trigger scriptlets -Requires: systemd BuildRequires: systemd BuildRequires: gdbm-devel, gettext, groff, less, libpipeline-devel, zlib-devel BuildRequires: po4a, perl-interpreter, perl-version @@ -114,11 +112,15 @@ fi # update cache %transfiletriggerin -- %{_mandir} -/usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update +if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then + /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update || : +fi # update cache %transfiletriggerpostun -- %{_mandir} -/usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update +if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then + /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update || : +fi %files -f %{name}.lang -f %{name}-gnulib.lang @@ -172,6 +174,10 @@ fi %config(noreplace) %{_sysconfdir}/sysconfig/man-db %changelog +* Thu Nov 16 2017 Nikola Forró - 2.7.6.1-7 +- make file trigger scriptlets not to fail in case systemd is unavailable +- drop systemd dependency + * Wed Nov 08 2017 Nikola Forró - 2.7.6.1-6 - run cache update in a transient service using systemd-run resolves #1318058