Avoid uninitialized value warning when debian/rules fails to run due to alien being run in a noexec directory. Closes: #579216

* Avoid uninitialized value warning when debian/rules fails to run
  due to alien being run in a noexec directory. Closes: #579216
* Prevent DESTROY stomping on alien's exit code sometimes.
This commit is contained in:
Joey Hess
2010-04-28 11:30:44 -04:00
parent 7e84fd2a26
commit b4bdd3818d
3 changed files with 19 additions and 3 deletions

View File

@@ -491,10 +491,14 @@ sub build {
chdir $this->unpacked_tree;
my $log=$this->runpipe(1, "debian/rules binary 2>&1");
if ($?) {
chdir "..";
my $err=$?;
if ($err) {
if (! defined $log) {
die "Package build failed; could not run generated debian/rules file.\n";
}
die "Package build failed. Here's the log:\n", $log;
}
chdir "..";
return $this->name."_".$this->version."-".$this->release."_".$this->arch.".deb";
}