Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Some library dependencies (such as wkhtmltopdf, required by print.module) are available only in .tar.bz2 format. It would be handy to support extracting these .tar.bz2 files automatically in a Drush Makefile.
Comment | File | Size | Author |
---|---|---|---|
#13 | drush-tarball-extract-1343058-13.patch | 16.3 KB | smokris |
#12 | drush-tarball-extract-1343058-12.patch | 16.31 KB | smokris |
#11 | drush-tarball-extract-1343058-11.patch | 11.21 KB | jhedstrom |
#10 | drush-tarball-extract-1343058-10.patch | 10.86 KB | jhedstrom |
#8 | drush-1343058.patch | 11.05 KB | jonhattan |
Comments
Comment #1
helmo CreditAttribution: helmo commented[ Powered by #1115636: Issue Macros and Templates - Drush Make]
Drush make is being merged into drush core (discussed in issue:#1310130: Put drush make in drush core)
This means that the issue queue is also moving. The Drush project has a component called 'Make' for this purpose.
We would like to take this opportunity to leave behind old/obsolete issues, allowing us to focus on a stable make command in core. E.g. one of the major tasks ahead is making more use of the Drush core code for handling downloads and decompression.
If you feel that this issue is still relevant, feel free to re-open and move it to the Drush queue.
More information will be posted on the drush_make and drush project pages.
NOTE: This will probably be part of #1267228: Drush Make should use Drush core's native download abilities concurrently
Comment #2
smokrisThis issue is still relevant.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedsuch functionality should probably go into drush_tarball_extract()
Comment #4
smokrisdrush_tarball_extract()
doesn't seem to be called from Drush Make.I've attached a patch that adds
.tar.bz2
/.tbz
support by modifyingmake_download_file_unpack()
.Comment #5
moshe weitzman CreditAttribution: moshe weitzman commenteddrush_tarball_extract() is not called from Make, but should be. We're no longer enhancing makes own tar functionality
Comment #6
jhedstromThis will require a test in
tests/makeTest.php
.Comment #7
smokrisRevised patch attached.
drush_tarball_extract()
to also support uncompressed tar, tar/bzip2, and zip.make_download_file_unpack()
to usedrush_tarball_extract()
instead of its own functions.make_download_file_unpack_*()
functions.tests/makeTest.php
.Comment #8
jonhattanThat's a great change to make!
Added a check for bzip2 executable to avoid the bz2 if the command is not available.
This two tests are failing for me with this patch:
makeMakefileCase::testMakeGet
makeMakefileCase::testMakeLimitLibraries
Comment #9
jhedstromThe breakage in tests is due to temporary build directories being left in place while the md5 sum is calculated, thus changing the hashes. Working now on figuring out why these aren't being removed.
Comment #10
jhedstromThis patch removes the downloaded tar file, so that md5 sums match. However, I'm still seeing 3 failing tests (down from 5).
Comment #11
jhedstromOops, last patch missed the added test file.
Comment #12
smokrisNew patch!
All tests now pass.
Comment #13
smokrisThe patch in #12 only worked with PHP >= 5.3.0. Revised to also work with PHP 5.2.9.
Comment #14
moshe weitzman CreditAttribution: moshe weitzman commentedI'll leave this to jhedstrom or jonhattan to review and commit.
Comment #15
jonhattanCommitted as is in 2137767a77cdd03f4a83c6066b60e173ebfe1546
I also did some changes in subsequent commits:
* fix parsing finfo_file. It returns the charset in addition to the mimetype (because of FILEINFO_MIME) and it was failing to identify the correct mime type.
I will create new issues for other tasks I've identified.
Comment #16
smokrisAwesome. Thanks, @jonhattan, @moshe, and @jhedstrom!
Comment #17
jhedstromThis commit introduced a regression #1721610: Regression from support bz2 downloads.