[Rubygems-developers] Customising Rubygems for Debian/Ubuntu.
neil at brightbox.co.uk
Thu Jun 26 01:42:57 EDT 2008
I'm currently working on an improved native 'apt' package for
Debian/Ubuntu that will allow 'gem' and 'apt' to work together
interchangeably on a Debian/Ubuntu platform *and* be compatible with
Debian's filesystem policies.
To do that I need to use the 'alternatives' system so that the OS
knows which is the current version of an application. Essentially gem
will install an 'app1.8' or 'app1.9' link to the relevant binary and
the 'alternatives' system will create 'app' in the system path.
What I need to do is call the command 'update-alternatives' on install
and deinstall, which corresponds to the 'postinst' and 'prerm' scripts
you get under 'apt' packaging.
However I can't see any prebuilt hooks (empty methods would do) in the
code that I can override with the new 'operating_system.rb' file. Any
chance of putting in simple hook methods in the relevant place?
What I could do with is
- 'preinst' and 'postinst' called at the relevant places in install
- 'prerm' and 'postrm' called at relevant places in uninstall
- 'update-system' called when gem is doing an 'update --system' so
that I can redirect that to use 'apt' instead'.
Of course any other suggestions on how to get this done gratefully received.
More information about the Rubygems-developers