Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

That is the question!


Okay, all silliness aside, I really am forced to make a difficult decision here. My application is written in C++ and allows other scripts to invoke methods via XML-RPC. One of these scripts is a Nautilus extension written in Python. The extension is packaged with the rest of the application and copied to the appropriate place when installed (/usr/share/nautilus-python/extensions).

Now the problem is that the Nautilus extension requires the python-nautilus Install python-nautilus package to be installed to be operational. So therefore I have three options:

  • Make the python-nautilus package a dependency. This option will ensure that anyone who installs my package will be able to use the Nautilus extension. However, this option will not be attractive to XFCE or KDE users - a ton of python-nautilus's dependencies will be installed on their machines and take up a lot of space - even if they never use Nautilus.

  • Put the python-nautilus package in the suggests: or recommends: field. This option provides the end-user with a way to avoid installing the python-nautilus package (by providing the --no-install-suggests or --no-install-recommends argument to apt-get). However, this won't work when the user installs the package in the Software Center. (I always get mixed up as to which of those two fields are installed by default.)

  • Prompt the user when the application is installed or first launched. This option is more complicated than the others but offers the best compromise between making it easy for the user to install python-nautilus (without going into a technical explanation) and not installing it when the user doesn't need it (or want it). I guess the best way to implement this is a simple prompt that invokes apt-get if the user would like the package installed.

  • Don't install the package at all. This option ensures that nobody has python-nautilus installed on their machine unless they want it. However, this also means that my Nautilus extension will simply not run on the end-user's machine unless they manually install the package.

Which of these options seems the best choice? Have I missed any pros and cons for each of the options?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

a ton of python-nautilus's dependencies will be installed on their machines

You know, I thought "let's take a look at whether this is an African or a European ton," and...

python-nautilus
  Depends: libc6
  Depends: libglib2.0-0
  Depends: libgtk-3-0
  Depends: libnautilus-extension1a
  Depends: libpython2.7
  Depends: python-gi
  Depends: gir1.2-nautilus-3.0
  • In XFCE/Xubuntu and LXDE/Lubuntu:

    The following extra packages will be installed:
    gir1.2-nautilus-3.0
    The following NEW packages will be installed:
    gir1.2-nautilus-3.0 python-nautilus
    0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
    Need to get 25.2 kB of archives.
    After this operation, 410 kB of additional disk space will be used.
    
  • In KDE/Kubuntu:

    The following extra packages will be installed:
    gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0
    gir1.2-nautilus-3.0 gir1.2-pango-1.0 libgtk-3-0 libgtk-3-bin libgtk-3-common
    libnautilus-extension1a
    Suggested packages:
    librsvg2-common gvfs
    The following NEW packages will be installed:
    gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gtk-3.0
    gir1.2-nautilus-3.0 gir1.2-pango-1.0 libgtk-3-0 libgtk-3-bin libgtk-3-common
    libnautilus-extension1a python-nautilus
    0 upgraded, 11 newly installed, 0 to remove and 2 not upgraded.
    Need to get 2,835 kB of archives.
    After this operation, 8,672 kB of additional disk space will be used.
    

So, almost nothing at all for XFCE/LXDE, and 8.5MB--not the end of the world--for KDE.

I recommend making python-nautilus a...recommends. Which will be installed as a dependency by apt-get/Synaptic/Software Center unless told otherwise.

For the few that refuse to use apt-get but know the difference between recommends and dependencies, and don't want recommends, the APT::Install-Recommends=0 property will be honored by both Synaptic and Software Center. The property can be set graphically from Synaptic preferences, or manually via /etc/apt/apt.conf.d/.

share|improve this answer
    
+1 for the research. Thanks! –  Nathan Osman Jul 6 '12 at 2:58
add comment

It depends how important that Nautilus extension is for your application:

  • If your application is not really usable without it make python-nautilus a dependency
  • If your application is usable without it but lacks some important features make it a Recommends
  • If it's just nice to have make it a Suggests

Instead of using Suggests I would prefer to make the extension a package of its own. That way it is easier for a user to find out what he needs to install if he want to use the extension.

share|improve this answer
    
Unfortunately it can't be a separate package because 1) I couldn't submit it to MyApps and 2) it therefore wouldn't be eligible for the contest. –  Nathan Osman Jul 5 '12 at 20:20
    
Also, if I add it to Suggests:, will the suggestion show up anywhere in the Software Center? –  Nathan Osman Jul 5 '12 at 20:34
    
If it is for the contest I'd ask if there are any rules for such cases. There seems to be a way to show "extensions" in software center but I don't know how it works. –  Florian Diesch Jul 5 '12 at 23:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.