From eb8402e31843366713c1d9d16825a74057c45fdd Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 27 Dec 2005 20:30:20 +0000 Subject: check that abs_path doesn't fail to find (rpm/patch) files --- tools/draklive | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/draklive b/tools/draklive index 9d33c1d0e..ed62ea586 100755 --- a/tools/draklive +++ b/tools/draklive @@ -431,13 +431,13 @@ sub install_system { sub post_install_system { my ($live) = @_; - run_('urpmi', - '--root', - $live->{system}{root}, - map { abs_path($_) } @{$live->{system}{rpms}}) if @{$live->{system}{rpms}}; + my @rpms = map { abs_path($_) } @{$live->{system}{rpms}}; + each_index { !defined $_ and die "unable to find file " . $live->{system}{rpms}[$::i] } @rpms; + run_('urpmi', '--root', $live->{system}{root}, @rpms) if @rpms; - run_('patch', '-p0', '-s', '-N', '-F', 0, '-d', $live->{system}{root}, '-r', '/tmp', '-i', $_) - foreach map { abs_path($_) } @{$live->{system}{patches}}; + my @patches = map { abs_path($_) } @{$live->{system}{patches}}; + each_index { !defined $_ and die "unable to find file " . $live->{system}{patches}[$::i] } @patches; + run_('patch', '-p0', '-s', '-N', '-F', 0, '-d', $live->{system}{root}, '-r', '/tmp', '-i', $_) foreach @patches; #- make sure harddrake is run #- (do it in chroot, or else Storable from the build box may write an incompatible config file) -- cgit v1.2.1