我正在创build一个Debian软件包foo ,它需要replace安装它的系统上的现有软件包bar 。
我读了:
https://www.debian.org/doc/debian-policy/ch-relationships.html
并得出结论,在DEBIAN/control中的正确的条款应该是这样的:
Provides: foo Conflicts: bar Replaces: bar
但是,当我尝试在已经安装了foo的系统上安装foo软件包时,由于foo与bar冲突,因此系统不起作用。
如果我删除Conflicts: bar条目然后dpkg允许并行安装两个包,这是一个问题,因为foo必须replacebar 。
什么是适当的control文件条款来实现这一点?
我试过了Breaks而不是Conflicts :
dpkg: regarding foo_DEV-22._i386.deb containing foo: foo breaks bar bar (version 3.2.2.1-x86NX4.4-x86) is present and installed. bar provides bar and is present and installed. dpkg: error processing foo_DEV-22._i386.deb (--install): installing foo would break existing software Errors were encountered while processing: foo_DEV-22._i386.deb
为什么不事先重命名它的存在的包,然后用你想要的replace它呢?
为此,您必须按照以下Debian官方wiki页面的方法/方式:
https://wiki.debian.org/Renaming_a_Package