Make has own routines for unpacking tarballs and zip. Those should be integrated into drush_tarball_extract() or made into an engine that all of Drush can use.

Also related is _make_download_file_move() which does a lot of shell commands instead of drush_move_dir, drush_delete_dir(), etc. In general, this function looks messy and undocumented.

Comments

jhedstrom’s picture

We got most of these with #1490090: Replace direct cp, ls and mv calls with drush_copy_dir, drush_scan_directory and drush_move_dir. Tackling the tarball and zip still remains to be done.

fluxsauce’s picture

Assigned: Unassigned » fluxsauce

Any objection to me using ZipArchive as a fallback if unzip is not available? It's in PHP core, and it's enabled by default in the official Windows PHP 5.3 binary from php.net. It is not enabled by default in Windows PHP 5.2.

For gzip, Zlib provides the functionality for windows out of the box.

The Windows version of PHP has built-in support for this extension.

Verified with Windows PHP 5.2 and PHP 5.3.

TAR is... well, trying to reduce the need for an external dependency. Archive_Tar could be a way around that, not sure how well that will play with the MSI installer.

Thoughts? I can roll in the fix proposed in #1539672: drush make not unzipping files due to mime content type while I'm at it.

jonhattan’s picture

drush_tarball_extract() being worked in #1343058: Add support for extracting .tar.bz2 files

fluxsauce’s picture

Assigned: fluxsauce » Unassigned
greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this task 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.