DKMS and weak-modules (kABI)
Matt Domsch
Matt_Domsch at dell.com
Fri Feb 9 16:30:21 CST 2007
On Fri, Feb 09, 2007 at 09:34:53AM -0600, Matt Domsch wrote:
> As for weak modules, you're right, DKMS never expected all those
> symlinks. I suspect the proper thing is for DKMS to see that the file
> it's going to replace is a symlink, not make a backup copy of it,
> and simply not know anything about it at all. It's handled by
> weak-modules, not by DKMS then.
Something (untested) like this.
--- dkms-2.0.13 Fri Jun 30 13:13:04 2006
+++ dkms Fri Feb 9 16:17:09 2007
@@ -998,17 +1009,17 @@ function install_module()
while [ "$count" -lt ${#built_module_name[@]} ]; do
echo $""
echo $"${dest_module_name[$count]}$module_suffix:"
- local module_count=`find $lib_tree -name ${dest_module_name[$count]}$module_suffix | wc -l | awk {'print $1'}`
+ local module_count=`find $lib_tree -name ${dest_module_name[$count]}$module_suffix -type f | wc -l | awk {'print $1'}`
echo $" - Original module"
if ! [ -L "$dkms_tree/$module/kernel-${kernelver_array[0]}-${arch_array[0]}" ]; then
local archive_pref1="$lib_tree/updates/${dest_module_name[$count]}$module_suffix"
local archive_pref2="$lib_tree${dest_module_location[$count]}/${dest_module_name[$count]}$module_suffix"
local archive_pref3=""
- [ "$module_count" -eq 1 ] && archive_pref3="`find $lib_tree -name ${dest_module_name[$count]}$module_suffix`"
+ [ "$module_count" -eq 1 ] && archive_pref3="`find $lib_tree -name ${dest_module_name[$count]}$module_suffix -type f`"
local original_module=""
local found_orginal=""
for original_module in $archive_pref1 $archive_pref2 $archive_pref3; do
- if [ -e "$original_module" ]; then
+ if [ -f "$original_module" ]; then
echo $" - Found $original_module"
echo $" - Storing in $dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/"
echo $" - Archiving for uninstallation purposes"
@@ -1035,7 +1046,7 @@ function install_module()
echo $" - $module_count named ${dest_module_name[$count]}$module_suffix in $lib_tree/"
echo $" - All instances of this module will now be stored for reference purposes ONLY"
echo $" - Storing in $dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/"
- for module_dup in `find $lib_tree -name ${dest_module_name[$count]}$module_suffix`; do
+ for module_dup in `find $lib_tree -name ${dest_module_name[$count]}$module_suffix -type f`; do
dup_tree=`echo $module_dup | sed "s#^$lib_tree##" | sed "s#${dest_module_name[$count]}$module_suffix##"`
echo $" - Stored $module_dup"
mkdir -p "$dkms_tree/$module/original_module/${kernelver_array[0]}/${arch_array[0]}/collisions/$dup_tree"
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
More information about the DKMS-devel
mailing list