diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-04-02 17:48:39 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-04-02 17:48:39 +0000 |
commit | e853abede711eff32b901caae2c38c725fd68ca4 (patch) | |
tree | 5ffe0e6f056be70555fdd0624addffc20c7f5262 /lib | |
parent | fd6c8df9f447ebfdccef17d879625648dafbc155 (diff) | |
download | iurt-e853abede711eff32b901caae2c38c725fd68ca4.tar iurt-e853abede711eff32b901caae2c38c725fd68ca4.tar.gz iurt-e853abede711eff32b901caae2c38c725fd68ca4.tar.bz2 iurt-e853abede711eff32b901caae2c38c725fd68ca4.tar.xz iurt-e853abede711eff32b901caae2c38c725fd68ca4.zip |
send mail to admins when a DKMS module wrongly build for current kernel
Diffstat (limited to 'lib')
-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; |