Maybe this could be rewritten to check if packagekitd is running, and if so, request status (transactions running or not) via D-Bus?