--- cpan2rpm.orig 2004-10-15 01:59:43.000000000 -0700 +++ cpan2rpm 2004-10-15 12:13:52.000000000 -0700 @@ -165,7 +165,7 @@ my %opts = (); my @args = grep !/^-D$/, @ARGV; - $ARGS = join " ", @args; + $ARGS = join " ", map {/\s/ ? "'$_'" : $_} @args; my $ret = GetOptions(\%opts, keys %desc); exec("$^X -d $0 " . join(" ", @args)) if $opts{D}; @@ -240,7 +240,8 @@ $RPMDIR{ARCH} = getrpm_macdef("_arch"); chkdirs(); - $info{buildarch} ||= $RPMDIR{ARCH}; + # sets empty string if not --buildarch and --spec-only + $info{buildarch} ||= $info{"spec-only"} ? "" : $RPMDIR{ARCH}; # set module download method