大网数据广告活动
服务器运维问答

Ubuntu's `dpkg` ignores `Replaces` field of a package

· 52CE 我爱测

I'm building a newer replacement for a package, libgpg-error . Ubuntu also has a libgpg-error0 , which is depended upon by system packages (such as systemd ). My package provides everything libgpg-error0 does, therefore I list th…

问题原文

原帖链接 · smaslennikov · CC BY-SA 4.0

I'm building a newer replacement for a package, libgpg-error. Ubuntu also has a libgpg-error0, which is depended upon by system packages (such as systemd). My package provides everything libgpg-error0 does, therefore I list the following:

Package: libgpg-error
Version: 1.35-1
...
Conflicts: libgpg-error, libgpg-error-dev, libgpg-error0
Provides: libgpg-error0, libgpg-error, libgpg-error-dev
Replaces: libgpg-error, libgpg-error-dev, libgpg-error0

However, dpkg refuses to upgrade to it cleanly. What am I missing?

The resulting deb can be seen here, and the (fpm-cook) code for it here.

Cheers!

EDIT:

This answer seems to be applicable: https://serverfault.com/a/429226, though in the same question another answer is present stating provides do allow versions.

已采纳解答

原帖链接 · smaslennikov · CC BY-SA 4.0

According to debian policy, Provides cannot, in fact, have a version, therefore is ignored by Depends. I'll be renaming my package just for Ubuntu in this case to satisfy this dependency.

According to dpkg changelog (which is no longer available), Provides do now allow versioning and this should work, but when I tried it did not (with version 1.19.0.5).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-02-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。