diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/DKMS.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm index 5c793a2..e7a1abf 100644 --- a/lib/Iurt/DKMS.pm +++ b/lib/Iurt/DKMS.pm @@ -227,11 +227,15 @@ sub dkms_compile { system("sudo rm -f $dkms_conf"); $ok or next; - plog('DEBUG', "symlink from /lib/modules/$modulesdir/build to /usr/src/$sourcedir"); + # symlink modules build dir if not using devel package + my $modules_build_dir = "$chroot_tmp/lib/modules/$modulesdir/build"; + if (! -e $modules_build_dir) { + plog('DEBUG', "symlink from $modules_build_dir to /usr/src/$sourcedir"); - if (system("sudo ln -sf /usr/src/$sourcedir $chroot_tmp/lib/modules/$modulesdir/build")) { - plog('ERR', "linking failed ($!)"); - next; + if (system("sudo ln -sf /usr/src/$sourcedir $modules_build_dir")) { + plog('ERR', "linking failed ($!)"); + next; + } } foreach my $cmd ('add', 'build') { |