If a Drupal installation has a theme that can be updated, drush pm update lists that theme and tries to update it the same way as it does with modules. This fails when trying to create a backup directory, as the $project['path'] obtained through the update module is apparently empty for themes. If drush fails because of this, it might mean that other modules cannot be updated unless the theme has been updated manually.

I understand that drush currently doesn't handle theme updates, but IMHO this shouldn't break the update process for regular modules.

Comments

marquardt’s picture

StatusFileSize
new718 bytes

I've attached a simple workaround for the problem which simply skips themes in the update loop in drush_pm.module and prints out a warning saying that a theme has been skipped.

In the long run, it would be nicer if drush could also handle themes, of course... How can I obtain the installation path of a theme - or why does update not put it into the $project array for themes as it does for modules? Apologies if that's a stupid question...

marquardt’s picture

Status: Active » Needs review

Updating status...

marquardt’s picture

StatusFileSize
new1.13 KB

Sorry - it was a stupid question (on the installation path of themes). They are are constructed in drush_pm_get_project_path(), of course.

I've attached an alternative patch which obsoletes the first one. Now, paths to themes are found correctly, and they are backed up and updated properly. Could someone test if this minor modification does indeed enable drush to update themes?

moshe weitzman’s picture

Looks good to me. Anyone available to test?

marquardt’s picture

Version: 6.x-1.0-rc2 » 6.x-1.0
StatusFileSize
new1.12 KB

Rerolled patch from comment #3 against 1.0 release. No changes, just two lines offset, really...

moshe weitzman’s picture

Status: Needs review » Fixed

fixed elsewhere.

Status: Fixed » Closed (fixed)

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