dkms install problems
Matt Domsch
Matt_Domsch at dell.com
Mon Aug 27 20:46:36 CDT 2007
On Mon, Aug 27, 2007 at 09:41:43PM -0400, Silacci, Lucas wrote:
> It's funny you should mention this...
>
> One of the ways I looked into working around my "lstart" issue was
> simply changing the version number of the driver I was installing under
> dkms even though there was no actual code change associated with it. I
> then ran into this issue here where the driver binary was identical to
> the previous version and was removed.
>
> I thought of just using --force in my install, but I was afraid that
> --force would mean that the install would ingnore errors that I wouldn't
> want ignored. There might be reasons for the install failing that I
> definitely want to get the error messages for and fail the dkms install
> for and --force may cause them to be ignored.
>
> So if there's nothing else that --force means during an install, I'm all
> for making rpm_safe_upgrade imply force. If there are other errors that
> it might hide, then maybe we would want to have a different option?
As it stands, dkms install --force only overrides the version check.
So, it's safe for --rpm_save_upgrade to imply --force. This is what
I committed to the git tree.
I haven't looked at your patch for lstart yet, but will.
Thanks,
Matt
--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
commit 81ef95a7afd5e315b4409f6a78edaece22d76520
Author: Matt Domsch <Matt_Domsch at dell.com>
Date: Fri Aug 24 22:55:44 2007 -0500
dkms install --rpm_safe_upgrade implies --force
diff --git a/dkms b/dkms
index 7d1d965..0e68509 100755
--- a/dkms
+++ b/dkms
@@ -630,7 +630,7 @@ function check_version_sanity ()
kernels_ver_checksum=`echo $kernels_ver_string | awk {'print $3'}`
dkms_ver_checksum=`echo $dkms_ver_string | awk {'print $3'}`
fi
-
+
if [ -n "$kernels_ver_checksum" -a -n "$dkms_ver_checksum" -a \
"$kernels_ver_checksum" == "$dkms_ver_checksum" -a -z "$force" ]; then
echo $"" >&2
@@ -1106,6 +1106,14 @@ function install_module()
exit 5
fi
+ # if upgrading using rpm_safe_upgrade, go ahead and force the install
+ # else we can wind up with the first half of an upgrade failing to install anything,
+ # while the second half of the upgrade, the removal, then succeeds, leaving us with
+ # nothing installed.
+ if [ -n "$rpm_safe_upgrade" ]; then
+ force="true"
+ fi
+
# Check this version against what is already in the kernel
check_version_sanity "${kernelver_array[0]}" "${arch_array[0]}"
More information about the DKMS-devel
mailing list