Zero Install

Distribution integration

If you have already installed a package using your distribution's installer then you may wish to use that instead of downloading a second copy using Zero Install. Starting with Zero Install 0.29, two methods are available to integrate Zero Install packages with distribution ones:

  • A distribution package can install a file named /usr/share/0install.net/native_feeds/INTERFACE. This is automatically used as an additional feed for INTERFACE (replace "/" characters in the package's interface URI with "#" characters).

    This is useful if the package installs the program as a self-contained directory somewhere. i.e. the installed package has the same format as the Zero Install package. If the package already contains a local feed file, you can just symlink to it directly.

  • A feed author can add a <package-implementation package="name"/> element to their feed. Zero Install will query your distribution's package manager to see if a package with this name is already installed. If so, that version will be considered as another candidate, with a stability rating of "packaged" (which is ranked between "stable" and "preferred").

For example, here is what happens if you ask to run AbiWord when you already have the libenchant1 library it requires installed using apt-get:

$ 0launch http://0install.net/2006/autopackage/Abiword.xml

Abiword with native libenchant

If Abiword is itself installed using apt-get, then the dialog is even simpler, and nothing needs to be downloaded:

Native Abiword

Of couse, you are always free to change the selected version from the native package to a Zero Install version. This will also happen autoamatically if your native version is incompatible with the required version. For example, if you try this on a machine with a very old copy of libenchant1 then Zero Install will download a newer version rather than using that one.

As always, all software installed by Zero Install goes in the cache directory and does not conflict with files installed by the native package manager.

Future work

Distribution integration is not yet finished.

Since different distributions use different names for the same package we may need to allow distributions to be named in the feed files. We may need a way to specify mappings for version numbers, to cope with different versioning schemes.

We only consider native packages that are actually installed. We could also consider native packages that are available (you'd need to enter the root password). This might be useful if no Zero Install version was available, or if you preferred to use a native package for some reason.

Finally, Zero Install can only get package information from Debian and RPM-based systems at present. Slackware and other systems are not currently supported, although adding support should be easy enough now that we have the framework.