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

Sveinung Kvilhaugsvik sveinung84 at users.sourceforge.net
Mon Apr 27 11:18:28 MST 2009


Hello!

First: English is not my native language so if what I write is
difficult to understand (if you are insulted by reading it you
probably don't understand) please ask me to clarify.

I have heard that people have complained about not being able to
remove modules that are installed by the operating system's native
package manager. The following patches are a possible solution to it.
It adds support for PackageKit, an abstraction layer for package
managers, to BibleTime. The support is behind #ifdef's and won't be
enabled unless CMake can find PackageKit. If it's enabled at compile
time it will still check if it can use PackageKit during runtime
before it will use it. Since PackageKit use dbus and dbus has
different bindings I don't think this belong in Sword. If you are
interested I'm willing to work more on it to get this code in a state
where you can commit it to BibleTime.

A small note: This has only been tested with PackageKit 0.3.14.
PackageKit in current Ubuntu jaunty won't work since it installs
FindQPackageKit.cmake in a place CMake can't find it. There is a fix
for this in the bugreport
https://bugs.launchpad.net/ubuntu/+source/packagekit/+bug/345706

Since I'm quite new to C++, QT, the codebase of BibleTime etc I would
like some feedback. Should I modify other files than Changelog, the
build system and the source code? Are the patches correctly split up?
Should I be "using PackageKit::Client" to make the code shorter, or
can that be confusing to other developers? Are there memory leaks?

The patches will be attached to this mail and then posted in follow
ups as text so it will be easier to comment parts of the code. If you
prefer the patches to be posted another way please tell me.
 * Patch -1: (Not part of the series) Just noticed that the extra
slash is no longer required
 * Patch 1: make CMake detect QPackageKit
 * Patch 2: Check if PackageKit can be used to remove modules
 * Patch 3: Remove modules using PackageKit. At the moment there is a
bug if the user closes the remove window before removal have started.
A possible solution to this is to show some sort of progress thing as
the removal goes on or to make sure the object the code is on stays
until it's finish. If anyone else wants solve this I'm OK with it, if
not I would be willing to try myself.

--
Sincerly
Sveinung
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-1
Type: application/octet-stream
Size: 780 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/bt-devel/attachments/20090427/b300f6c3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch1
Type: application/octet-stream
Size: 1252 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/bt-devel/attachments/20090427/b300f6c3/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch2
Type: application/octet-stream
Size: 2016 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/bt-devel/attachments/20090427/b300f6c3/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch3
Type: application/octet-stream
Size: 3395 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/bt-devel/attachments/20090427/b300f6c3/attachment-0003.obj>


More information about the bt-devel mailing list