mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
* Use --target noarch instead of --target=noarch when building rpms.
The latter used to work, but no longer does, due to some change in rpm or
popt. It also has to come after the -bb.
* Trap stderr of rpm and debian/rules building packages, and only display if
the build fails.
This commit is contained in:
@@ -348,14 +348,14 @@ sub build {
|
||||
|
||||
# This is the new command line arcgument to make noarch
|
||||
# rpms. It appeared in rpm version 3.
|
||||
$opts="--target=noarch" if $rpmarch eq 'noarch';
|
||||
$opts="--target noarch" if $rpmarch eq 'noarch';
|
||||
}
|
||||
|
||||
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
|
||||
my $command="cd $dir; rpm $opts -bb ".$this->name."-".$this->version."-".$this->release.".spec >/dev/null";
|
||||
my $log=`$command`;
|
||||
my $command="cd $dir; rpm -bb $opts ".$this->name."-".$this->version."-".$this->release.".spec";
|
||||
my $log=`$command 2>&1`;
|
||||
if ($?) {
|
||||
die "Package build failed. Here's the log:\n", $log;
|
||||
die "Package build failed. Here's the log of the command ($command):\n", $log;
|
||||
}
|
||||
|
||||
return $rpm;
|
||||
|
||||
Reference in New Issue
Block a user