mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
* Moved as many system calls as I can over to shellless execution.
There are still a lot that use shell tricks. Should deal with screwey
rpms and file names better though. Closes: #105283
* Display build logs after build failures.
This commit is contained in:
@@ -72,7 +72,7 @@ sub install {
|
||||
my $this=shift;
|
||||
my $deb=shift;
|
||||
|
||||
system("dpkg --no-force-overwrite -i $deb") == 0
|
||||
system("dpkg", "--no-force-overwrite", "-i", $deb) == 0
|
||||
or die "Unable to install";
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ sub unpack {
|
||||
my $file=$this->filename;
|
||||
|
||||
if ($this->have_dpkg_deb) {
|
||||
system("dpkg-deb -x $file ".$this->unpacked_tree) == 0
|
||||
system("dpkg-deb", "-x", $file, $this->unpacked_tree) == 0
|
||||
or die "Unpacking of `$file' failed: $!";
|
||||
}
|
||||
else {
|
||||
@@ -256,8 +256,8 @@ sub prep {
|
||||
# Look for .rej files.
|
||||
die "patch failed with .rej files; giving up"
|
||||
if `find $dir -name "*.rej"`;
|
||||
system('find . -name \'*.orig\' -exec rm {} \\;');
|
||||
chmod 0755,"$dir/debian/rules";
|
||||
system('find', '.', '-name', '*.orig', '-exec', 'rm', '{}', ';');
|
||||
chmod 0755, "$dir/debian/rules";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -384,8 +384,10 @@ sub build {
|
||||
my $this=shift;
|
||||
|
||||
chdir $this->unpacked_tree;
|
||||
system("debian/rules binary >/dev/null") == 0
|
||||
or die "package build failed: $!";
|
||||
my $log=`debian/rules binary`;
|
||||
if ($?) {
|
||||
die "Package build failed. Here's the log:\n", $log;
|
||||
}
|
||||
chdir "..";
|
||||
|
||||
return $this->name."_".$this->version."-".$this->release."_".$this->arch.".deb";
|
||||
@@ -401,7 +403,7 @@ sub cleantree {
|
||||
my $this=shift;
|
||||
my $dir=$this->unpacked_tree || die "The package must be unpacked first!";
|
||||
|
||||
system("rm -rf $dir/debian");
|
||||
system("rm", "-rf", "$dir/debian");
|
||||
}
|
||||
|
||||
=item package
|
||||
|
||||
@@ -352,8 +352,11 @@ sub build {
|
||||
}
|
||||
|
||||
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
|
||||
system("cd $dir; rpm $opts -bb ".$this->name."-".$this->version."-".$this->release.".spec >/dev/null") == 0
|
||||
or die "package build failed";
|
||||
my $command="cd $dir; rpm $opts -bb ".$this->name."-".$this->version."-".$this->release.".spec >/dev/null";
|
||||
my $log=`$command`;
|
||||
if ($?) {
|
||||
die "Package build failed. Here's the log:\n", $log;
|
||||
}
|
||||
|
||||
return $rpm;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ sub install {
|
||||
my $this=shift;
|
||||
my $slp=shift;
|
||||
|
||||
system("slpi $slp") == 0
|
||||
system("slpi", $slp) == 0
|
||||
or die "Unable to install";
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ sub install {
|
||||
my $tgz=shift;
|
||||
|
||||
if (-x "/sbin/installpkg") {
|
||||
system("/sbin/installpkg $tgz") == 0
|
||||
system("/sbin/installpkg", "$tgz") == 0
|
||||
or die "Unable to install";
|
||||
}
|
||||
else {
|
||||
|
||||
2
alien.pl
2
alien.pl
@@ -364,7 +364,7 @@ foreach my $file (@ARGV) {
|
||||
# Make .orig.tar.gz directory?
|
||||
if ($format eq 'deb' && ! $single && $generate) {
|
||||
# Make .orig.tar.gz directory.
|
||||
system("cp -fa ".$package->unpacked_tree." ".$package->unpacked_tree.".orig") == 0
|
||||
system("cp", "-fa", $package->unpacked_tree, $package->unpacked_tree.".orig") == 0
|
||||
or die "cp -fa failed";
|
||||
}
|
||||
|
||||
|
||||
9
debian/changelog
vendored
9
debian/changelog
vendored
@@ -1,3 +1,12 @@
|
||||
alien (7.26) unstable; urgency=low
|
||||
|
||||
* Moved as many system calls as I can over to shellless execution.
|
||||
There are still a lot that use shell tricks. Should deal with screwey
|
||||
rpms and file names better though. Closes: #105283
|
||||
* Display build logs after build failures.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sun, 15 Jul 2001 10:16:20 -0400
|
||||
|
||||
alien (7.25) unstable; urgency=low
|
||||
|
||||
* Treat 'armv4l' arch rpm's as arm architecture.
|
||||
|
||||
Reference in New Issue
Block a user