yum-versionlock allows you to keep a package at a specific version and not update it beyond, even if updates are available in one of the repos. I have often used this because an update of some package caused severe bugs and I had to downgrade again until they were fixed. But without yum-versionlock, the automatic update will just reinstall the buggy package again. Completely disabling automatic updates is not a good idea because security updates will then be delayed until I have time to do updates manually. This also becomes cumbersome if you have lots of affected machines. When dnf replaces yum, the functionality of yum-versionlock is lost unless something similar is added to dnf. When taking the functionality of yum-versionlock, you make it considerably harder for users to work around bugs by downgrading a package. So please add an equivalent to yum-versionlock to dnf. Thank you.
Thanks for the report. What's the advantage of having yum-versionlock instead of specifying exclude in /etc/dnf/dnf.conf [1]? Can package versionlocked be removed and installed if not installed already? [1] http://dnf.readthedocs.org/en/latest/conf_ref.html#options-for-both-main-and-repo
When you exclude a package, it is completely gone from any kind of mangagement through dnf or yum. You can't install or update it through dnf anymore. Versionlock instead keeps it managed by yum, it just makes sure that just the specified version is used. So you can reinstall the package through yum and get exactly the specified version even if newer ones are available. It also makes sure that the locked package is not obsoleted by something else. You can use wildcards for package names and versions to ease handling. When you manage lots of machines, you can deploy the versionlock file to all machines, even ones that don't have the package installed yet. If some other package then requires it later on, yum-versionlock makes sure that exactly the wanted version is installed and not the newest one. Using exclude would require you do manage the dependencies by hand in this case.
(In reply to Gerd v. Egidy from comment #2) > When you exclude a package, it is completely gone from any kind of > mangagement through dnf or yum. You can't install or update it through dnf > anymore. > > Versionlock instead keeps it managed by yum, it just makes sure that just > the specified version is used. So you can reinstall the package through yum > and get exactly the specified version even if newer ones are available. It > also makes sure that the locked package is not obsoleted by something else. > You can use wildcards for package names and versions to ease handling. > > When you manage lots of machines, you can deploy the versionlock file to all > machines, even ones that don't have the package installed yet. If some other > package then requires it later on, yum-versionlock makes sure that exactly > the wanted version is installed and not the newest one. Using exclude would > require you do manage the dependencies by hand in this case. I agree with you, I have several packages needs to lock to specific version. And I don't want to handling the dependencies one-by-one by hand.
I have a similar use case, i need to lock specific versions of a package, so please port this plugin.
*** Bug 1220109 has been marked as a duplicate of this bug. ***
Implemented in PR https://github.com/rpm-software-management/dnf-plugins-extras/pull/30
(In reply to Michael Mráka from comment #6) > Implemented in PR > https://github.com/rpm-software-management/dnf-plugins-extras/pull/30 Hi Michael, thanks for stepping up and implementing this plugin. I did some short tests by installing a clean F22 and patch the dnf-plugins-extras package with your code: Locking packages works as expected, even with package dependencies, reinstalls and everything. Very good. But "dnf versionlock clear" does not work at all, all locks stay in place. Also adding a lock sometimes does strange things: consider package "foo" of which we have version 1.1-1 installed, but some repos also offer 1.0-1 and 2.0-1. When you now call "dnf versionlock add foo" you get: Adding versionlock on: foo-0:1.1-1.* Adding versionlock on: foo-0:1.0-1.* Adding versionlock on: foo-0:2.0-1.* And there is something else I'd also improve: when you call "dnf versionlock add packagethatisnotinstalled", you get exactly zero output (except the metadata expiration info you always get). I suggest to give some warning message to the user.
Pull request has been updated according to the comments above.
*** Bug 1271623 has been marked as a duplicate of this bug. ***
Jan, can you please fill Fixed in version field with the version including the fix? I don't see a bodhi message here saying that the rpm has been published to stable and it's not clear in which Fedora release it's included. For instance, for oVirt project we'd like to have the fix backported to Fedora 22.
It's dnf-plugins-extras-0.0.9-1, i.e. you have to have installed either python-dnf-plugins-extras-versionlock-0.0.9-1.fc22 or python3-dnf-plugins-extras-versionlock-0.0.9-1.fc22.