polish scriptlets

- use --force in %post
- use %triggerun -- appstream-data (only on upgrades)
- ignore errors, redirect output to /dev/null
This commit is contained in:
Rex Dieter 2015-09-09 12:40:19 -05:00
parent 50c6b8fd6e
commit 60fbea3db3

View File

@ -5,7 +5,7 @@
Summary: Utilities to generate, maintain and access the AppStream Xapian database
Name: appstream
Version: 0.8.4
Release: 1%{?dist}
Release: 2%{?dist}
# lib LGPLv2+, tools GPLv2+
License: GPLv2+ and LGPLv2+
@ -86,7 +86,6 @@ make %{?_smp_mflags} -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
mkdir -p %{buildroot}%{_datadir}/app-info/{icons,xmls}
mkdir -p %{buildroot}/var/cache/app-info/{icons,xapian,xmls}
touch %{buildroot}/var/cache/app-info/cache.watch
@ -100,11 +99,11 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
#posttrans
#{_bindir}/appstreamcli refresh-index
%posttrans
%{_bindir}/appstreamcli refresh-index --force >& /dev/null ||:
%triggerin -- appstream-data
%{_bindir}/appstreamcli refresh-index
%triggerun -- appstream-data
%{_bindir}/appstreamcli refresh-index >& /dev/null ||:
%files -f appstream.lang
%doc AUTHORS
@ -118,7 +117,6 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300"
%{_libdir}/girepository-1.0/AppStream-0.8.typelib
%{_libdir}/libappstream.so.2*
%{_libdir}/libappstream.so.%{version}
%dir %{_datadir}/app-info/
%{_datadir}/app-info/categories.xml
%ghost /var/cache/app-info/cache.watch
%dir /var/cache/app-info/
@ -156,6 +154,12 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300"
%changelog
* Wed Sep 09 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.4-2
- polish scriptlets
- use --force in %%post
- use %%triggerun -- appstream-data (only on upgrades)
- ignore errors, redirect output to /dev/null
* Tue Sep 08 2015 Rex Dieter <rdieter@fedoraproject.org> 0.8.4-1
- 0.8.4, refresh-index whenever appstream-data is updated too