First off, I'm not 100% sure if this is a provision bug or a memcache bug. Basically I have memcache being enabled in an install profile (using aegir) and it's hook_requirements fails because cache_inc is set incorrectly.

The memcache module requires you to change the $conf['cache_inc'] setting in settings.php.

After some digging, I found that the provision module is resetting cache_inc back to the default drupal cache.inc. This is still set when memcache is installed and thus the requirements hook breaks.

The code is in platform/drupal/install_6.inc in install_main().

  if ($verify) {
    // Since we have a database connection, we use the normal cache system.
    // This is important, as the installer calls into the Drupal system for
    // the clean URL checks, so we should maintain the cache properly.
    require_once './includes/cache.inc';
    $conf['cache_inc'] = './includes/cache.inc';

    drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_DATABASE);

I don't understand the implications here of not using the default cache, but I'm sure this makes sense to someone who understand drupal's caching better than me :). Anyway, perhaps if there's a cache_inc set before this runs then it should be set back to the original value after the drush_bootstrap call... something like:

    $cache_inc_tmp = isset($conf['cache_inc']) ? $conf['cache_inc'] : NULL;
    require_once './includes/cache.inc';
    $conf['cache_inc'] = './includes/cache.inc';

    drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_DATABASE);
    $conf['cache_inc'] = isset($cache_inc_tmp) ? $cache_inc_tmp : $conf['cache_inc'];

Would that work?

Comments

Robin Duckett’s picture

As a work around, do something like

drupal_install_modules(array('memcache_admin'));

in your hook_profile_task_list.

This installs your profile then installs the admin module at the end of it all.

hadsie’s picture

This is still an issue in the alpha8 release.

steven jones’s picture

Version: 6.x-0.4-alpha3 » 6.x-2.x-dev

We should clean this up along with using the code from #960940: Provision installs Drupal 6 in different order to Drupal

helmo’s picture

Status: Active » Closed (outdated)

The 6.x-2.x branch will go EOL along with Drupal this week. So I'm closing
this issue. If it remains a confirmed issue in 7.x-3.x, feel free to re-open,
or better yet, create a new issue referencing this one.