From 03c8fed85d6220752f3fbaf963ee3dfd2c327cc1 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 1 Jun 2020 09:41:28 +0300 Subject: [PATCH] Move scriptlets to a more logical space in the spec Accidentally slopped into middle of %files sections by yours truly. --- rpm.spec | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/rpm.spec b/rpm.spec index db456af..5acc210 100644 --- a/rpm.spec +++ b/rpm.spec @@ -402,6 +402,18 @@ rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/{perl*,python*} make check || (cat tests/rpmtests.log; exit 1) %endif +# Handle rpmdb rebuild service on erasure of old to avoid ordering issues +# https://pagure.io/fesco/issue/2382 +%triggerun -- rpm < 4.15.90-0.git14971.10 +if [ -x /usr/bin/systemctl ]; then + systemctl --no-reload preset rpmdb-rebuild ||: +fi + +%posttrans +if [ -f /var/lib/rpm/Packages ]; then + touch /var/lib/rpm/.rebuilddb +fi + %files -f rpm.lang %license COPYING %doc CREDITS doc/manual/[a-z]* @@ -458,18 +470,6 @@ make check || (cat tests/rpmtests.log; exit 1) %dir %{rpmhome}/fileattrs -# Handle rpmdb rebuild service on erasure of old to avoid ordering issues -# https://pagure.io/fesco/issue/2382 -%triggerun -- rpm < 4.15.90-0.git14971.10 -if [ -x /usr/bin/systemctl ]; then - systemctl --no-reload preset rpmdb-rebuild ||: -fi - -%posttrans -if [ -f /var/lib/rpm/Packages ]; then - touch /var/lib/rpm/.rebuilddb -fi - %files libs %{_libdir}/librpmio.so.* %{_libdir}/librpm.so.*