rake tasks are getting executed multiple times on yum update with plugins
Foreman, as well as each plugin, run some rake tasks, such as
in the posttrans. This means multiple such calls during the
yum update session.
The solution might be:
1. in %postrans, every affected rake run would create some mark that it was run. The subsequent rake runs would notice this and would skip it's call again
2. in %pretrans, we would clear the marks from previous run to allow the posttrans to be run in case of the new update session
The mark could be achieved by a simple file, that would contain all the rake calls that were already run during the update.
#1 Updated by Evgeni Golov about 2 years ago
- Subject changed from rake tasks are getting executed multiple times on yum update with plugins to rake tasks are getting executed multiple times on yum update with plugins
I think RPM triggers would be better suited here. http://ftp.rpm.org/api/22.214.171.124/triggers.html