aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorClaudio Matsuoka <claudio@mandriva.com>2006-11-10 15:33:16 +0000
committerClaudio Matsuoka <claudio@mandriva.com>2006-11-10 15:33:16 +0000
commit8b0bf9a0d12fe8f8535e34220fdc7308f8d16039 (patch)
tree5b83f57fbe1f7071cbde8c682f5f5d7219fd81a1 /iurt2
parent339b742afa86590c0fdbab2726838f147fd54c92 (diff)
downloadiurt-8b0bf9a0d12fe8f8535e34220fdc7308f8d16039.tar
iurt-8b0bf9a0d12fe8f8535e34220fdc7308f8d16039.tar.gz
iurt-8b0bf9a0d12fe8f8535e34220fdc7308f8d16039.tar.bz2
iurt-8b0bf9a0d12fe8f8535e34220fdc7308f8d16039.tar.xz
iurt-8b0bf9a0d12fe8f8535e34220fdc7308f8d16039.zip
Redone some plog and indent changes
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt219
1 files changed, 15 insertions, 4 deletions
diff --git a/iurt2 b/iurt2
index 7b97d3c..b27944c 100755
--- a/iurt2
+++ b/iurt2
@@ -190,7 +190,7 @@ $run{todo} = [ ];
plog("force build for $2 (from $1)");
push @{$run{todo}}, [ $path, $srpm, 1 ]
} else {
- print {$run{LOG}} "ERROR $program_name: $_ could not be build on $run{my_arch}, ignored.\n"
+ plog("ERROR: $_ could not be build on $run{my_arch}, ignored.");
}
}
1
@@ -255,7 +255,7 @@ my $todo = parseCommandLine($program_name, \@ARGV, \@params);
@ARGV and usage($program_name, \@params, "@ARGV, too many arguments");
foreach my $t (@$todo) {
plog(6, "$t->[2]");
- &{$t->[0]}(@{$t->[1]}) or print {$run{LOG}} "ERROR: $t->[2]\n";
+ &{$t->[0]}(@{$t->[1]}) or plog("ERROR: $t->[2]");
}
$run{distro_tag} = $run{distro};
@@ -265,10 +265,12 @@ my $real_arch = `uname -m`;
chomp $real_arch;
my $HOME = $ENV{HOME};
my $configfile = "$HOME/.iurt.$run{distro_tag}.conf";
+
plog(2, "loading config file $configfile");
my $config;
if (-f $configfile) {
- $config = do $configfile or die "FATAL $program_name: syntax error in $configfile";
+ $config = do $configfile
+ or die "FATAL $program_name: syntax error in $configfile";
} else {
$config = {}
}
@@ -434,7 +436,9 @@ if (!$lock && $run{dkms}) {
}
$run{lock} = $lock;
-# cache file name is needed early to remove the manual lock file if the lock mechanism does not work
+# cache file name is needed early to remove the manual lock file if the
+# lock mechanism does not work
+
my $cachefile = "$config->{cache_home}/iurt.$run{distro_tag}.$run{my_arch}.$lock.cache";
$run{cachefile} = $cachefile;
if (!$run{debug} && $run{media} || $run{chroot}) {
@@ -450,6 +454,7 @@ if ($config->{local_spool}) {
} else {
$local_spool = "$config->{local_upload}/iurt/$run{distro_tag}/$run{my_arch}/$run{media}/"
}
+
plog(5, "using $local_spool as local spooler");
if (!-d "$local_spool/log") {
plog(5, "creating local spool $local_spool");
@@ -638,6 +643,12 @@ if ($run{group}) {
$urpmi->order_packages($union_id, \%provides, $luser)
or die "FATAL $program_name: could not order packages";
}
+
+
+#
+#
+#
+
do {
$rebuild = 0;
foreach (my $i ; $i < @{$run{todo}}; $i++) {