aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2017-10-02 23:27:29 +0100
committerPascal Terjan <pterjan@mageia.org>2017-10-02 23:27:29 +0100
commit57c5285861e5863038b8963ec02217e28c14c290 (patch)
tree3d6927d0ffdd01514d7f968cac05ebbc457713fb
parentbfe820ac7748cee596cef74840eb4dcc4d9dfa3a (diff)
downloadiurt-57c5285861e5863038b8963ec02217e28c14c290.tar
iurt-57c5285861e5863038b8963ec02217e28c14c290.tar.gz
iurt-57c5285861e5863038b8963ec02217e28c14c290.tar.bz2
iurt-57c5285861e5863038b8963ec02217e28c14c290.tar.xz
iurt-57c5285861e5863038b8963ec02217e28c14c290.zip
Kill status_mail
-rwxr-xr-xiurt89
-rw-r--r--lib/Iurt/Urpmi.pm12
2 files changed, 2 insertions, 99 deletions
diff --git a/iurt b/iurt
index 6b077dd..664173d 100755
--- a/iurt
+++ b/iurt
@@ -277,12 +277,6 @@ $run{todo} = [];
($run{repository}) = @_;
1;
} , "Setting the repository" ],
- [ "", "status", 1, "<mail>",
- "Send a status mail to the provided mail address",
- sub {
- ($run{status_mail}) = @_;
- 1;
- }, "Setting status mail option" ],
[ "", "with", 1, "<flag>",
"Use specified --with flag with rpm (can be used multiple times)",
sub {
@@ -685,7 +679,6 @@ if ($run{chroot} || !-d "$chroot/dev") {
# now exit if there is nothing to do and it was just a cleaning pass
if ($run{no_compile} || !@{$run{todo}} && !$run{debug} && !$run{shell} && !$run{rebuild}) {
- send_status_mail(\%run, $config, $cache) if $run{status_mail};
plog("no package to compile :(");
unlink "$run{pidfile_home}/$run{pidfile}" if $run{pidfile};
exit();
@@ -1077,8 +1070,6 @@ if (@wrong_rpm && open my $file, ">$local_spool/log/wrong_srpm_names.log") {
}
}
-send_status_mail(\%run, $config, $cache) if $run{status_mail};
-
if ($config->{rsync_to} && !$run{no_rsync}) {
# remove some old and very big log files not to saturate the server
system(qq(find $local_spool/log/ -name "*.log" \\( -size +$config->{log_size_limit} -or -mtime +$config->{log_size_date} \\) -exec rm -f {} \\;));
@@ -1452,86 +1443,6 @@ sub write_status {
}
}
-#
-# CM: FIXME: should notify in case of recreate_srpm_failure
-#
-
-sub send_status_mail {
- my ($run, $config, $cache) = @_;
- my %output;
-
- print "iurt compilation status\n";
-
- foreach my $rpm (keys %{$run->{status}}) {
- next if $run->{status}{$rpm} =~ /ok|not_on_this_arch/;
-
- if ($run->{status}{$rpm} eq 'missing_buildrequires') {
- foreach my $missing (keys %{$cache->{needed}{$rpm}}) {
- my $h = $cache->{needed}{$rpm}{$missing};
- my $maint = $h->{maint} || 'Other';
- my $package = $h->{package};
- if ($package) {
- push @{$output{missing}{$maint}{$package}{$missing}{$h->{version}}}, $rpm;
- } else {
- $output{missing}{$maint}{$rpm}{$missing}{$h->{version}} = 1;
- }
- }
- } elsif ($run->{status}{$rpm} eq 'build_failure') {
- my ($maint) = get_maint($run, $rpm);
- if ($cache->{buildrequires}{$rpm}) {
- push @{$output{buildrequires}{$maint}}, $rpm;
- } else {
- push @{$output{build}{$maint}}, $rpm;
- }
- } elsif (!$run->{status}{$rpm}) {
- # need to find something more usefull to do at that point
- next;
- }
- }
-
- my $text = "*** Missing buildrequires tag in specfile ***\n";
- foreach my $maint (keys %{$output{buildrequires}}) {
- $text .= "\n$maint\n";
- foreach my $pack (keys %{$output{missing}{$maint}}) {
- foreach my $missing (keys %{$cache->{buildrequires}{$pack}}) {
- my $rpms = $cache->{buildrequires}{$pack}{$missing};
- if (@$rpms) {
- $text .= " $pack should have a buildrequires on @$rpms (for $missing-devel)\n";
- } else {
- $text .= " $pack should have a buildrequires for $missing-devel\n";
- }
- }
- }
- }
-
- $text = "*** Missing dependencies ***\n";
- foreach my $maint (keys %{$output{missing}}) {
- $text .= "\n$maint\n";
- foreach my $pack (keys %{$output{missing}{$maint}}) {
- foreach my $missing (%{$output{missing}{$maint}{$pack}}) {
- my $h = $output{missing}{$maint}{$pack}{$missing};
- foreach my $version (keys %$h) {
- if (ref $h->{$version}) {
- $text .= " $pack should be recompile because\n $missing " . ($version ? "$version " : '') . "is not provided anymore\n";
- $text .= " to compile " . join("\n ", @{$h->{$version}}) . "\n";
- } else {
- $text .= " $pack needs $missing " . ($version ? "$version " : '') . "\n";
- }
- }
- }
- }
- }
- $text .= "\n*** Build failure ***\n";
- foreach my $maint (keys %{$output{build}}) {
- $text .= "\n$maint\n";
- foreach my $rpm (@{$output{build}{$maint}}) {
- $text .= " $rpm (see $config->{log_url}/$run{distro_tag}/$run{my_arch}/$run->{media}/log/$rpm/)\n";
- }
- }
- print "$text\n";
- sendmail($run->{status_mail}, '' , "Iurt report for $run->{my_arch}/$run->{media}", $text, "Iurt the rebuild bot <$config->{admin}>", 0, $config);
-}
-
sub find_provides {
my ($pack_provide, $p) = @_;
my @rpm;
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index 64be2ea..a4300ad 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -7,7 +7,7 @@ use File::NCopy qw(copy);
use MDV::Distribconf::Build;
use Iurt::Chroot qw(add_local_user create_temp_chroot);
use Iurt::Process qw(perform_command clean_process sudo);
-use Iurt::Config qw(get_maint get_package_prefix);
+use Iurt::Config qw(get_package_prefix);
use Iurt::Util qw(plog);
use urpm;
@@ -419,16 +419,8 @@ sub _install_callback {
my $version2 = shift @missing_deps;
$version ||= $version2 || 0;
my $p = $pack_provide->{$missing_deps} || $missing_deps;
- my ($missing_package_name, $first_maint);
- if ($missing_package !~ /\.src$/) {
- ($first_maint, $missing_package_name) = get_maint($run, $missing_package);
- plog(5, "likely $missing_package_name need to be rebuilt ($first_maint)");
- } else {
- $missing_package = '';
- }
- my ($other_maint) = get_maint($run, $p);
- plog('FAIL', "missing dep: $missing_deps ($other_maint) missing_package $missing_package ($first_maint)");
+ plog('FAIL', "missing dep: $missing_deps missing_package $missing_package");
$run->{status}{$title} = 'missing_dep';
my $maintainer = $opt->{maintainer};