I am using a features server (http://drupal.org/project/fserver) to manage some features created for a Drupal Commons 1.6 based project. Using 'drush pm-update feature_name' yielded a couple of error messages related to an unsuccessful attempt to untar the feature module once it was downloaded to the modules dir. The Problem is the following: Features Module export features to .tar only (no gzip), while drush\commands\pm\package_handler\wget.inc, line 81ff seems to be expecting a .gz or .tgz.
// Decompress and untar in two steps as tar -xzf does not work on windows.
drush_shell_exec("gzip -d %s", $filename);
$tarpath = basename($filename, '.tar.gz');
$tarpath = basename($tarpath, '.tgz');
$tarpath .= '.tar';
drush_shell_exec("tar -xf %s", $tarpath);
I think what happens is that (with a tar-only tarball) the two basename-strippings don't do anything, and then the .tar gets appended, resulting in a $tarpath = 'feature_name-6.x.-4.4.tar.tar', which of course fails (Error message: WD php: unlink(feature_name-6.x.-4.4.tar.tar): No such file or dir..).
Maybe this is not a drush problem, since Drupal.org projects are gzipped, but I think if the features server stuff spreads more and people like to host their own project servers, a lot of problems can be avoided upfront by just adjusting this line of code. Maybe by just putting a $tarpath = basename($tarpath, '.tar'); before the .tar appending (which is redundant, but seems to be the quickest way out).
Comments
Comment #1
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.