【发布时间】:2021-08-18 19:25:52
【问题描述】:
我有一个示例 rpm 规范文件,例如
Name: helloworld
Version: 2.0
Release: 2%{?dist}
Summary: Simple Hello World rpm
License: Internal
Source0: helloworld-src.tar.bz2
%description
%prep
%setup -c -q -T -D -a 0
%build
%install
echo "Install command ..."
%post
echo "post command..."
%postun
echo "postun command..."
%files
%doc
%changelog
当我执行rpm -i helloworld.rpm时,输出是
post command...
但是当我执行rpm --reinstall helloworld时,输出是
post command...
postun command...
为什么会这样?我期待在调用post 之前调用postun。
在哪里可以找到rpm --reinstall 期间将调用哪些脚本?
【问题讨论】: