Print a nice error message when attempting to build a deb from a package of an unsupported architecture. Closes: #592625

This commit is contained in:
Joey Hess
2010-08-30 17:02:03 -04:00
parent 291db35466
commit 3a44b767ac
2 changed files with 10 additions and 0 deletions

View File

@@ -488,6 +488,14 @@ Build a deb.
sub build { sub build {
my $this=shift; my $this=shift;
# Detect architecture mismatch and abort with a comprehensible
# error message.
my $arch=$this->arch;
my $ret=system("dpkg-architecture", "-i".$arch);
if ($ret != 0) {
die $this->filename." is for architecture ".$this->arch." ; the package cannot be built on this system"."\n";
}
chdir $this->unpacked_tree; chdir $this->unpacked_tree;
my $log=$this->runpipe(1, "debian/rules binary 2>&1"); my $log=$this->runpipe(1, "debian/rules binary 2>&1");
chdir ".."; chdir "..";

2
debian/changelog vendored
View File

@@ -3,6 +3,8 @@ alien (8.82) UNRELEASED; urgency=low
* Use debhelper compat level v7 when building packages. All changes * Use debhelper compat level v7 when building packages. All changes
since v4 seem safe for alien's generated rules files. since v4 seem safe for alien's generated rules files.
* Use dh_prep instead of deprecated dh_clean -k. * Use dh_prep instead of deprecated dh_clean -k.
* Print a nice error message when attempting to build a deb from a package
of an unsupported architecture. Closes: #592625
-- Joey Hess <joeyh@debian.org> Sun, 23 May 2010 18:55:14 -0400 -- Joey Hess <joeyh@debian.org> Sun, 23 May 2010 18:55:14 -0400