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

Re: multiarch status update

On Tue, May 16, 2006 at 02:11:08PM +0200, Olaf van der Spek wrote:

> That's great. Could you tell me how to use those so that script A uses
> python 2.3 and script B uses python 2.4 without modifying the scripts?

That's trivial. Create a wrapper that somehow decides which python
version to run and launches the application using the right interpreter.
Install the wrapper as /usr/bin/python instead of the current symlink
and you're done. No kernel support, no dpkg support, no apt support is

However, you can take this idea further: provided you have multiarched
binaries, you could create a small file system using FUSE that generates
such a wrapper on-the-fly based on the requested file name, and you
could mount this file system as /usr/bin. Voila.

The _real_ difficulties for supporting multiarched binaries are:

- Transitioning every single binary from /usr/bin to /usr/lib/$ARCH/bin.
  Looking at the current /usr/X11R6 transition this is less than
  trivial. There may be tricks like moving the old /usr/bin to
  /usr/lib/fallback_arch/bin before mounting the "wrapper" filesystem
  over /usr/bin, and redirect every writes to /usr/bin to
  /usr/lib/fallback_arch/bin; that may fool dpkg enough so package
  management continues to work during the transition.

- Decide which version/architecture to run if the user requests
  /usr/bin/blah. With the FUSE approach this can be made a per-user
  decision if someone dares to go through all the implications of a
  setuid program seeing a different /usr/bin/foo than a non-setuid


     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences

Reply to: