From eff3ab2d81e470d0f628a9988e37bab3395cb4d2 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Tue, 14 Nov 2006 13:14:45 +0000 Subject: Use pwd instead of ./ for packages without full pathname Otherwise when copying the srpm to the chroot it will use ./ from a different cwd. --- iurt2 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/iurt2 b/iurt2 index ded2875..d5614a5 100755 --- a/iurt2 +++ b/iurt2 @@ -177,15 +177,23 @@ $run{todo} = [ ]; $run{rebuild} = 1; $run{distro} = shift @_; $run{my_arch} = shift @_; + foreach (@_) { my ($path, $srpm); - if (m,(.*/)([^/]*.src.rpm)$, && -f $_) { - ($path, $srpm) = ( $1, $2 ) - } elsif (m,([^/]*.src.rpm)$, && -f $_) { - ($path, $srpm) = ( './', $1 ) + + unless (-f $_ && -r $_) { + die "FATAL $program_name: $_ not a file or cannot be read\n" + } + + if (m,(.*/)([^/]*\.src\.rpm)$,) { + ($path, $srpm) = ($1, $2); + } elsif (m,([^/]*\.src\.rpm)$,) { + ($path, $srpm) = (`pwd`, $1); + chomp($path); } else { die "FATAL $program_name: $_ does not seems to be a SRPM\n" } + if (check_arch($_, $run{my_arch})) { plog("force build for $2 (from $1)"); push @{$run{todo}}, [ $path, $srpm, 1 ] -- cgit v1.2.1