diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-04-19 11:27:16 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-04-19 12:52:52 +0200 |
commit | 4edab9788a284886731f41a1bb522ba5d814a142 (patch) | |
tree | 50b4023bdd4d039917d6d3e286c16adfe2c9606e | |
parent | 434931c792ecc5cbf29aa605289c4d7cf43c511b (diff) | |
download | iurt-4edab9788a284886731f41a1bb522ba5d814a142.tar iurt-4edab9788a284886731f41a1bb522ba5d814a142.tar.gz iurt-4edab9788a284886731f41a1bb522ba5d814a142.tar.bz2 iurt-4edab9788a284886731f41a1bb522ba5d814a142.tar.xz iurt-4edab9788a284886731f41a1bb522ba5d814a142.zip |
perl_checker cleanups
-rwxr-xr-x | iurt | 2 | ||||
-rw-r--r-- | lib/Iurt/Config.pm | 4 | ||||
-rw-r--r-- | lib/Iurt/File.pm | 4 | ||||
-rwxr-xr-x | ulri | 9 |
4 files changed, 9 insertions, 10 deletions
@@ -519,7 +519,7 @@ my %config_usage = ( if ($run{config_usage}) { config_usage(\%config_usage, $config); exit; -}; +} if (!$config->{repository}) { die "FATAL $program_name: no repository have been defined (use --repository to specify one on the command line"; diff --git a/lib/Iurt/Config.pm b/lib/Iurt/Config.pm index 8426b03..a1a1e84 100644 --- a/lib/Iurt/Config.pm +++ b/lib/Iurt/Config.pm @@ -51,9 +51,9 @@ sub config_usage { $Data::Dumper::Indent = 0; $Data::Dumper::Terse = 1; foreach my $k (sort keys %$config_usage) { - print (" $k: $config_usage->{$k}{desc}\n\t\tdefault: ", + print " $k: $config_usage->{$k}{desc}\n\t\tdefault: ", Data::Dumper->Dump([ $config_usage->{$k}{default} ]), - ", current: ", Data::Dumper->Dump([ $config->{$k} ]), "\n"); + ", current: ", Data::Dumper->Dump([ $config->{$k} ]), "\n"; } print "\n\n"; } diff --git a/lib/Iurt/File.pm b/lib/Iurt/File.pm index 618aab2..0d09a79 100644 --- a/lib/Iurt/File.pm +++ b/lib/Iurt/File.pm @@ -16,7 +16,7 @@ sub check_upload_tree { # Squash double slashes for cosmetics $todo =~ s!/+!/!g; - opendir (my $dir, $todo); + opendir(my $dir, $todo); plog('INFO', "check dir: $todo"); foreach my $f (readdir $dir) { @@ -84,7 +84,7 @@ sub cleanup_failed_build { if (-d "$done_dir/$prefix") { make_path("$fail_dir/$prefix"); - for my $file (glob "$done_dir/$prefix/*") { + foreach my $file (glob "$done_dir/$prefix/*") { plog('DEBUG', "moving $file to $fail_dir/$prefix/"); move($file, "$fail_dir/$prefix/"); } @@ -86,7 +86,7 @@ my %config_usage = ( localhost => { iurt => { user => 'builder', - command => "iurt --copy_srpm --group --config local_spool /home/builder/iurt/__DIR__ --no_rsync --chrooted-urpmi -m __MEDIA__ -- http://localhost/distrib/ -p \"__PACKAGER__\" -r __TARGET__ __ARCH__", + command => qq(iurt --copy_srpm --group --config local_spool /home/builder/iurt/__DIR__ --no_rsync --chrooted-urpmi -m __MEDIA__ -- http://localhost/distrib/ -p "__PACKAGER__" -r __TARGET__ __ARCH__), packages => '/home/builder/iurt/', } , }, @@ -283,7 +283,7 @@ sub todo_func { my @deps; open my $FILE, "<$todo/$f/$m/$s/$r"; - while(my $line = <$FILE>) { + while (my $line = <$FILE>) { chomp $line; plog('DEBUG', "Adding dependency $line ($prefix)"); push @deps,$line; @@ -536,7 +536,7 @@ foreach my $prefix (sort keys %pkg_tree) { # $dep was not uploaded yet, so it's too early to build this one plog('DEBUG', "Dependent build $dep not ready ($prefix)"); $ready = 0; - if (glob "$reject/*/*/*/$dep.youri" || glob "$done/*/*/*/${dep}_*.fail") { + if (glob("$reject/*/*/*/$dep.youri") || glob("$done/*/*/*/${dep}_*.fail")) { plog('ERROR', "Dependent build $dep has failed"); $failed_dep = 1; } @@ -546,10 +546,9 @@ foreach my $prefix (sort keys %pkg_tree) { plog('DEBUG', "Dependent build(s) failed, rejecting this one"); foreach my $media (keys %{$ent->{media}}) { my $path = $ent->{media}{$media}{path}; - my $target = $ent->{target}; make_path("$reject/$path"); foreach my $srpm (@{$ent->{srpms}}) { - move("$todo/$path/${prefix}_$srpm","$reject/$path/${prefix}_$srpm"); + move("$todo/$path/${prefix}_$srpm", "$reject/$path/${prefix}_$srpm"); } } next; |