[bt-devel] RFC: Remove modules installed by the native package manager

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Tue Apr 28 13:23:08 MST 2009


Martin Gruner wrote:
> Hi Sveinung.
> 
> First of all, thanks for providing a solution! I'm quite impressed with your 
> work. Your patches look good.
> 
> Having said that, I'm not going to apply them now. You know that we are just 
> right before the release of BibleTime 2.0, so we have to postpone larger 
> changes.
> 
> Plus, I'm not sure how big the problem you are solving really is in practice. 
> Ok, there are very few modules packaged by the distros, but I'm not aware of 
> users having problems with them. If they install to /usr/share/, users cannot 
> remove them at all (so the database cannot be "corrupted"), unless they work 
> as root.
> The changes would introduce a new (optional) external dependency, and #ifdefs, 
> which increases the complexity of the codebase and build process.
> 
> I like your approach though. My suggestion would be that con continue to work 
> on this in a local working copy of BibleTime. And I'd like to hear the other 
> developer's opinions on this matter to see if there can be a consensus. If 
> most agree, we can incorporate your work at a later point (especially if 
> distros have working versions of PackageKit).
> 
> Again, thanks for your work!
> 

I agree with Martin in every point except "Your patches look good", but 
that one is only because I haven't had time to look at the patches :)

Without knowing what the patch currently does, the fully working 
solution should be something like this:

It detects the packages which are installed by the package manager. When 
the "Installed works" page in the Bookshelf Manager is opened, it marks 
those modules.

We have to suppose that BibleTime is used with normal privileges, not as 
root.

If the user tries to uninstall those modules, it opens a dialog telling 
that the modules (works) have been installed by the package manager and 
that those packages can now be uninstalled.

This is the critical part: it should now change to use admin 
priviledges, using the system used by the distro. For example, in Ubuntu 
it should ask for the user's own password and use sudo. In some other 
system it should ask for the root password and 'su' to root. If it 
doesn't do it, it's not useful. If BibleTime should be restarted as 
root, it's as good as just telling the user that he can uninstall the 
package with the system package manager.

In any case we need to have detection for nonwritable/nonremovable 
directories. Actually I should have done it already but I haven't. Even 
if this package manager integration is used, we have to take care of the 
  modules for which the user doesn't have permissions, whether they have 
been installed with the package manager or manually. And if PackageKit 
is used for the managed modules, it would be illogical to not offer a 
possibility to remove the other non-writable files, too.

--Eeli Kaikkonen



More information about the bt-devel mailing list