简体   繁体   中英

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.

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. 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

(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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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