mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-25 14:00:17 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e1d2c9fa4 |
@@ -187,30 +187,45 @@ sub unpack {
|
|||||||
#
|
#
|
||||||
# Test to see if the package contains the prefix directory already.
|
# Test to see if the package contains the prefix directory already.
|
||||||
if (defined $this->prefixes && ! -e "$workdir/".$this->prefixes) {
|
if (defined $this->prefixes && ! -e "$workdir/".$this->prefixes) {
|
||||||
|
my $relocate=1;
|
||||||
|
|
||||||
# Get the files to move.
|
# Get the files to move.
|
||||||
my @filelist=glob("$workdir/*");
|
my @filelist=glob("$workdir/*");
|
||||||
|
|
||||||
# Now, make the destination directory.
|
# Now, make the destination directory.
|
||||||
my $collect=$workdir;
|
my $collect=$workdir;
|
||||||
foreach (split m:/:, $this->prefixes) {
|
foreach (split m:/:, $this->prefixes) {
|
||||||
if ($_ ne '') { # this keeps us from using anything but relative paths.
|
if ($_ ne '') { # this keeps us from using anything but relative paths.
|
||||||
$collect.="/$_";
|
$collect.="/$_";
|
||||||
|
if (-d $collect) {
|
||||||
|
# The package contains a parent
|
||||||
|
# directory of the relocation
|
||||||
|
# directory. Since it's impossible
|
||||||
|
# to move a parent directory into
|
||||||
|
# its child, bail out and do
|
||||||
|
# nothing.
|
||||||
|
$relocate=0;
|
||||||
|
last;
|
||||||
|
}
|
||||||
$this->do("mkdir", $collect) || die "unable to mkdir $collect: $!";
|
$this->do("mkdir", $collect) || die "unable to mkdir $collect: $!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Now move all files in the package to the directory we made.
|
|
||||||
if (@filelist) {
|
|
||||||
$this->do("mv", @filelist, "$workdir/".$this->prefixes)
|
|
||||||
or die "error moving unpacked files into the default prefix directory: $!";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Deal with relocating conffiles.
|
if ($relocate) {
|
||||||
my @cf;
|
# Now move all files in the package to the directory we made.
|
||||||
foreach my $cf (@{$this->conffiles}) {
|
if (@filelist) {
|
||||||
$cf=$this->prefixes.$cf;
|
$this->do("mv", @filelist, "$workdir/".$this->prefixes)
|
||||||
push @cf, $cf;
|
or die "error moving unpacked files into the default prefix directory: $!";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deal with relocating conffiles.
|
||||||
|
my @cf;
|
||||||
|
foreach my $cf (@{$this->conffiles}) {
|
||||||
|
$cf=$this->prefixes.$cf;
|
||||||
|
push @cf, $cf;
|
||||||
|
}
|
||||||
|
$this->conffiles([@cf]);
|
||||||
}
|
}
|
||||||
$this->conffiles([@cf]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# rpm files have two sets of permissions; the set in the cpio
|
# rpm files have two sets of permissions; the set in the cpio
|
||||||
|
|||||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@@ -1,3 +1,10 @@
|
|||||||
|
alien (8.71) unstable; urgency=low
|
||||||
|
|
||||||
|
* Deal with rpms that relocate ie, /usr into /usr/local, and don't
|
||||||
|
try to move /usr into /usr/local in this case. Closes: #470905
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Fri, 14 Mar 2008 13:35:33 -0400
|
||||||
|
|
||||||
alien (8.70) unstable; urgency=low
|
alien (8.70) unstable; urgency=low
|
||||||
|
|
||||||
* Extract prefixes field before extracting scripts so that
|
* Extract prefixes field before extracting scripts so that
|
||||||
|
|||||||
Reference in New Issue
Block a user