mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
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:
@@ -331,6 +331,8 @@ package was unpacked, it is time now to wipe out the temporary directory.
|
||||
sub DESTROY {
|
||||
my $this=shift;
|
||||
|
||||
my $exitcode=$?;
|
||||
|
||||
return if (! defined $this->unpacked_tree || $this->unpacked_tree eq '');
|
||||
# This should never happen, but it pays to check.
|
||||
if ($this->unpacked_tree eq '/') {
|
||||
@@ -344,7 +346,9 @@ sub DESTROY {
|
||||
|
||||
$this->do('rm', '-rf', $this->unpacked_tree)
|
||||
or die "unable to delete temporary directory '".$this->unpacked_tree."': $!";
|
||||
$this->unpacked_tree('');
|
||||
$this->unpacked_tree('');
|
||||
|
||||
$?=$exitcode;
|
||||
}
|
||||
|
||||
=item AUTOLOAD
|
||||
|
||||
Reference in New Issue
Block a user