aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorClaudio Matsuoka <claudio@mandriva.com>2006-11-07 10:37:35 +0000
committerClaudio Matsuoka <claudio@mandriva.com>2006-11-07 10:37:35 +0000
commita166fa810a83a67ef31cdfc59687c7c04bf368b9 (patch)
tree9e215a3a79d18e611c0c210c9545906469accba4 /iurt2
parent2c49ff0e36feca0ae5e505efd6e878d816211506 (diff)
downloadiurt-a166fa810a83a67ef31cdfc59687c7c04bf368b9.tar
iurt-a166fa810a83a67ef31cdfc59687c7c04bf368b9.tar.gz
iurt-a166fa810a83a67ef31cdfc59687c7c04bf368b9.tar.bz2
iurt-a166fa810a83a67ef31cdfc59687c7c04bf368b9.tar.xz
iurt-a166fa810a83a67ef31cdfc59687c7c04bf368b9.zip
Using plog for log message.
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt219
1 files changed, 17 insertions, 2 deletions
diff --git a/iurt2 b/iurt2
index 62b0fac..b92500e 100755
--- a/iurt2
+++ b/iurt2
@@ -521,8 +521,15 @@ if ($run{group}) {
$urpmi->set_local_media($local_spool);
$urpmi->order_packages($union_id, \%provides, $luser) or die "FATAL $program_name: could not order packages";
}
+
+
+#
+# The build loop
+#
+
do {
$rebuild = 0;
+
foreach (my $i ; $i < @{$run{todo}}; $i++) {
my ($dir, $srpm, $status) = @{$run{todo}[$i]};
@@ -737,7 +744,7 @@ process_queue($config, \%run, \@wrong_rpm);
dump_cache_par(\%run);
-print {$run{LOG}} "ERROR $program_name: RPM with a wrong SRPM name\n" if @wrong_rpm;
+plog("ERROR: RPM with a wrong SRPM name") if @wrong_rpm;
if (@wrong_rpm && open my $file, ">$local_spool/log/wrong_srpm_names.log") {
foreach (@wrong_rpm) {
print $file "$_->[1] -> $_->[0] (", $cache->{rpm_srpm}{$_->[1]},")\n";
@@ -762,8 +769,16 @@ if ($run{unionfs}) {
remove_chroot(\%run, $dir, \&clean_all_unionfs)
}
unlink "$run{pidfile_home}/$run{pidfile}" if $run{pidfile};
+
+
+
exit;
+
+#
+# Subroutines
+#
+
sub clean_all_unionfs {
my ($run, $unionfs_dir) = @_;
plog(2, "Cleaning old unionfs remaining dir in $unionfs_dir");
@@ -1064,7 +1079,7 @@ sub search_packages {
closedir $rpmdir
}
$to_compile
-}
+}
sub add_sudoers {
my ($run, $chroot, $user) = @_;