[packages/libutempter] - moved utmpx -> utmp migration to pretrans
baggins
baggins at pld-linux.org
Mon Nov 11 13:10:47 CET 2013
commit 684e8d3e117dca1f9f67b822b7e350d666e7884b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Nov 11 13:09:43 2013 +0100
- moved utmpx -> utmp migration to pretrans
It's not in trigger because wtmpx is %%ghost, and %%ghost-ed files
are removed when they'are uninstalled.
Rel 4
libutempter.spec | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/libutempter.spec b/libutempter.spec
index 4c1f5af..5abd027 100644
--- a/libutempter.spec
+++ b/libutempter.spec
@@ -7,7 +7,7 @@ Summary(uk.UTF-8): Привілейована програма для внесе
%define utempter_compat_ver 0.5.5
Name: libutempter
Version: 1.1.6
-Release: 3
+Release: 4
License: LGPL v2.1+
Group: Base
Source0: ftp://ftp.altlinux.org/pub/people/ldv/utempter/%{name}-%{version}.tar.bz2
@@ -115,6 +115,16 @@ install -d $RPM_BUILD_ROOT/var/run
%clean
rm -rf $RPM_BUILD_ROOT
+%pretrans
+if [ -e /var/run/utmpx ]; then
+ if [ -s /var/run/utmp ]; then
+ # utmp always takes precedence, it's safe to remove utmpx
+ rm -f /var/run/utmpx
+ else
+ mv -f /var/run/utmpx /var/run/utmp
+ fi
+fi
+
%pre
%groupadd -g 22 utmp
@@ -133,16 +143,6 @@ if [ "$1" = "0" ]; then
%groupremove utmp
fi
-%triggerpostun -- libutempter < 1.1.6-2
-if [ -e /var/run/utmpx ]; then
- if [ -s /var/run/utmp ]; then
- # utmp always takes precedence, it's safe to remove utmpx
- rm -f /var/run/utmpx
- else
- mv -f /var/run/utmpx /var/run/utmp
- fi
-fi
-
%files
%defattr(644,root,root,755)
%doc README
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libutempter.git/commitdiff/684e8d3e117dca1f9f67b822b7e350d666e7884b
More information about the pld-cvs-commit
mailing list