mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
* Add support for rpm scripts that use RPM_INSTALL_PREFIX, by setting
RPM_INSTALL_PREFIX as part of the converted script. Closes: #400863
This commit is contained in:
@@ -448,6 +448,10 @@ are typically shell scripts, but often lack the leading #!/bin/sh
|
||||
This can confuse dpkg, so add the #!/bin/sh if it looks like there
|
||||
is no shebang magic already in place.
|
||||
|
||||
Also, if the rpm is relocatable, the script could refer to
|
||||
RPM_INSTALL_PREFIX, which is set by rpm at run time. Deal with this by
|
||||
adding code to the script to set RPM_INSTALL_PREFIX.
|
||||
|
||||
=cut
|
||||
|
||||
# This helper function deals with all the scripts.
|
||||
@@ -457,9 +461,18 @@ sub _script_helper {
|
||||
|
||||
# set
|
||||
if (@_) {
|
||||
my $prefixcode="";
|
||||
if (defined $this->prefixes) {
|
||||
$prefixcode="RPM_INSTALL_PREFIX=".$this->prefixes."\n";
|
||||
$prefixcode.="export RPM_INSTALL_PREFIX\n";
|
||||
}
|
||||
|
||||
my $value=shift;
|
||||
if (length $value and $value !~ m/^#!\s*\//) {
|
||||
$value="#!/bin/sh\n$value";
|
||||
$value="#!/bin/sh\n$prefixcode$value";
|
||||
}
|
||||
else {
|
||||
$value=~s/\n/\n$prefixcode/s;
|
||||
}
|
||||
$this->{$script} = $value;
|
||||
}
|
||||
|
||||
4
debian/changelog
vendored
4
debian/changelog
vendored
@@ -1,8 +1,10 @@
|
||||
alien (8.65) UNRELEASED; urgency=low
|
||||
|
||||
* Fix alien's own spec file, s/Copyright/License/.
|
||||
* Add support for rpm scripts that use RPM_INSTALL_PREFIX, by setting
|
||||
RPM_INSTALL_PREFIX as part of the converted script. Closes: #400863
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 14 Dec 2006 17:35:11 -0500
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 15 Dec 2006 13:31:54 -0500
|
||||
|
||||
alien (8.64) unstable; urgency=low
|
||||
|
||||
|
||||
Reference in New Issue
Block a user