* Corrected precidence problem that made alien not catch mkdir of the work

directory failing if the directory already existed (and let it delete the
     existing directory). Closes: #181061
   * Fixed several other instances of the same precidence problem in the code.
This commit is contained in:
joey
2003-02-15 20:46:09 +00:00
parent 8b6a5ed7f8
commit 40e12efe45
9 changed files with 365 additions and 29 deletions

View File

@@ -87,7 +87,7 @@ sub install {
my $this=shift;
my $deb=shift;
system("dpkg", "--no-force-overwrite", "-i", $deb) == 0
(system("dpkg", "--no-force-overwrite", "-i", $deb) == 0)
or die "Unable to install";
}
@@ -237,11 +237,11 @@ sub unpack {
my $file=$this->filename;
if ($this->have_dpkg_deb) {
system("dpkg-deb", "-x", $file, $this->unpacked_tree) == 0
(system("dpkg-deb", "-x", $file, $this->unpacked_tree) == 0)
or die "Unpacking of `$file' failed: $!";
}
else {
system("ar -p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)") == 0
(system("ar -p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)") == 0)
or die "Unpacking of `$file' failed: $!";
}
@@ -293,14 +293,14 @@ sub prep {
my $this=shift;
my $dir=$this->unpacked_tree || die "The package must be unpacked first!";
mkdir "$dir/debian", 0755 ||
mkdir("$dir/debian", 0755) ||
die "mkdir $dir/debian failed: $!";
# Use a patch file to debianize?
if (defined $this->patchfile) {
# The -f passed to zcat makes it pass uncompressed files
# through without error.
system("zcat -f ".$this->patchfile." | (cd $dir; patch -p1)") == 0
(system("zcat -f ".$this->patchfile." | (cd $dir; patch -p1)") == 0)
or die "patch error: $!";
# Look for .rej files.
die "patch failed with .rej files; giving up"