mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
fixed tree cleaning
This commit is contained in:
@@ -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('');
|
||||
}
|
||||
|
||||
@@ -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) &&
|
||||
|
||||
Reference in New Issue
Block a user