diff options
author | Claudio Matsuoka <claudio@mandriva.com> | 2006-11-14 13:14:45 +0000 |
---|---|---|
committer | Claudio Matsuoka <claudio@mandriva.com> | 2006-11-14 13:14:45 +0000 |
commit | eff3ab2d81e470d0f628a9988e37bab3395cb4d2 (patch) | |
tree | 97c1b7186de61bb5a020e780312f00a9fddd580f /iurt2 | |
parent | f0d6982373029612007959d308bf7545f136034b (diff) | |
download | iurt-eff3ab2d81e470d0f628a9988e37bab3395cb4d2.tar iurt-eff3ab2d81e470d0f628a9988e37bab3395cb4d2.tar.gz iurt-eff3ab2d81e470d0f628a9988e37bab3395cb4d2.tar.bz2 iurt-eff3ab2d81e470d0f628a9988e37bab3395cb4d2.tar.xz iurt-eff3ab2d81e470d0f628a9988e37bab3395cb4d2.zip |
Use pwd instead of ./ for packages without full pathname
Otherwise when copying the srpm to the chroot it will use ./ from
a different cwd.
Diffstat (limited to 'iurt2')
-rwxr-xr-x | iurt2 | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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 ] |