I'm writing a Python system script and I need to be notified when a program gets installed/upgraded/removed.
First of all, I thought to interface my application to an apt-dbus daemon. Unluckily I've not found it, and while I'm waiting for its implementation (and it can take a long time), I'm studying another method to do it.
So I've thought about pyinotify.
Maybe I could be notified every time that the file/var/log/apt/history.log
changes and then I'd just parse the added lines to get what I expected.
Can you suggest me another safe way to do it?
Thank you.