redhat: spec: trigger dracut when modules are installed separately
In most scenarios, users install -core and -modules subpackages at the same time (as part of same transaction). But it is also possible to install -core RPM and then -modules RPM separately. We allow this because some environments don't need modules.
Installing RPMs separately can cause issues. Since we trigger initramdisk rebuild (in %posttrans script) only for -core package, some modules may end up missing from init ramdisk.
Introduce state file to determine whether or not -modules subpackage should trigger dracut to rebuild ramdisk. If both -core and -modules RPMs are installed in same transaction, there's no extra action. If -modules RPM is installed separately, trigger dracut in %posttrans to re-generate init ramdisk.
Signed-off-by: Jan Stancek jstancek@redhat.com