[yum-updatesd/f16] add missing scriptlets
Tom Callaway
spot at fedoraproject.org
Fri Sep 9 15:32:19 UTC 2011
commit 7d6ae70d94cdcfed4d37fc774e4c2e5b3b1ada3d
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date: Fri Sep 9 11:32:07 2011 -0400
add missing scriptlets
yum-updatesd.spec | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/yum-updatesd.spec b/yum-updatesd.spec
index 9b08b17..7e2bab7 100644
--- a/yum-updatesd.spec
+++ b/yum-updatesd.spec
@@ -2,7 +2,7 @@ Summary: Update notification daemon
Name: yum-updatesd
Epoch: 1
Version: 0.9
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv2
Group: System Environment/Base
Source0: %{name}-%{version}.tar.bz2
@@ -17,6 +17,8 @@ Requires: dbus-python
Requires: pygobject2
Requires: gamin-python
Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
%description
yum-updatesd provides a daemon which checks for available updates and
@@ -37,6 +39,26 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/
+%post
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable yum-updatesd.service > /dev/null 2>&1 || :
+ /bin/systemctl stop yum-updatesd.service > /dev/null 2>&1 || :
+fi
+
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart yum-updatesd.service >/dev/null 2>&1 || :
+fi
+
%triggerun -- yum-updatesd < 0.9-6
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply yum-updatesd
@@ -58,6 +80,9 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/
%changelog
+* Fri Sep 9 2011 Tom Callaway <spot at fedoraproject.org> - 1:0.9-7
+- add missing scriptlets
+
* Thu Sep 08 2011 Tom Callaway <spot at fedoraproject.org> - 1:0.9-6
- fix broken scriptlets
More information about the scm-commits
mailing list