diff --git a/Alien/Package.pm b/Alien/Package.pm index 3efbc2c..84c94c8 100644 --- a/Alien/Package.pm +++ b/Alien/Package.pm @@ -186,12 +186,12 @@ package was unpacked, it is time now to wipe out the temporary directory. sub DESTROY { my $this=shift; - return if (defined $this->unpacked_tree || $this->unpacked_tree eq ''); + return if (! defined $this->unpacked_tree || $this->unpacked_tree eq ''); # This should never happen, but it pays to check. if ($this->unpacked_tree eq '/') { die "alien internal error: unpacked_tree is set to `/'. Please file a bug report!"; } - system 'rm', '-rf', $this->unpacked_tree && + system ('rm', '-rf', $this->unpacked_tree) && die "unable to delete temporary directory `".$this->unpacked_tree."`: $!"; $this->unpacked_tree(''); } diff --git a/Alien/Package/Deb.pm b/Alien/Package/Deb.pm index 2f38c9b..cdab7a9 100644 --- a/Alien/Package/Deb.pm +++ b/Alien/Package/Deb.pm @@ -61,6 +61,7 @@ Using dpkg-deb is a lot more future-proof, but the system may not have it. sub read_file { my $this=shift; $this->SUPER::read_file(@_); + my $file=$this->filename; # Extract the control file from the deb file. my @control; @@ -164,6 +165,7 @@ Implment the unpack method to unpack a deb file. sub unpack { my $this=shift; $this->SUPER::unpack(@_); + my $file=$this->filename; if ($this->have_dpkg_deb) { system("dpkg-deb -x $file ".$this->unpacked_tree) &&