diff options
Diffstat (limited to 'lib/Iurt/DKMS.pm')
-rw-r--r-- | lib/Iurt/DKMS.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm index ca3fd78..637aeea 100644 --- a/lib/Iurt/DKMS.pm +++ b/lib/Iurt/DKMS.pm @@ -5,6 +5,7 @@ use base qw(Exporter); use MDV::Distribconf::Build; use Iurt::Chroot qw(clean_chroot add_local_user dump_rpmmacros); use Iurt::Config qw(get_maint get_prefix dump_cache init_cache); +use Iurt::Mail qw(sendmail); use File::NCopy qw(copy); use Iurt::Process qw(sudo); use Iurt::Util qw(plog); @@ -263,6 +264,13 @@ sub dkms_compile { # 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/") { + require Text::Wrap; + sendmail("Iurt admins <$config->{admin}>", '' , "Iurt failure for $name", + Text::Wrap::wrap("", "", join('', map { "$_\n" } + "Modules for $name have been built for the current kernel ($kerver) while they should have been build for $modulesdir.", + "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/"); } $cache->{dkms}{"$realname-kernel-$modulesdir-$realversion"} = 1; |