问题描述
我正在使用 maven 创建一个 rpm,我可以用它来安装我的应用程序。
<mappings>
<mapping>
<directory>${rpm.info.install_dir}</directory>
<filemode>700</filemode>
<sources>
<source>
<location>src/main/resources/install</location>
</source>
</sources>
</mapping>
</mappings>
在我的安装后步骤中,我使用了这些文件,并在步骤结束时删除了该目录。因此,在删除后步骤中,我收到多个错误,目录 ${rpm.info.install_dir}
中的所有文件都不存在:
Remove 1 Package
Installed size: 46 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : my-app-1.0.0-SNAPSHOT.noarch 1/1
warning: file /data/install/file1.conf: remove Failed: No such file or directory
warning: file /data/install/file2.conf: remove Failed: No such file or directory
warning: file /data/install/dir1/file1.service: remove Failed: No such file or directory
我猜 rpm 会尝试在删除后步骤中删除规范文件 (%files) 中提到的所有文件。有什么办法可以避免这个动作吗?我确实想在安装后步骤之后删除安装目录,而不是等到客户决定删除 rpm。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)