简体   繁体   English

程序包从另一个存储库更新另一个程序包

[英]Package updating another package from another repository

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. 存储库基于rpm软件包。

Is it generally possible to mark my own package to update another package ? 通常可以标记自己的软件包来更新另一个软件包吗?

Going to answer to my own question, yes yum treats all repositories equally. 要回答我自己的问题,是的,yum平等地对待所有存储库。 So all I need to do was setting package name the same and increased version number. 因此,我要做的就是将包名称设置为相同,并增加版本号。

To test it you just need to create a yum repo and setup yum to use your repository for more info look here 要测试它,您只需要创建一个yum仓库并设置yum即可使用您的存储库获取更多信息,请看这里

(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. 最终,原始软件包可能会增加其版本号,使其超出您使用的版本,在这种情况下,可能有人进行了yum更新并最终升级回原始软件包。

To avoid this problem, you can change the package name slightly, and add some Obsoletes and Conflicts dependencies to your spec file. 为避免此问题,您可以稍微更改程序包名称,并向您的spec文件添加一些“过时和冲突”依赖项。 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. Obsoletes依赖性使原始程序包可以升级到您的程序包,而“冲突”使原始程序包不能与您的程序包同时安装。

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 参见http://docs.fedoraproject.org/zh-CN/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-dependencies.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM