根据其他 rpm 前缀的前缀和可重定位 rpm 包 [英] prefix and reloctable rpm package according to an other rpm prefix
问题描述
我已经在/opt 中安装了 sample.rpm.我希望 samplw2.rpm 找到 sample.rpm 的重定位路径,并将自身安装在同一位置.规范文件中是否有任何命令或宏可以在安装前检查它?
I have install sample.rpm in /opt. I want samplw2.rpm find the relocation path of sample.rpm ad install itself in same place. is there any command or macro in spec file which check it befor installation or not?
推荐答案
我很确定这是不可能的;文件位置是固定的.最简单的解决方案是将它们放在已知位置,然后在您的 %post
中设置一个符号链接,eg 链接 /opt/sample2
到 /usr/local/sample2
,后者是 RPM 放置文件的地方.
I'm pretty sure this isn't possible; the file locations are fixed. The easiest solution would be to put them in a known location, and then set up a symlink in your %post
, e.g. linking /opt/sample2
to /usr/local/sample2
where the latter is where the RPM puts the files.
这篇关于根据其他 rpm 前缀的前缀和可重定位 rpm 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!