RFC: On-demand package installation API in kdelibs

John Tapsell johnflux at gmail.com
Thu Jul 29 15:23:40 BST 2010

On 29 July 2010 00:58, Lubos Lunak <l.lunak at suse.cz> wrote:
>  Hello,
>  I'd like to add API somewhere to kdelibs that would make it easy for
> applications to install additional packages if they find out some
> functionality is missing. The 11.3 release of openSUSE already has this
> feature, you can read about it at [1].
>  In short, there are actually quite some places in KDE where this could be
> used, but currently the code just does some kind of error message and shrugs
> it off:
> - Nepomuk will give a notification about Virtuoso not being available and
> that's it
> - Amarok will complain about MP3 support not being present (which is the case
> by default with some distributions because of legal reasons) and will try
> running a specific script to install it
> - DrKonqi has another implementation of running an executable for installing
> debug packages, specified as CMake argument
> - clicking on some files in e.g. Dolphin can show the 'Open with...' dialog if
> no application has been found to handle the file, but then usually the dialog
> is useless if the application is not installed
> - and so on

- Right clicking on a folder and chosing properties, share, configure
file sharing  does nothing in kubuntu, since it needs samba which
isn't there by default.
- K3B needs many optional packages, like cdrecord, md5sum, etc
- Kile needs many optional packages like latex, etc

>  In most of these cases the user has to manually do what can be done
> automatically with today's packaging systems, and in fact those can do it
> better, since they can much more easily find out which package can handle
> mimetype application/foo or provide binary bar.
>  So the idea is to provide simple API in the form of 'bool
> tryToEnsureInstalled{MimeType|Binary|Whatever}( QString name )'. Various KDE
> code will call it when it finds out something is missing and maybe the call
> solves the problem.

I was thinking the API could be much more general and simple.
Something very simple like:


With a plain text that has:

blah: synaptic install libblah blah-foo

Mimetype would then be treated exactly the same as the rest.
We can then have a different plain text for each distribution _and_
allow distros to simply override the file by providing their own one.
I like the idea of making the files maintainable both in KDE and by
distros, since people do compile kde themselves, and you have nightly
build packages, experimental packages, and so on.


More information about the kde-core-devel mailing list