Aegir still sets the default install profile as 'default', Drupal 6's install profile. I suspect that at this point in time it's worth updating this to use Drupal 7's 'standard' install profile, and for the sake of doing it the Drupal way, letting people choose which profile they would like to use as the default.

There is already a variable available for this purpose (hosting_default_profile), just no interface to modify the value.

Comments

deciphered’s picture

Status: Active » Needs work
StatusFileSize
new621 bytes

Patch attached to change the default to 'standard'.

Not sure where the best place to put the settings for to set this value is at this stage, so haven't attempted that side of things.

anarcat’s picture

Wouldn't that fail to return 'default' as a default install profile if D7 is not installed?

From what I can see, this would just return 'null' in such a case...

deciphered’s picture

Yes, you're probably right.

I suppose the more important thing is to have the settings form so that it can be configured, and have some logic so that if the default install profile is removed it will fallback to 'default', which given Aegir is D6 will always exist.

deciphered’s picture

Status: Needs work » Needs review
StatusFileSize
new2.26 KB

Ok, improved the patch:

- Added a settings option on the 'General hosting settings' form so the user can choose their own default.
- Kept the default as standard, with some additional logic, it already had logic to check the default value, so I re-ordered it, it will now check the variable value, defaulting to 'standard', followed by a normal check for 'standard', then a check for 'default' before falling back to the default value supplied to the function.

This means that the default will be 'default' if there are no other platforms other than Hostmaster, but once a D7 platform comes about it will default to 'standard', unless of course a user configures their own default install profile via the settings form.

deciphered’s picture

StatusFileSize
new2.18 KB

Doh, left a tiny bit of unnecessary logic in, fixed.

P.S., Sorry about the lack of interdiffs, being naughty.

ergonlogic’s picture

Status: Needs review » Needs work

This is a nice improvement. Thanks for working on it @Deciphered.

  elseif ($p = hosting_get_package('standard')) {

I think this check is redundant, since 'standard' is the default for the variable_get just above.

deciphered’s picture

Status: Needs work » Needs review

Nah, it's not redundant, it works like this:

If the profile defined by the variable exists, or if a variable hasn't been defined manually, the standard profile exists:
if ($p = hosting_get_package(variable_get('hosting_default_profile', 'standard'))) {

Else, if the standard profile exists:
elseif ($p = hosting_get_package('standard')) {

Else, if the default profile exists:
elseif ($p = hosting_get_package('default')) {

So while it does look like it's redundant, if someone had changed their preferred default profile to something else ('myprofile'), and then since deleted all platforms that that profile exists in, the first line would fail, therefore the second check for standard would be called to return standard as the default profile.

ergonlogic’s picture

Status: Needs review » Fixed

Ah yes, I see.

Tested and committed in d98e929c3b7006

Status: Fixed » Closed (fixed)

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

omega8cc’s picture

Category: Feature request » Bug report
Priority: Normal » Major
Issue summary: View changes
Status: Closed (fixed) » Needs work

This new feature destroyed ability to migrate sites between profiles with old_short_name = foo

omega8cc’s picture

Priority: Major » Normal
Status: Needs work » Postponed (maintainer needs more info)

Uh, wait, we are still debugging this and while reverting this patch initially helped, we are no longer sure it is the real/sole source of the problem with migrations between profiles we experience.

omega8cc’s picture

Category: Bug report » Feature request
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Scratch that. It was because we have tried to map uberdrupal->standard in old_short_name in the standard.info which is not going to work because of the map hardcoded already in Provision to provide D6->D7 upgrade path:

    if ($profile->name == 'standard') {
      $profile->info['old_short_name'] = 'default';
    }

  • Commit d98e929 on 6.x-2.x, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x by ergonlogic:
    Issue #1980136 by Deciphered, anarcat: Allow setting default profile...

  • Commit d98e929 on 6.x-2.x, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x by ergonlogic:
    Issue #1980136 by Deciphered, anarcat: Allow setting default profile...

  • ergonlogic committed d98e929 on 7.x-3.x-2345987
    Issue #1980136 by Deciphered, anarcat: Allow setting default profile...