aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorClaudio Matsuoka <claudio@mandriva.com>2006-11-14 13:14:45 +0000
committerClaudio Matsuoka <claudio@mandriva.com>2006-11-14 13:14:45 +0000
commiteff3ab2d81e470d0f628a9988e37bab3395cb4d2 (patch)
tree97c1b7186de61bb5a020e780312f00a9fddd580f /iurt2
parentf0d6982373029612007959d308bf7545f136034b (diff)
downloadiurt-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-xiurt216
1 files 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 ]