!100 添加posttrans阶段,配置rebuilddb动作,解决对BDB版本rpm的兼容问题
From: @renxichen Reviewed-by: @overweight,@openeuler-basic Signed-off-by: @overweight,@openeuler-basic
This commit is contained in:
commit
823fc706a9
21
rpm.spec
21
rpm.spec
@ -1,6 +1,6 @@
|
|||||||
Name: rpm
|
Name: rpm
|
||||||
Version: 4.15.1
|
Version: 4.15.1
|
||||||
Release: 31
|
Release: 32
|
||||||
Summary: RPM Package Manager
|
Summary: RPM Package Manager
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.rpm.org/
|
URL: http://www.rpm.org/
|
||||||
@ -276,6 +276,19 @@ make check || (cat tests/rpmtests.log; exit 0)
|
|||||||
|
|
||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%posttrans
|
||||||
|
{
|
||||||
|
dbpath=$(rpm -E %{_dbpath})
|
||||||
|
while [ -e ${dbpath}/Packages ]; do
|
||||||
|
date >> /var/log/rebuilddb.log 2>&1
|
||||||
|
rpmdb -vvv --rebuilddb >> /var/log/rebuilddb.log 2>&1
|
||||||
|
if [ $? -ne 0 ];then
|
||||||
|
echo "Automatic conversion db failed. Please run 'rpmdb --rebuilddb' manually." >> /var/log/rebuilddb.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
} &
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -372,6 +385,12 @@ make check || (cat tests/rpmtests.log; exit 0)
|
|||||||
%{_mandir}/man1/gendiff.1*
|
%{_mandir}/man1/gendiff.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Nov 20 2021 renhongxun <renhongxun@huawei.com> - 4.15.1-32
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add posttrans to rebuilddb
|
||||||
|
|
||||||
* Thu Nov 18 2021 licunlong <licunlong1@huawei.com> - 4.15.1-31
|
* Thu Nov 18 2021 licunlong <licunlong1@huawei.com> - 4.15.1-31
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user