从另一个存储库更新另一个包的包
我创建了存储库来存储我自己的包。 系统使用我的和其他一些公共存储库。
所以现在我的存储库中有一个包,我想将其作为另一个存储库中其他包的更新。
这些存储库是基于 rpm 包的。
通常是否可以标记我自己的包来更新另一个包?
I've created repository where I store my own packages.
System uses my and some other public repositories.
So now I've a package in my repo which I want to be as an update for some other package from another repository.
The repositories are rpm package based.
Is it generally possible to mark my own package to update another package ?
(我本来想对之前的答案进行评论,但它太长了。)
使用相同的包名称并只是增加版本号会出现问题。
最终,原始软件包的版本号可能会超过您正在使用的版本号,在这种情况下,有人可能会进行 yum 更新并最终升级回原始软件包。
为了避免这个问题,您可以稍微更改包名称,并将一些 Obsoletes 和 Conflicts 依赖项添加到您的规范文件中。 Obsoletes 依赖项允许将原始包升级到您的包,而 Conflicts 则阻止原始包与您的包同时安装。
这应该可以防止上游版本冲突破坏您的更改。
请参阅 http://docs.fedoraproject.org/ en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-dependency.html
(I would have made this a comment on the previous answer, but its too long.)
There's a problem with using the same package name and just bumping the version number.
Eventually the original package may increase its version number past what you're using, in which case someone may do a yum update and end up upgrading back to the original package.
To avoid this problem, you can change the package name slightly, and add some Obsoletes and Conflicts dependencies to your spec file. The Obsoletes dependency allows the original package to be upgraded to your package, while the Conflicts keeps the original package from being installed at the same time as your package.
This should keep an upstream version bump from clobbering your changes.
See http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-dependencies.html