I'm attempting to download a gzip'd (but NOT tar'd) external library dependency in a Drush makefile. All other libraries (THREE versions of jQuery UI, OpenLayers 2.10, et al) seem to be working fine. Here's the makefile snippet:
; GeoIP libraries[geoip][download][type] = "get" libraries[geoip][download][url] = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz" libraries[geoip][directory_name] = "geoip"
And here's sample output when I make with the verbose flag:
geoip downloaded from http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz. [ok] Executing: gzip --list '/tmp/drush_make_tmp_1296764285/GeoIP.dat.gz.tar.gz' [notice] Executing: gzip -d '/tmp/drush_make_tmp_1296764285/GeoIP.dat.gz.tar.gz' [notice] Executing: mkdir '/tmp/drush_make_tmp_1296764285/__unzip__' [notice] Executing: tar -x -C '/tmp/drush_make_tmp_1296764285/__unzip__' -f '/tmp/drush_make_tmp_1296764285/GeoIP.dat.gz.tar' [notice] Executing: ls '/tmp/drush_make_tmp_1296764285/__unzip__' [notice] Executing: rm '/tmp/drush_make_tmp_1296764285/GeoIP.dat.gz.tar' [notice] Executing: rm -rf '/tmp/drush_make_tmp_1296764285/__unzip__'
Am I doing something wrong? Is this a bug? Expected behavior?
Comments
Comment #1
acrollet commentedsubscribe
Comment #2
izmeez commentedsubscribing, this still seems to be an issue in version 6.x-2.2 with GeoIP
No errors are reported and download success is shown but the libraries/geoip folder is empty.
I remember having problems before with the GeoIP download not being complete and therefore failing to unpack. I had to manually download the GeoIP database several times before it was complete and unpackable. I presumed drush make was having the same problem but not reporting an error.
Comment #3
davideads commented@izmeez -- I don't think that's the issue. We have a tiny little bash script for our project that helps handle some of these funky areas of features and Drush make. dling and unzipping the GeoIP library in that script works flawlessly for me.
Comment #4
izmeez commented@davideads Thanks you are correct there is a specific issue with .gz files.
I'm still finding my way around some linux commands and it appears that "gunzip" or "gzip -d" does not support a destination the way that unzip does. So I wonder if this needs some additional code to gunzip and move the file?
Comment #5
davideads commented@izmeez -- I'm no gunzip wizard, and I'm not sure how Drush handles file extraction. I would have tackled this but I am *still* waiting at work to find out if I am allowed to write patches for GPL'd Drupal projects (all code I write on the job is hypothetically BSD'd), and I don't have the time outside of my job to work on this.
My bash script workaround looks like this:
Because gunzip works in place, this works fine and doesn't leave around any junk.
Comment #6
izmeez commented@davideads, thanks for sharing this. I used wget & gunzip and could do as you have and download to the final destination but it would be great if drush make could take care of this.
Sorry, I don't have the coding skills required to create a patch for this.
Comment #7
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.
If you feel that this issue is still relevant after the move, 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.