Removing software; blowing your feet off

In packagekit, there are two modes for removing a package, force-true and force-false. If force is false, then the package will only be removed if no other packages depend on it. If force is true, then it and any packages that depend on it are also removed.

With this power allows us to do cool things, but also give us the chance to blow our feet off. Just try removing glibc with force-true. Fun times.

In pkcon (text mode program) and pk-application (GUI add/remove tool) we could only do force-false until recently to avoid foot injuries. Matej pointed out removing gimp leads to a chain of deps that couldn't be removed in this way.

I've now added the following dialog into the GUI tool, I'll do the same with the console program too. Internally it just calls GetRequires on the package before calling RemovePackage, and prompts if the requires packagelist size is non-zero.

This gives us a nice way to do this in a backend abstracted way, and should stop anyone removing stuff like HAL without agreeing to remove a lot of other packages.

HIG compliance is rubbish, I'm crap at that sort of thing. If anyone has any suggestions to make it HIG compliant, yell and I'll see what I can do. If anyone is feeling really cool, the new dialog is created in src/pk-application.c:pk_application_requires_finished_cb() – patches welcomed with glee. That is all.

Remembering packages

Colin opened this bug the other day.

Fedora 8 comes out in a few days, and like him I normally clean out the rubbish from my $HOME, and wipe my root partition. This gets rid of all the get-me-running-bodges and failed updates of a typical rawhide cycle.

What I normally do is install the latest live cd, and just execute a massive script that has yum install foo bar baz, where foo bar baz is a list of about 200 packages.

I think I'm right in saying Colin suggests a dialog like “Do you want to install all your usual packages?” on first boot of the new OS. This would be great for me as it's one less hacky script that I use once in a blue moon.

Now, is this a sweet idea, or just feature creep? Feedback welcome.

PackageKit YUM backend complete, and the update viewer

Tim has just committed the last parts to the yum backend in PackageKit:

Now, we have to focus on:

  • The APT backend
  • Adding unit tests (use “make gcov” to get a nice report)
  • Finding performance hot-spots (use “make gprof” to help)
  • Finding memory leaks in client and server programs (use valgrind)
  • Adding more sane commenting and gtk-doc markup to functions
  • A new release

But before that, I need to put the update detail into the pk-update-viewer application. At the moment I've got this:

I have to put the following into the bottom 'pane' somehow:

  • package_id (contains what repo it's coming from and the name arch and version)
  • updates (what packages are updated by this package)
  • obsoletes (what is updated by this package)
  • url (a link to a security advisory etc.)
  • restart (if we need to restart or logout/login)
  • update_text (all the description about why the update was done)

The button should be the url link, but I'm stuck otherwise. Ideas welcome, as I'm not GUI design legend.

Random errors…

Taken from “man va_start”
If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur.

Just what I like. Random errors.