diff options
author | Florent Villard <warly@mandriva.com> | 2005-12-15 07:19:40 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2005-12-15 07:19:40 +0000 |
commit | 76e8edfa5bda0403c03a537ebc34216667bb1547 (patch) | |
tree | 326a5357d7a76ca40af875a23bcfc6dbd4bab334 | |
parent | 0e35dccf3d45ad4d145ec5e1efccc36f1a758eea (diff) | |
download | iurt-76e8edfa5bda0403c03a537ebc34216667bb1547.tar iurt-76e8edfa5bda0403c03a537ebc34216667bb1547.tar.gz iurt-76e8edfa5bda0403c03a537ebc34216667bb1547.tar.bz2 iurt-76e8edfa5bda0403c03a537ebc34216667bb1547.tar.xz iurt-76e8edfa5bda0403c03a537ebc34216667bb1547.zip |
stupid me mixing % and !%
-rwxr-xr-x | iurt2 | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -118,20 +118,23 @@ if (-f $cachefile) { my %big; my %srpm_version; my @wrong_rpm; -foreach my $arch (@{$config->{supported_arch}}) { - my $rpms_dir = "$config->{repository}/$distro_version/$arch/media/$media/"; +# FIXME need to check if scanning all the architecture is needed (except of noarch unsynchronity this should not be mandatory) +# in that case, @supported_arch may be removed +# +#foreach my $arch (@{$config->{supported_arch}}) { + my $rpms_dir = "$config->{repository}/$distro_version/$my_arch/media/$media/"; print "iurt: checking current packages in $rpms_dir\n"; opendir my $rpmdir, $rpms_dir or next; foreach my $rpm (readdir $rpmdir) { my ($rarch, $srpm) = update_srpm($rpms_dir, $rpm); $rarch or next; $big{$rpm} = 1; - $cache->{queue}{$srpm}{$arch} = 1; + $cache->{queue}{$srpm}{$my_arch} = 1; $cache->{queue}{$srpm}{$rarch} = 1; check_version($srpm) } - closedir $rpmdir -} + closedir $rpmdir; +#} my %maint; @@ -142,6 +145,7 @@ my %rep; my %done_rpm; # # FIXME all the rep but the first one are cleaned +# this may not be usefull anymore # foreach my $dir ("$config->{repository}/$distro_version/SRPMS/$media/", @special_srpm_dir) { print "iurt: checking SRPMS dir $dir\n"; @@ -251,7 +255,8 @@ foreach my $t (@todo) { hash => "install_deps_$srpm", timeout => 600, cc => $cc, - error_regexp => 'cannot be installed|database locked', + error_regexp => 'cannot be installed', + wait_regexp => 'database locked', log => "$local_spool/log/") or next; perform_command("sudo chroot $chroot rpm -qa", hash => "rpm_qa_$srpm", @@ -380,7 +385,7 @@ sub sendmail { my $sender = encode_mimewords($to); my $subject = encode_mimewords($subject); print $MAIL "To: $sender\n"; - if ($cc) { $cc = endcode_mimewords($cc); print $MAIL "Cc: $cc\n" } + if ($cc) { $cc = encode_mimewords($cc); print $MAIL "Cc: $cc\n" } print $MAIL "From: $from\n"; print $MAIL "Subject: $subject\n"; print $MAIL "\n"; @@ -439,9 +444,12 @@ sub perform_command { die unless $@ eq "alarm\n"; # propagate unexpected errors return 0 } else { + if ($output =~ /$opt{wait_regexp}/) { + return 0 + } if ($? || $opt{error_regexp} && $output =~ /$opt{error_regexp}/) { if ($opt{mail} && $config->{sendmail}) { - if ($cache->{warning}{$opt{hash}}{$my_arch}{$opt{mail}} % $opt{freq}) { + if (! $cache->{warning}{$opt{hash}}{$my_arch}{$opt{mail}} % $opt{freq}) { sendmail($opt{mail}, $opt{cc} , $opt{error} , $output, 0, 0); } elsif ($config->{admin}) { sendmail($config->{admin}, '' , $opt{error}, $output, 0, 0); |