system_theme_data();
drush_log(t('Rebuild theme cache'));
These lines appear to be updating the theme cache. Though, if you've made any changes manually in the course of the site deployment, or profile install, they have the effect of overwriting those changes with stale information. The system_theme_data() function caches theme information in a static variable, so the available theme information is only ever calculated once. I believe this happens very early on in the process.
Comments
Comment #1
rburns commentedComment #2
adrian commentedIt only flushes the caches at the very end of most things.
it tends to happen in a post_$hook implementation.
we'd need a more concrete example of where this is causing trouble.
Comment #3
anarcat commentedJust to bring in personnal experience: this was breaking themes in hosted sites. When the cronjob was running on a site, the theme would be reset to "nothing" and the display would be broken. I don't know if that has been fixed.
Comment #4
adrian commentednot an issue anymore i guess.
closing