Closed (fixed)
Project:
Drush
Component:
Make
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2011 at 21:59 UTC
Updated:
25 Mar 2012 at 18:40 UTC
Jump to comment: Most recent file
I have a module that includes a makefile. The makefile's sole purpose is to make the library download easy. However, when I do nothing to the projects array in the makefile, I get the error "No core project specified". I briefly tested this in 3.x-dev and got the same results. This makefile dies:
core = 7.x
api = 2
;phpCAS
libraries[phpCAS][download][type]= "file"
libraries[phpCAS][download][url] = "http://downloads.jasig.org/cas-clients/php/current.tgz"
libraries[phpCAS][directory_name] = "phpCAS"
libraries[phpCAS][destination] = "libraries"
Yet this one succeeds:
core = 7.x
api = 2
projects[cas][subdir] = "contrib"
;phpCAS
libraries[phpCAS][download][type]= "file"
libraries[phpCAS][download][url] = "http://downloads.jasig.org/cas-clients/php/current.tgz"
libraries[phpCAS][directory_name] = "phpCAS"
libraries[phpCAS][destination] = "libraries"
I think it's a bug, but if not, please let me know what I'm doing wrong.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1159548-no-core-recursion-3.patch | 515 bytes | pwolanin |
Comments
Comment #1
pwolanin commentedHaving exactly the same problem - I can make the single file work by passing --no-core, but when it's part of an install profile and invoked via recursion it fails.
Seem that drush make needs possibly to use the no-core flag once it starts a recursion?
Comment #2
pwolanin commentedexample:
Comment #3
pwolanin commentedHere's one approach that seems to work.
Comment #4
dmitrig01 commentedthanks
Comment #5
the_g_bomb commentedSeconded, patch goes in fine and solves the issue
Comment #6
pwolanin commentedComment #7
the_g_bomb commentedSurely this shouldn't be fixed until it is merged into the project. Reviewed and tested means its ready to be added to the project and should become part of the next release.
Comment #8
justintime commented@the_g_bomb - it wasn't really explicitly explained, but pwolanin's patch has actually been committed into the dev branch. Once the code's been committed, usually the status is set to fixed.
Comment #9
the_g_bomb commentedSounds good, just didn't realise it had been committed, thanks
Comment #11
dmitrig01 commented... committed to 6.x-3.x
Comment #12
travisc commentedThe patch works, drush make is borked without it, any way to roll a new version soon to save others the confusion?
Comment #13
skwashd commentedAs noted in the release notes, this patch was also included in 6.x-2.3 released last week.
Comment #14
drzraf commentedIt happens to me (with a more complex makefile), I found that while 2.x works well, 3.x does *not*.
I bissected this to aba3eca2d970e0d4c85bdc8ad3c2f8843e26626e which changes things in-depth.
I also checked that the simple makefile in comment #1 stopped to work after this commit.
The parser was broken when it went into its own file.
I suspect a bug when handling '#' commented lines; eg:
versus
When running both with eg,
drush @mysite make --verbose --no-core themakefileabove.make /tmp/Xyou'll see how the second case fails silently.the parser needs to be fixed in some way.
Comment #15
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.
Comment #16
drzraf commentedit's still relevant: I can reproduce this consistently (as in comment #14)
Comment #17
helmo commentedThen let's move it to the new queue.
Comment #18
dwwRe: #14, #16:
'#' isn't a comment in make files. ';' is. This is basically ini syntax (like .info files), not PHP or shell syntax, etc.
I don't think there's still a bug here.
Comment #19
drzraf commentedYou're right, and according to http://php.net/manual/en/function.parse-ini-file.php, php 5.3 enforces the '#' rejection by default...
but still mysterious as
drush makedoes not useparse_ini_filebut instead the home-mademake_parse_info_filefunction, which wraps_drush_drupal_parse_info_file.The later uses a big
preg_match_allIs there any strong reason of not using
parse_ini_file?Comment #20
dww@drzraf: This is totally off topic for this thread, but the reason is that drush .make files (like drupal .info files) are close to .ini syntax but not exactly conforming. The primary difference is the nested array syntax, but there are probably other cases where our pseudo-ini syntax differs from the what parse_ini_file() can handle.
Cheers,
-Derek