aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xemi4
-rwxr-xr-xiurt214
-rw-r--r--lib/Iurt/Chroot.pm4
-rw-r--r--lib/Iurt/Config.pm2
-rw-r--r--lib/Iurt/DKMS.pm14
-rw-r--r--lib/Iurt/Process.pm6
-rw-r--r--lib/Iurt/Urpmi.pm2
-rw-r--r--lib/Iurt/Util.pm4
-rwxr-xr-xulri6
9 files changed, 27 insertions, 29 deletions
diff --git a/emi b/emi
index 0270b0e..68e9a3e 100755
--- a/emi
+++ b/emi
@@ -264,11 +264,11 @@ sub upload_prefix_in_section {
plog('INFO', "upload succeeded");
} else {
# should send a mail or something
- plog('ERR', "upload failed ($!), rejecting files in $reject/$path/");
+ plog('ERROR', "upload failed ($!), rejecting files in $reject/$path/");
make_path("$reject/$path");
foreach my $rpm (@{$pkg_tree{$prefix}{section}{$section}{rpms}}) {
link "$done/$path/${prefix}_$rpm", "$reject/$path/${prefix}_$rpm";
- plog('ERR', "ERROR: link of $rpm failed ($!)");
+ plog('ERROR', "ERROR: link of $rpm failed ($!)");
}
link "$done/$path/$prefix.youri", "$reject/$path/$prefix.youri";
diff --git a/iurt2 b/iurt2
index bed57d9..225ab42 100755
--- a/iurt2
+++ b/iurt2
@@ -377,7 +377,7 @@ my $todo = parseCommandLine($program_name, \@ARGV, \@params);
@ARGV and usage($program_name, \@params, "@ARGV, too many arguments");
foreach my $t (@$todo) {
plog('DEBUG', $t->[2]);
- &{$t->[0]}(@{$t->[1]}) or plog('ERR', $t->[2]);
+ &{$t->[0]}(@{$t->[1]}) or plog('ERROR', $t->[2]);
}
# Use the real verbose level
@@ -623,7 +623,7 @@ if (-f $cachefile && $run{use_cache}) {
plog('INFO', "loading cache file $cachefile");
$cache = eval(cat_($cachefile))
- or plog('ERR', "FATAL: could not load cache $cachefile ($!)");
+ or plog('ERROR', "FATAL: could not load cache $cachefile ($!)");
if (!$cache) {
opendir my $cache_dir, $config->{cache_home};
@@ -639,7 +639,7 @@ if (-f $cachefile && $run{use_cache}) {
plog('NOTIFY', "loading alternate cache file $cachefile");
$cache = eval(cat_($cachefile))
- or plog('ERR', "FATAL: could not load cache $cachefile ($!)");
+ or plog('ERROR', "FATAL: could not load cache $cachefile ($!)");
}
$clear_cache = 0 if $cache;
}
@@ -1075,14 +1075,14 @@ retry:
} else {
plog('OK', "build successful, copying packages to $local_spool.");
- system("cp $chroot_tmp/home/$luser/rpm/RPMS/*/*.rpm $local_spool &>/dev/null") and plog('ERR', "ERROR: could not copy rpm files from $chroot_tmp/home/$luser/rpm/RPMS/ to $local_spool ($!)");
+ system("cp $chroot_tmp/home/$luser/rpm/RPMS/*/*.rpm $local_spool &>/dev/null") and plog('ERROR', "ERROR: could not copy rpm files from $chroot_tmp/home/$luser/rpm/RPMS/ to $local_spool ($!)");
}
if ($run{copy_srpm}) {
# replace the old srpm
unlink "$local_spool/$old_srpm";
- system("cp $chroot_tmp/home/$luser/rpm/SRPMS/$srpm $local_spool &>/dev/null") and plog('ERR', "ERROR: could not copy $srpm from $chroot_tmp/home/$luser/rpm/SRPMS/ to $local_spool ($!)");
+ system("cp $chroot_tmp/home/$luser/rpm/SRPMS/$srpm $local_spool &>/dev/null") and plog('ERROR', "ERROR: could not copy $srpm from $chroot_tmp/home/$luser/rpm/SRPMS/ to $local_spool ($!)");
}
process_queue($config, \%run, \@wrong_rpm, 1);
}
@@ -1101,9 +1101,9 @@ retry:
$rebuild = 0;
if ($done == @{$run{todo}}) {
plog('OK', "all packages succesfully compiled, copying packages to $local_spool.");
- system("cp $chroot_tmp/home/$luser/rpm/RPMS/*/*.rpm $local_spool &>/dev/null") and plog('ERR', "ERROR: could not copy rpm files from $chroot_tmp/home/$luser/rpm/RPMS/ to $local_spool ($!)");
+ system("cp $chroot_tmp/home/$luser/rpm/RPMS/*/*.rpm $local_spool &>/dev/null") and plog('ERROR', "ERROR: could not copy rpm files from $chroot_tmp/home/$luser/rpm/RPMS/ to $local_spool ($!)");
if ($run{copy_srpm}) {
- system("cp $chroot_tmp/home/$luser/rpm/SRPMS/*.src.rpm $local_spool &>/dev/null") and plog('ERR', "ERROR: could not copy SRPMS from $chroot_tmp/home/$luser/rpm/SRPMS/ to $local_spool ($!)");
+ system("cp $chroot_tmp/home/$luser/rpm/SRPMS/*.src.rpm $local_spool &>/dev/null") and plog('ERROR', "ERROR: could not copy SRPMS from $chroot_tmp/home/$luser/rpm/SRPMS/ to $local_spool ($!)");
}
} else {
plog('FAIL', "some packages could not be compiled.");
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index b85e7b5..eb1bea5 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -191,7 +191,7 @@ sub add_local_user {
if ($uid) {
if (!sudo($run, $config, "--useradd", $chroot_tmp, $luser, $uid)) {
- plog('ERR', "ERROR: setting userid $uid to $luser in " .
+ plog('ERROR', "ERROR: setting userid $uid to $luser in " .
"$chroot_tmp failed, checking the chroot");
check_build_chroot($run->{chroot_path}, $run->{chroot_tar}, $run,
$config) or return;
@@ -459,7 +459,7 @@ sub create_chroot {
}
} else {
plog('DEBUG', "can't open $tmp_chroot/var/log/qa");
- plog('ERR', "can't check chroot, recreating");
+ plog('ERROR', "can't check chroot, recreating");
$rebuild = 1;
}
}
diff --git a/lib/Iurt/Config.pm b/lib/Iurt/Config.pm
index 2005542..c2fbe6d 100644
--- a/lib/Iurt/Config.pm
+++ b/lib/Iurt/Config.pm
@@ -218,7 +218,7 @@ sub dump_cache_par {
} else {
plog('WARN', "WARNING: locking the cache file $filename failed (status $status $!), try to lock manually");
if (-f "$filename.lock") {
- plog('ERR', "ERROR: manual file lock exist, do not save the cache");
+ plog('ERROR', "ERROR: manual file lock exist, do not save the cache");
} else {
open my $lock, ">$filename.lock";
print $lock $$;
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm
index 868770c..535e822 100644
--- a/lib/Iurt/DKMS.pm
+++ b/lib/Iurt/DKMS.pm
@@ -46,13 +46,13 @@ sub search_dkms {
my $cache = $run->{cache};
my $path = "$root/$distro/$arch";
if (!-d $path) {
- plog('ERR', "ERROR: $path is not a directory");
+ plog('ERROR', "ERROR: $path is not a directory");
return;
}
my $distrib = MDV::Distribconf::Build->new($path);
plog("getting media config from $path");
if (!$distrib->loadtree) {
- plog('ERR', "ERROR: $path does not seem to be a distribution tree");
+ plog('ERROR', "ERROR: $path does not seem to be a distribution tree");
return;
}
$distrib->parse_mediacfg;
@@ -137,7 +137,7 @@ sub search_dkms {
}
my $source = find { $kernel_source{$_} } @choices;
if (!$source) {
- plog('ERR', "ERROR: no source for kernel $kernel (tried " . join(", ", @choices) . ")");
+ plog('ERROR', "ERROR: no source for kernel $kernel (tried " . join(", ", @choices) . ")");
next;
}
plog("dkms module $module version $version should be compiled for kernel $kernel ($source)");
@@ -188,7 +188,7 @@ sub dkms_compile {
add_local_user($chroot_tmp, $run, $config, $luser, $run->{uid});
if (!dump_rpmmacros($run, $config, "$chroot_tmp/home/$luser/.rpmmacros") || !dump_rpmmacros($run, $config, "$chroot_tmp/root/.rpmmacros")) {
- plog('ERR', "ERROR: adding rpmmacros failed");
+ plog('ERROR', "ERROR: adding rpmmacros failed");
return;
}
@@ -221,7 +221,7 @@ sub dkms_compile {
if (!$installed{$pkg}) {
plog('DEBUG', "install package: $pkg");
if (!$urpmi->install_packages("dkms-$name-$version", $chroot_tmp, $local_spool, {}, "dkms_$pkgname", "[DKMS] package $pkg installation error", { maintainer => $config->{admin} }, $pkg)) {
- plog('ERR', "ERROR: error installing package $pkg");
+ plog('ERROR', "ERROR: error installing package $pkg");
$ok = 0;
last;
}
@@ -238,7 +238,7 @@ sub dkms_compile {
plog('DEBUG', "symlink from $modules_build_dir to /usr/src/$sourcedir");
if (system("sudo ln -sf /usr/src/$sourcedir $modules_build_dir")) {
- plog('ERR', "linking failed ($!)");
+ plog('ERROR', "linking failed ($!)");
next;
}
}
@@ -254,7 +254,7 @@ sub dkms_compile {
if ($kerver ne $modulesdir && -d "$chroot_tmp/var/lib/dkms/$realname/$realversion/$kerver/") {
# some of the dkms modules do not handle correclty the -k option
# and use uname -r to find kernel modules dir
- plog('ERR', "ERROR: modules have been built for current kernel ($kerver) instead of $modulesdir");
+ plog('ERROR', "ERROR: modules have been built for current kernel ($kerver) instead of $modulesdir");
system("sudo rm -rf $chroot_tmp/var/lib/dkms/$realname/$realversion/$kerver");
require Text::Wrap;
sendmail("Iurt admins <$config->{admin}>", '' , "Iurt failure for $name",
diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm
index 88aa544..f53c5e0 100644
--- a/lib/Iurt/Process.pm
+++ b/lib/Iurt/Process.pm
@@ -49,7 +49,7 @@ sub check_pid {
close $test_PID;
if (!$pid) {
- plog('ERR', "ERROR: invalid pidfile ($pid), should be <pid>");
+ plog('ERROR', "ERROR: invalid pidfile ($pid), should be <pid>");
unlink $pidfile;
}
@@ -253,7 +253,7 @@ sub perform_command {
if (ref $opt{wait_regexp}{$wr}) {
$inc = $opt{wait_regexp}{$wr}(\%opt, $output);
}
- plog('ERR', "ERROR: $wr !");
+ plog('ERROR', "ERROR: $wr !");
sendmail($config->{admin}, '' , "$opt{hash} on $run->{my_arch} for $run->{media}: could not proceed", "$wr\n\n$comment\n$output", "Iurt the rebuild bot <$config->{admin}>", $opt{debug_mail}, $config) if $opt{wait_mail};
}
@@ -271,7 +271,7 @@ sub perform_command {
if (!$call_ret || $kill || $err || $opt{error_regexp} && $fulloutput =~ /$opt{error_regexp}/) {
- plog('ERR', "ERROR: call_ret=$call_ret kill=$kill err=$err ($opt{error_regexp})");
+ plog('ERROR', "ERROR: call_ret=$call_ret kill=$kill err=$err ($opt{error_regexp})");
if ($opt{log} && $config->{log_url}) {
$comment = qq(See $config->{log_url}/$run->{distro_tag}/$run->{my_arch}/$run->{media}/log/$opt{srpm}/\n\n$comment);
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index 6923b91..ad8709c 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -230,7 +230,7 @@ sub add_media {
debug_mail => $run->{debug})) {
}
if (!check_media_added($chroot, $regexp)) {
- plog('ERR', "ERROR iurt could not add media into the chroot");
+ plog('ERROR', "ERROR iurt could not add media into the chroot");
return;
}
1;
diff --git a/lib/Iurt/Util.pm b/lib/Iurt/Util.pm
index 3e99154..8a06584 100644
--- a/lib/Iurt/Util.pm
+++ b/lib/Iurt/Util.pm
@@ -53,11 +53,9 @@ my @plog_prefix = (
"D: ",
);
-# FIXME: remove one of ERROR or ERR, check and fix everywhere else
my %plog_level = (
NONE => 0,
ERROR => 1,
- ERR => 1,
WARN => 2,
MSG => 3,
FAIL => 4,
@@ -114,7 +112,7 @@ sub plog {
}
sub pdie {
- plog('ERR', "@_");
+ plog('ERROR', "@_");
die $@;
}
diff --git a/ulri b/ulri
index bd93c01..d9eaee9 100755
--- a/ulri
+++ b/ulri
@@ -378,7 +378,7 @@ foreach my $prefix (keys %pkg_tree) {
make_path($done_dir);
if (sget($remote, "$prefix_dir/$result",
"$result_file.new")) {
- plog('ERR', "copying $result from $host failed ($!)");
+ plog('ERROR', "copying $result from $host failed ($!)");
$error = 1;
last;
} elsif (move("$result_file.new", $result_file)) {
@@ -441,7 +441,7 @@ foreach my $prefix (keys %pkg_tree) {
}
if (!$status) {
- plog('ERR', "build bot died on $host, reschedule compilation");
+ plog('ERROR', "build bot died on $host, reschedule compilation");
next bot;
}
@@ -453,7 +453,7 @@ foreach my $prefix (keys %pkg_tree) {
mkdir("$fail_dir/$prefix");
if (sget($remote, "$prefix_dir/*", "$fail_dir/$prefix")) {
- plog('ERR', "copying from $host:$prefix_dir/ " .
+ plog('ERROR', "copying from $host:$prefix_dir/ " .
"to $fail_dir/ failed ($!)");
$compildone->{$prefix}{$media}{$arch} = 0;
# clean the log on the compilation machine