With Drush 6.2, the apps-install command does not work correctly.
/var/sites/paddle# drush apps-install paddle_simple_contact
Install paddle_simple_contact for server paddle_apps
Missing argument 4 for make_download_file(), called in /var/sites/paddle/sites/all/modules/paddle/apps/apps.drush.inc on line 161 and defined make.download.inc:67 [warning]
Illegal string offset 'url' make.download.inc:68 [warning]
copy(s): failed to open stream: No such file or directory drush.inc:732 [warning]
Illegal string offset 'url' make.download.inc:77 [warning]
Unable to download apps_compatible from s. [error]
One of the dependencies of paddle_simple_contact failed to download, canceling installation
It looks like the apps module passes one argument too less to the make_download_file() method, which in older versions of Drush only required 3 arguments, and now 4.
Comments
Comment #1
cyberwolf commentedComment #2
pfrenssenHere's a patch. It was not written by me but by @Cyberwolf. He should get credit for it if it is accepted.
This has been changed for ages in drush, I checked the latest master as well as versions 6 and 5 and they all use these 4 arguments.
Comment #3
pfrenssenI have reviewed this patch which was written by Cyberwolf and it follows the correct expectations of
make_download_file(). We are using this in production for about 4 months now. Changing status to RTBC.Comment #4
hefox commentedMy drush is versions 5.9 (for... reasons. I don't remember exactly) and app-install is working sans patch, guessing it predates the argument change unless I called it with app that wouldn't produce those errors. I'm reluctant to commit it as is because I think 5.9 is common to use (I think there was a bug with make files in later versions). I hate adding version checking code and not sure when the change was added (that would be nice to know)
Comment #5
pfrenssenDrush 5.x has been superseded by Drush 6.0 over a year ago. Drush 6 is the current recommended version (ref. Drush versions).
The issue that introduced the change is #1991764: Support using a distribution as core. It was first introduced in the 6.x branch and was backported to 5.x in June last year. So the latest 5.x already contains the change which is what I checked before posting the patch in #2. There will probably never be a 5.10 version containing the fix since that branch is obsolete.
There will indeed still be many sites running 5.9, so it might be prudent to hold this off for a while. On the other hand this might motivate people to update their outdated versions of drush on their servers :)
Comment #7
hefox commentedAdded a version of the patch that checks the version if below or equal to 5.9, use old, else use new.
Thanks!