I'm thinking of writing an RPM that contains a Python virtual environment. A Python virtual environment contains a copy of the Python executable (which is a thin shell around the Python shared library). This means that if Python is ever updated, the Python executable inside that virtual environment should also be updated.
Is it possible for an RPM to have a script that runs every time a dependency is updated? I've noticed that
akmod seems to know to recompile kernel modules every time you update the kernel. Does it do this by hooking RPM, or by some sort of 'on-boot' script that checks what kernel is running?