support _disable_auto_rebuilddb macro in posttrans
(cherry picked from commit 250f8777772869bcda1fbc381221aea5f040ce23)
This commit is contained in:
parent
75cd9e508b
commit
588980ca47
20
rpm.spec
20
rpm.spec
@ -1,6 +1,6 @@
|
|||||||
Name: rpm
|
Name: rpm
|
||||||
Version: 4.17.0
|
Version: 4.17.0
|
||||||
Release: 29
|
Release: 30
|
||||||
Summary: RPM Package Manager
|
Summary: RPM Package Manager
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.rpm.org/
|
URL: http://www.rpm.org/
|
||||||
@ -301,12 +301,15 @@ make check || (cat tests/rpmtests.log; exit 0)
|
|||||||
%posttrans
|
%posttrans
|
||||||
{
|
{
|
||||||
set -e
|
set -e
|
||||||
dbpath=$(rpm -E %{_dbpath})
|
disable_auto_rebuilddb=$(rpm -E 0%%{?_disable_auto_rebuilddb})
|
||||||
while [ -e ${dbpath}/Packages ]
|
if [ ${disable_auto_rebuilddb} -eq 0 ]; then
|
||||||
do
|
dbpath=$(rpm -E %{_dbpath})
|
||||||
date >> /var/log/rebuilddb.log 2>&1
|
while [ -e ${dbpath}/Packages ]
|
||||||
rpm -vvv --rebuilddb >> /var/log/rebuilddb.log 2>&1
|
do
|
||||||
done
|
date >> /var/log/rebuilddb.log 2>&1
|
||||||
|
rpm -vvv --rebuilddb >> /var/log/rebuilddb.log 2>&1
|
||||||
|
done
|
||||||
|
fi
|
||||||
} &
|
} &
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
@ -400,6 +403,9 @@ make check || (cat tests/rpmtests.log; exit 0)
|
|||||||
%{_mandir}/man1/gendiff.1*
|
%{_mandir}/man1/gendiff.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 08 2023 renhongxun<renhongxun@h-partners.com> - 4.17.0-30
|
||||||
|
- support _disable_auto_rebuilddb macro in posttrans
|
||||||
|
|
||||||
* Tue Sep 05 2023 renhongxun<renhongxun@h-partners.com> - 4.17.0-29
|
* Tue Sep 05 2023 renhongxun<renhongxun@h-partners.com> - 4.17.0-29
|
||||||
- Fix the coredump which may occur during upgrading of rpm
|
- Fix the coredump which may occur during upgrading of rpm
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user