[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PROPOSAL: making xaw-wrappers not divert



Ok, here's a new proposal for a new xaw-wrappers that does not need to use
diversions. I've made modifications so that packages that use xaw-wrappers
will not need to depend on it (though they may), and will work even if it is
not installed.

A package that uses xaw-wrappers to wrap a binary /usr/bin/foo should:

* Actually install the binary as something like /usr/bin/foo.real (or in
  /usr/lib/<package>/foo, or whatever you like).
* Install an xaw-wrappers config file, /usr/lib/xaw-wrappers/conf/<package>, 
  which will be used to tell xaw-wrappers which xaw libraries the program
  doesn't work with, and where is is actually installed (I'll have to extend
  or change the config file format to allow this).
* Use update-alternatives to register /usr/bin/foo.real as one alternative
  that provides /usr/bin/foo, with a priority of less than 50. (And
  de-register it in the postrm, of course)
* Call update-xaw-wrappers in its postinst and postrm if update-xaw-wrappers
  exists on the system.

xaw-wrappers will then work like this - each time update-xaw-wrappers is
run, which will happen at xaw-wrappers installation and each time a package
using it is installed or removed, it will look at all config files, and
register its wrapper script as an alternative for each of the items in each
config file, with a priority of 50. And of course it'll clean all this up if
it's removed.

So the result is that when a package is installed without xaw-wrappers, it's
unwrapped binary is used. If xaw-wrappers is then installed, it registers a
higher priority alternative, and then its wrapper will be called instead.

-- 
see shy jo


Reply to: