dkms install problems
Matt Domsch
Matt_Domsch at dell.com
Fri Aug 24 22:25:44 CDT 2007
On Sat, Aug 25, 2007 at 03:46:58AM +0100, Z? wrote:
> Em S?bado, 25 de Agosto de 2007, Matt_Domsch at dell.com escreveu:
> > please post the rpm -qp --scripts madwifi-0.9.4-* dkms-madwifi-0.9.4-*
> >
> > I'm not sure what those scripts are doing when they invoke dkms remove.
> >
> > Thanks,
> > Matt
> [root at asus x86_64]# rpm -q --scripts madwifi-0.9.4-* dkms-madwifi-0.9.4-*
> postinstall scriptlet (using /bin/sh):
> dkms add -m madwifi -v 0.9.4-0.svn2669.1mde2007.1 --rpm_safe_upgrade || :
> dkms build -m madwifi -v 0.9.4-0.svn2669.1mde2007.1 --rpm_safe_upgrade || :
> dkms install -m madwifi -v 0.9.4-0.svn2669.1mde2007.1 --rpm_safe_upgrade || :
> preuninstall scriptlet (using /bin/sh):
> dkms remove -m madwifi -v
> 0.9.4-0.svn2669.1mde2007.1 --rpm_safe_upgrade --all || :
ok, I see what's happening. You're upgrading, which (effectively) rpm
installs the new package, then rpm erases the old package. However,
the 'dkms install' failed in the first step because you already had
module with the same version and source checksum installed, so it
refused to install the new one (and the %post script doesn't specify
--force). Then the rpm erase step runs, and erases the previously
installed module. So, now you've got none installed by dkms.
In this case, you should be able to run:
# dkms install -m madwifi -v 0.9.4-0.svn2669.1mde2007.1
and be back to a working driver. It's already built, just not
installed by dkms.
Now, we don't have a way to flag to the 'dkms remove' command, except
via the temp file written by --rpm_safe_upgrade, that the
install failed, so maybe it shouldn't do the erase. But that's kind
of ugly too. You told it to install, it should install. and you said
'rpm -U' so it should uninstall the old one too.
I suspect the right answer is to add --force to the end of the 'dkms
install' command in the %post scriptlet. That would cause the install
to happen even if it didn't need to, so the following uninstall
doesn't leave you without a driver installed...
-Matt
--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
More information about the DKMS-devel
mailing list