I was just reading this presentation on deploying Drupal
http://www.slideshare.net/eaton/drupal-deployment-presentation [1]
and noticed
http://drupal.org/project/install_profile_api [2]
Which seems to have a collection of API functions needed at install/upgrade time that are missing from Drupal (and contrib modules)
And even better this is great motivation to write more such functions myself instead of just using SQL hacks.
Links:
[1] http://www.slideshare.net/eaton/drupal-deployment-presentation
[2] http://drupal.org/project/install_profile_api