-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using rpm_safe_upgrade correctly? #25
Comments
--rpm_safe-upgrade prevents the uninstallation of the driver in case a package with the same version-release is reinstalled. |
You can refer to dkms package policy. |
If you do not have any more questions about this .i would like to close this case in this week. |
Hi, Sorry, I don't see any content at http://agile.us.dell.com/Agile. The dkms man page says this about rpm_safe_upgrade:
So it's not just intended for uninstallation protection during reinstallation of the same version-release, it's specifically called out as the right thing to do when the module-version hasn't changed, but the release has. What I've been finding in that circumstance is that the %post script for the new package is run, The current behavior of It seems like for dkms to work as advertised with rpm_safe_upgrade, it should write out the rpm_safe_upgrade file before exiting due to module-version match, like in the patch I'm attaching here. Thanks, |
I cloned my own dkms repo and made a branch to make it easier to see the change, which you can find here. Thanks! |
Hello, have you had a chance to look at this patch? I still believe that Thanks, |
I confirm the fix is needed when using I have the following package installed:
With this content in the
Then I roll out a patch for the
Basically my modules will not have a patch, which is not the intended behaviour. |
As a side note to this, wouldn't be clean and less complicated to just use these in the
You basically got the same result without extra code and extra options. |
@yuzaipiaofei @bitness what do you think? I'm in favor of entirely removing the |
Hi Simone, After testing the setup you suggest for getting rid of But what if, instead, we put the dkms add, build, and install commands into |
Any chance for merging #44 (or alternative fix)? I'm seeing this issue too. There is also another (similar) issue - the check on "remove" action isn't done, if no kernel is installed - for example in chroot build environment. But that's a minor issue and easy to workaround - simply install some kernel package. |
#44 was merged long time ago. |
Hello,
I have an RPM that uses dkms with --rpm_safe_upgrade in its %post and %preun sections, and it uses them essentially the same way as in dkms's sample.spec:
As far as I can tell, though, this doesn't work when upgrading from one release of the package to the next, without the module version changing.
dkms add
with--rpm_safe_upgrade
exits out with a complaint that the module version is already added, but it exits before writing the rpm_safe_upgrade lock file. Whendkms remove
is called later in the%preun section, it sees no lock file and so uninstalls the module.Shouldn't add_module() write the rpm_safe_upgrade lock file before exiting due to an existing module with the same version? I hacked my /usr/sbin/dkms to do this and it all worked as expected.
Thanks!
-lars
The text was updated successfully, but these errors were encountered: