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.
There is a nice feature in Debian-based packaging where packages are listed with an importance. If you try to remove a package that you really need, e.g. libc it makes you type “YES, I'M SURE I WANT TO DO THIS” on the console. People will just click through a dialog like the one you've shown without reading it, so perhaps you need a second dialog where appropriate. Something like: