aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/DKMS.pm28
1 files changed, 5 insertions, 23 deletions
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm
index 9af638f..088ad06 100644
--- a/lib/Iurt/DKMS.pm
+++ b/lib/Iurt/DKMS.pm
@@ -206,20 +206,6 @@ sub dkms_compile {
# install kernel and dkms if not already installed
my $ok = 1;
- # some of the dkms modules does not handle correclty the -k option and use uname -r to
- # find kernel modules dir.
- # FIXME must send a mail to the maintainer for that problem
- # try to workarround with a symlink
- if ($kerver ne $modulesdir) {
- if (-e "$chroot_tmp/lib/modules/$kerver") {
- system("sudo mv $chroot_tmp/lib/modules/$kerver $chroot_tmp/lib/modules/$kerver.tmp");
- }
- if (system("sudo ln -sf $modulesdir $chroot_tmp/lib/modules/$kerver")) {
- plog('ERR', "ERROR: creating a link from $chroot_tmp/lib/modules/$modulesdir to $kerver failed ($!)");
- next;
- }
- }
-
# make sure dkms commands are not run in rpm post scripts
my $dkms_conf = $chroot_tmp . "/etc/dkms/framework.conf";
system("sudo sh -c 'mkdir -p `dirname $dkms_conf`; echo exit 0 > $dkms_conf'");
@@ -261,9 +247,11 @@ sub dkms_compile {
system($command);
}
- # now need to move dkms build if it wrongly assume a build for the running kernel
- plog("search module in /var/lib/dkms/$realname/$realversion/$kerver/");
if ($kerver ne $modulesdir && -d "$chroot_tmp/var/lib/dkms/$realname/$realversion/$kerver/") {
+ # some of the dkms modules do not handle correclty the -k option
+ # and use uname -r to find kernel modules dir
+ plog('ERR', "ERROR: modules have been built for current kernel ($kerver) instead of $modulesdir");
+ system("sudo rm -rf $chroot_tmp/var/lib/dkms/$realname/$realversion/$kerver");
require Text::Wrap;
sendmail("Iurt admins <$config->{admin}>", '' , "Iurt failure for $name",
Text::Wrap::wrap("", "", join('', map { "$_\n" }
@@ -271,7 +259,7 @@ sub dkms_compile {
"Please report to the maintainer of $name",
)),
"Iurt the rebuild bot <$config->{admin}>", 0);
- system("sudo mv $chroot_tmp/var/lib/dkms/$realname/$realversion/$kerver/ $chroot_tmp/var/lib/dkms/$realname/$realversion/$modulesdir/");
+ next;
}
$cache->{dkms}{"$realname-kernel-$modulesdir-$realversion"} = 1;
if (system("sudo chroot $chroot_tmp /usr/sbin/dkms mkrpm -m $realname -v $realversion --rpm_safe_upgrade -k $modulesdir")) {
@@ -298,12 +286,6 @@ sub dkms_compile {
join(" or ", map { "$chroot_tmp$_/*.rpm" } @dkms_rpm_dirs) .
" to $dkms_spool/$media ($!)\n") if !$copied;
- if ($kerver ne $modulesdir) {
- system("sudo rm -f $chroot_tmp/lib/modules/$kerver");
- if (-e "$chroot_tmp/lib/modules/$kerver.tmp") {
- system("sudo mv $chroot_tmp/lib/modules/$kerver.tmp $chroot_tmp/lib/modules/$kerver");
- }
- }
process_dkms_queue($self, 0, 0, $media, "$dkms_spool/$media");
# compile dkms modules
}