From: http://community.aegirproject.org/discuss/20-rc4-released#comment-2029

jb044:

I noticed there is a new hook in 2.0-rc3:

hook_provision_drupal_create_directories_alter

It doesn't work however because the $mkdir array is passed by value. This however worked for my application (some files in subfolders of files end up with wrong permissions), note the _ref part!

// Allow other commands to add or alter the directories to be created.
drush_command_invoke_all_ref('provision_drupal_create_directories_alter', $mkdir, $url);
drush_command_invoke_all_ref('provision_drupal_chgrp_directories_alter', $chgrp, $url);

This relates to: #1283738: Add new hook provision_drupal_create_directories in _provision_drupal_create_directories

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anarcat’s picture

Priority: Normal » Critical

since we'll be stuck with this API with all of 2.x, i feel this is critical enough that it should block.

cinnamon’s picture

Status: Active » Needs review
FileSize
722 bytes

And here is the patch against 6.x-2.x.

First, imho there should also be a chgrp hook, but most import: this should be documented in provision.api.php

cweagans’s picture

Status: Needs review » Fixed

Looks good to me.

cweagans’s picture

Status: Fixed » Reviewed & tested by the community

Eh, whoops. I missed.

anarcat’s picture

Status: Reviewed & tested by the community » Needs work

alright, committed.

let's get that .api documentation in place please. also add it to the community.aegirproject.org/upgrading/path page.

helmo’s picture

Status: Needs work » Needs review
FileSize
987 bytes

It's a new hook in 2.x so documenting in /upgrading/path seems unnecessary.

Here's a patch for provision.api.php

helmo’s picture

Here's an additional patch.
The first two hunks remove comment about a parameter we don't have(anymore?)

The third removes $profile from _provision_drupal_create_directories($url = NULL, $profile = NULL), the function did nothing with the value of $profile and in no place do we call the function with that parameter.
The '_' prefix implies an internal function... would that need a mention on /upgrading/path ?

cweagans’s picture

Status: Needs review » Reviewed & tested by the community

RTBC for #6 for sure. That looks great!

+1 for the updates in #7 - we don't actually use that stuff. Technically, I guess that's an API change. I think it's okay, though.

helmo’s picture

Status: Reviewed & tested by the community » Needs review

Committed #6

setting status to review #7 by @anarcat

anarcat’s picture

Status: Needs review » Reviewed & tested by the community

i think it's fine to fix the API, commit already. :)

helmo’s picture

Status: Reviewed & tested by the community » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 3c1155c on dev-drupal-8, 6.x-2.x, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by cinnamon, committed by anarcat:
    Issue #2096629 by cinnamon: Fixed...
  • Commit 9b8a9ba on 6.x-2.x, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by helmo:
    Issue #2096629 by helmo: Cleanup invalid comments and an unused $profile...
  • Commit dcd3b2d on 6.x-2.x, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by helmo:
    Issue #2096629 by helmo, cweagons: Add hook documentation.