FS#31848 - [dkms] Cannot properly work in case of package upgrade
Attached to Project:
Community Packages
Opened by Laurent Carlier (lordheavy) - Monday, 08 October 2012, 22:34 GMT
Last edited by Allan McRae (Allan) - Saturday, 17 November 2012, 22:57 GMT
Opened by Laurent Carlier (lordheavy) - Monday, 08 October 2012, 22:34 GMT
Last edited by Allan McRae (Allan) - Saturday, 17 November 2012, 22:57 GMT
|
Details
Description:
dkms is used to build fglrx module from catalyst with the following install file: --8<-- post_install() { dkms add -m fglrx -v $1 dkms build -m fglrx -v $1 dkms install -m fglrx -v $1 } post_upgrade() { # removing old version dkms remove -m fglrx -v $2 --all # then installing the new one dkms add -m fglrx -v $1 dkms build -m fglrx -v $1 dkms install -m fglrx -v $1 } pre_remove() { dkms remove -m fglrx -v $1 --all } -->8-- When installing a module managed by dkms, it create a symling from the /usr/src/mod-ver to /var/lib/dkms/mod-ver during the "add" step The problem, when upgrading the package, the old package is removed, breaking the symlink created by dkms, so dkms cannot remove the previous module, leaving old modules in /lib/modules/... and old files/symling in /var/lib/dkms The solution is to change the bahaviour of dkms: copying source files, instead of linking. |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 17 November 2012, 22:57 GMT
Reason for closing: Fixed
Additional comments about closing: pacman 4.0.3-4
Saturday, 17 November 2012, 22:57 GMT
Reason for closing: Fixed
Additional comments about closing: pacman 4.0.3-4
copying.instead.of.linking.pa...
This commit is just wrong:
https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/catalyst-dkms&id=07123edeb2acc83c68525b739eb0fe30e7ea0610
As you said, the old source files are already removed. This is the correct command for pre_upgrade (assuming the PKGBUILD manpage is correct):
- dkms remove -m fglrx -v $1 --all
+ dkms remove -m fglrx -v $2 --all
See also https://wiki.archlinux.org/index.php/Dynamic_Kernel_Module_Support#How_to_create_.install_.2F_dkms.conf_files.3F
(can the affected package be changed to catalyst-dkms?)
"pre_upgrade - The script is run right before files are extracted. Two arguments are passed in the following order: new package version, old package version."
But in pre_upgrade, only $1 is passed; new version, no old version in $2; $2 is empty
I can indeed confirm that the second version argument is never passed (checked both with a test package and the alpm source code).