aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-03-05 08:18:37 +0000
committerFlorent Villard <warly@mandriva.com>2006-03-05 08:18:37 +0000
commita5504a8c1878177972e2fe222dc08f6abea42451 (patch)
tree8bedeb6b402c91cfd46d123dce883f17b182cb84 /iurt2
parentc46ec9a8f1c6e4241e1fea3918c9e839d7dc1ff4 (diff)
downloadiurt-a5504a8c1878177972e2fe222dc08f6abea42451.tar
iurt-a5504a8c1878177972e2fe222dc08f6abea42451.tar.gz
iurt-a5504a8c1878177972e2fe222dc08f6abea42451.tar.bz2
iurt-a5504a8c1878177972e2fe222dc08f6abea42451.tar.xz
iurt-a5504a8c1878177972e2fe222dc08f6abea42451.zip
do not try to load unionfs module if already loaded; perform a depmod before loading unionfs; fix dump_macros creation bug
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt218
1 files changed, 16 insertions, 2 deletions
diff --git a/iurt2 b/iurt2
index 907508d..246074f 100755
--- a/iurt2
+++ b/iurt2
@@ -307,7 +307,19 @@ dump_rpmmacros("$chroot/home/builder/.rpmmacros") or die "FATAL iurt: could not
my $unionfs_dir;
if ($run{unionfs}) {
# FIXME need to grep /proc/modules not ot try to load it if already loaded
- system("sudo /sbin/modprobe -f unionfs");
+ open my $modules, '/proc/modules';
+ my $ok;
+ while (my $m = <$modules>) {
+ if ($m =~ /unionfs/) {
+ $ok = 1;
+ last
+ }
+ }
+ if (!$ok) {
+ print {$run{LOG}} "iurt: adding unionfs module\n" if $run{verbose} > 0;
+ system("sudo /sbin/depmod -a");
+ system("sudo /sbin/modprobe -f unionfs");
+ }
$unionfs_dir = "$config->{local_home}/iurt_unionfs$debug_tag";
clean_all_unionfs($unionfs_dir);
-d $unionfs_dir or mkdir $unionfs_dir
@@ -924,7 +936,8 @@ sub perform_command {
if ($err || $opt{error_regexp} && $output =~ /$opt{error_regexp}/) {
if ($opt{mail} && $config->{sendmail} && !$config->{no_mail}{$opt{mail}}) {
if (! ($cache->{warning}{$opt{hash}}{$opt{mail}} % $opt{freq})) {
- sendmail($opt{mail}, $opt{cc} , $opt{error} , $output, 0, 0, $opt{debug_mail});
+ my $cc = join ',', grep { !$config->{no_mail}{$_} } split ',', $opt{cc};
+ sendmail($opt{mail}, $cc, $opt{error} , $output, 0, 0, $opt{debug_mail});
} elsif ($config->{admin}) {
sendmail($config->{admin}, '' , $opt{error}, $output, 0, 0, $opt{debug_mail});
}
@@ -980,6 +993,7 @@ sub dump_rpmmacros {
\%distribution $config->{distribution}
\%vendor $config->{vendor}
\%packager $config->{packager}};
+ close $f;
-f $file or return 0;
1
}