Package: alien
Version: 8.86
Alien has some logic that preserves special rpm owner/group/permissions
by putting them as shell commands in a debian postinst when called with
--scripts
However the current logic in the code never fires if the original rpm
did not have a postinst.
This is a dirty patch that creates an empty postinst in the RPM just so
that the deb converter can see the postinst and add its package perm
fixing commands to it.
You can apply the patch to see the difference, but the patch is just a
'get it work for me now' patch, not something that should be applied as
is in the main tree.
---
/tmp/g4-4428/cache/depot//production/tools/prodimage/lib/Alien/Package/Deb.pm#1
2012-04-05 07:46:23.000000000 -0700
+++ /home/merlin/src//production/tools/prodimage/lib/Alien/Package/Deb.pm
2012-04-05 08:17:38.979101000 -0700
@@ -448,6 +448,9 @@
foreach my $script (qw{postinst postrm preinst prerm}) {
my $data=$this->$script();
next unless defined $data;
+ # Skip empty scripts, like an empty postinst that
+ # didn't get any perm fix changes.
+ next if $data eq '#!/bin/sh';
next if $data =~ m/^\s*$/;
open (OUT,">$dir/debian/$script") ||
die "$dir/debian/$script: $!";
---
/tmp/g4-4428/cache/depot//production/tools/prodimage/lib/Alien/Package/Rpm.pm#1
2012-04-05 07:46:23.000000000 -0700
+++ /home/merlin/src//production/tools/prodimage/lib/Alien/Package/Rpm.pm
2012-04-05 08:18:57.096166000 -0700
@@ -545,7 +545,16 @@
}
sub postinst {
my $this=shift;
- $this->_script_helper('postinst', @_);
+ # Force postinst generation so that debian chown/chmod
+ # conversion can happen. See Deb.pm.
+ if (not @_)
+ {
+ $this->_script_helper('postinst','#!/bin/sh');
+ }
+ else
+ {
+ $this->_script_helper('postinst', @_);
+ }
}
sub postrm {
my $this=shift;
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]