mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e1d2c9fa4 | ||
|
|
3c8631f8fd | ||
|
|
17bcd710f7 | ||
|
|
ac38739a74 | ||
|
|
dbf7fdfa5b | ||
|
|
15b2f7ff92 |
@@ -78,18 +78,20 @@ sub scan {
|
||||
POSTUN => 'postrm',
|
||||
);
|
||||
|
||||
# These fields need no translation except case.
|
||||
foreach (qw{name version release arch changelogtext summary
|
||||
description copyright prefixes}) {
|
||||
$fieldtrans{uc $_}=$_;
|
||||
}
|
||||
|
||||
# Use --queryformat to pull out all the fields we need.
|
||||
foreach my $field (keys(%fieldtrans)) {
|
||||
$_=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} $file");
|
||||
$field=$fieldtrans{$field};
|
||||
$_='' if $_ eq '(none)';
|
||||
$this->$field($_);
|
||||
foreach my $field (qw{NAME VERSION RELEASE ARCH CHANGELOGTEXT
|
||||
SUMMARY DESCRIPTION COPYRIGHT PREFIXES},
|
||||
keys(%fieldtrans)) {
|
||||
my $value=$this->runpipe(0, "LANG=C rpm -qp --queryformat \%{$field} $file");
|
||||
my $key;
|
||||
if (exists $fieldtrans{$field}) {
|
||||
$key=$fieldtrans{$field};
|
||||
}
|
||||
else {
|
||||
$key=lc($field);
|
||||
}
|
||||
$value='' if $value eq '(none)';
|
||||
$this->$key($value);
|
||||
}
|
||||
|
||||
# Get the conffiles list.
|
||||
@@ -185,6 +187,8 @@ sub unpack {
|
||||
#
|
||||
# Test to see if the package contains the prefix directory already.
|
||||
if (defined $this->prefixes && ! -e "$workdir/".$this->prefixes) {
|
||||
my $relocate=1;
|
||||
|
||||
# Get the files to move.
|
||||
my @filelist=glob("$workdir/*");
|
||||
|
||||
@@ -193,9 +197,21 @@ sub unpack {
|
||||
foreach (split m:/:, $this->prefixes) {
|
||||
if ($_ ne '') { # this keeps us from using anything but relative paths.
|
||||
$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: $!";
|
||||
}
|
||||
}
|
||||
|
||||
if ($relocate) {
|
||||
# Now move all files in the package to the directory we made.
|
||||
if (@filelist) {
|
||||
$this->do("mv", @filelist, "$workdir/".$this->prefixes)
|
||||
@@ -210,6 +226,7 @@ sub unpack {
|
||||
}
|
||||
$this->conffiles([@cf]);
|
||||
}
|
||||
}
|
||||
|
||||
# rpm files have two sets of permissions; the set in the cpio
|
||||
# archive, and the set in the control data; which override them.
|
||||
|
||||
2
alien.pl
2
alien.pl
@@ -137,7 +137,7 @@ built.
|
||||
|
||||
Be less strict about which patch file is used, perhaps attempting to use a patch
|
||||
file for an older verson of the package. This is not guaranteed to always work;
|
||||
older patches may necessarily not work with newer packages.
|
||||
older patches may not necessarily work with newer packages.
|
||||
|
||||
=item B<--nopatch>
|
||||
|
||||
|
||||
14
debian/changelog
vendored
14
debian/changelog
vendored
@@ -1,3 +1,17 @@
|
||||
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
|
||||
|
||||
* Extract prefixes field before extracting scripts so that
|
||||
RPM_INSTALL_PREFIX gets set.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 12 Mar 2008 11:05:40 -0400
|
||||
|
||||
alien (8.69) unstable; urgency=low
|
||||
|
||||
* Alien's repository has moved from subversion to git.
|
||||
|
||||
5
debian/control
vendored
5
debian/control
vendored
@@ -1,10 +1,11 @@
|
||||
Source: alien
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>= 4), dpkg-dev (>= 1.9.0)
|
||||
Build-Depends: debhelper (>= 4)
|
||||
Maintainer: Joey Hess <joeyh@debian.org>
|
||||
Standards-Version: 3.7.2
|
||||
Standards-Version: 3.7.3
|
||||
Vcs-Git: git://git.kitenet.net/alien
|
||||
Homepage: http://kitenet.net/~joey/code/alien/
|
||||
|
||||
Package: alien
|
||||
Architecture: all
|
||||
|
||||
Reference in New Issue
Block a user