From 8def605ebe319568d39ae4ad5b18ed37d8dc0a30 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 5 Jan 2010 15:58:28 +0000 Subject: Fail when deps would not be installed for a src.rpm --- lib/Iurt/Urpmi.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index b52204b..e460b59 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -423,7 +423,7 @@ sub install_packages { my $config = $self->{config}; my $cache = $run->{cache}; my $program_name = $run->{program_name}; - my $ok; + my $ok = 1; my @to_install; plog('DEBUG', "installing @packages"); @@ -532,6 +532,7 @@ sub install_packages { dump_cache_par($run); die "FATAL $program_name: Could not have urpmi working !"; } + $ok = 0; } # URPMI saying ok or not, we check this anyway. So that's why @@ -540,7 +541,7 @@ sub install_packages { plog(1, "ERROR: rpm-build is missing!"); $ok = 0; } - elsif (!@rpm || are_installed($chroot_tmp, @rpm)) { + elsif ($ok && (!@rpm || are_installed($chroot_tmp, @rpm))) { plog("installation successful"); $ok = 1; } -- cgit v1.2.1