diff options
author | Pascal Terjan <pterjan@mageia.org> | 2012-03-12 18:13:42 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2012-03-12 18:13:42 +0000 |
commit | 8d9f708ca0b3613a99a2b85f25ef6fad76f16b02 (patch) | |
tree | 3b1e900740ad848d6fd93ee5cfcbf24f192600d6 /lib | |
parent | e480bd5ef56ce52442aa1330a30f03fbf04ff2f9 (diff) | |
download | iurt-8d9f708ca0b3613a99a2b85f25ef6fad76f16b02.tar iurt-8d9f708ca0b3613a99a2b85f25ef6fad76f16b02.tar.gz iurt-8d9f708ca0b3613a99a2b85f25ef6fad76f16b02.tar.bz2 iurt-8d9f708ca0b3613a99a2b85f25ef6fad76f16b02.tar.xz iurt-8d9f708ca0b3613a99a2b85f25ef6fad76f16b02.zip |
Get rid of ERR log level
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/Chroot.pm | 4 | ||||
-rw-r--r-- | lib/Iurt/Config.pm | 2 | ||||
-rw-r--r-- | lib/Iurt/DKMS.pm | 14 | ||||
-rw-r--r-- | lib/Iurt/Process.pm | 6 | ||||
-rw-r--r-- | lib/Iurt/Urpmi.pm | 2 | ||||
-rw-r--r-- | lib/Iurt/Util.pm | 4 |
6 files changed, 15 insertions, 17 deletions
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 $@; } |