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

@@ -487,6 +487,14 @@ Build a deb.
sub build {
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;
my $log=$this->runpipe(1, "debian/rules binary 2>&1");