hi
just came across your project and love the concept. however, have just tried to run drush generate-makefile on an ubercart install, but all I get is a list of:
Could not retrieve version information for <em>/em>
.
.
.
Could not retrieve version information for <em></em>.
// (repeated a dozen or so times)
and a meaningless make file:
; This file was auto-generated by drush_make
core = 6.x
api = 2
projects[drupal][version] = "6.20"
; s
projects[][contrib_destination] = ""
Tried in debug mode, but that didn't help much. I wondered if this was something obvious and known?
Thanks.
Comments
Comment #1
southweb commentedHere is the debug output:
Comment #2
barrapontoI'm using the latest drush make beta 10, seeing these errors all the time.
Comment #3
AInozemtzev commentedI confirm this problem
Comment #4
aidanlis commentedSub
Comment #5
dmitrig01 commentedComment #6
doubledutch commentedApologies for my ignorance. I'm experiencing the same problem and believe the last message from dmitrig01 may suggest that a fix for this is in 6.x.2.x-dev. If that is the case - how do I get my hands on that?
Comment #7
barraponto@2xdutch nope, it means the bug is in 2.x-dev as well, and it will probably be fixed there first.
Comment #8
achtonSubscribing.
FWIW, this is the error I get with current 2.x-dev:
Comment #9
3rdLOF commentedSame here. Are we missing and additional argument we suppose to pass along?
`drush generate makefile /path/to/make-file.make`
Adding the path takes care of that, but in my case - using it on a Drupal 7 installation- I get about twenty of these errors:
Could not retrieve version information for .
Could not retrieve version information for .
Could not retrieve version information for .
...
Comment #10
jp.stacey commentedI think this arises from a change that was made in Drush 4.x.
Drush generate-makefile calls
_drush_generate_makefile($file). That in turn callsdrush_get_projects().Now, in Drush v3.x,
drush_get_projects()would return an array of objects. This is because it callsdrush_get_modules()(anddrush_get_themes()) for the relevant Drupal major version environment. For D6 this function is just:In Drush 4.x, this function appears to be implementation-independent and I've not dug around in it too much, but one thing it is doing, is compiling an array:
Workaround? Downgrade to Drush 3.x . We've just done that here and it worked fine. Solution? Er. Cast arrays as objects? But the 4.x versions seem to have different keys/attributes from the 3.x versions anyway.
Comment #11
peter.walter commentedI confirm this is failing with drush 4.1, but works when rolling back to 3.3
Comment #12
scarvajal commentedSubscribing
Comment #13
dmitrig01 commentedjp.stacey, thanks for investigating. I'll take a closer look this weekend
Comment #14
dmitrig01 commentedi think i fixed it
Comment #15
3rdLOF commentedSeems to be working. Thanks boss.
Comment #16
Anonymous (not verified) commentedWhere is this fix? Doesn't working for me, using 6.x-2.0 & drush-All-versions-4.2 (updated both today)
Comment #17
peter.walter commentedThanks for the fix - however it still does not seem to work with 4.2 (fine with 3.3)
Comment #18
3rdLOF commentedActually, expandonline and Mtro are right. I did not realized when I tested this I was on 3.3.
Al below is using D7
I tried it in 4.2, 4.3-dev and even 5 dev and it all three cases it gave me:
The makefile it generate only had the api, the profiles type and all the libraries but nothing else. The subdir entry was there but empty:
projects[][subdir] = ""It only seems to work on 3.3.
----Below this it may just be my noobness ----
Using 3.3 it spit out about 15 errors out of about 40 queries it run, all of them
"Invalid version <em class="placeholder"></em> for <em class="placeholder"> a module name</em>.and at the end it threw out a final error:An error occurred at function : drush_drush_make_make_generateIt generated a makefile, but all the libraries and modules entries were out order, adding groups of libraries and modules alternatively about 4 times (eg: 5 libraries, then 3 modules, then 6 libraries, then 10 modules, then 3 more libraries....etc)
Comment #19
kyle_mathews commentedI can confirm that the generating make files does work under Drush 3.3 but doesn't work in Drush 4.2.
Comment #20
shrimphead commentedsubscribe
Comment #21
dmitrig01 commentedno patch yet
Comment #22
ao2 commentedHi,
here is an experimental patch to make generate-makefile work with Drush 4.
Note that I hardcoded the module type to 'module' because
drush_get_modules()does not seem to be exporting thetypeattribute of extensions anymore. This needs to be fixed in Drush itself if needed.Regards,
Antonio
EDIT: the patch can be downloaded using this URL:
http://drupal.org/files/issues/Issue-1016968-by-ao2-Make-drush-generate-...
As the '#' char is not escaped correctly in the link below.
Comment #23
ao2 commentedUpdated patch, based on 6.x-3.x.
Changes since v1 of the patch:
Now, instead of blindly hardcode the project type to
'module'we actuallytry to get it from
drush_get_projects()and fallback to'module'only ifwe don't find the
'type'attribute.NOTE: Drush still needs to be changed to export the
typeattribute properly.Comment #24
jonhattanThe background of the change in drush is the disambiguation of projects and extensions (modules/themes). As you know a project can contain several modules and a module name don't necesarily match the project name. Ej: cck -> content ...
See the big difference in drush_get_projects() between versions 3.x and 4.x/HEAD:
http://api.drush.ws/api/drush/includes--environment.inc/function/drush_g...
Attached is a straightforward fix. A better integration between drush and _make is possible. The inclusion in drush_get_projects() of the
typeattributed as stated in #22 and #23 will open the door for simplified implementation ofgenerate-makefilewith more accuracy.Comment #25
jonhattan#1080492: Minor changes to drush_get_projects() for drush_make
Comment #26
ao2 commentedThanks johnattan, the patch in #24 is enough indeed.
Before marking that RTBC, I just have one last observation, with your patch I am getting:
Which results in these lines added to the .make file:
By looking at
$project_infoI think this happens because core modules do not define$item->info['project']anymore while drush_make.generate.inc now expects its value to be'drupal'for core projects; I do not know if this is due to a change in drush or rather in the data from drupal.org.Anyway we need to add an
isset($item->info['project'])check as well:If that's OK I can send a proper patch, I just don't know if we can get rid of the
== 'drupal'check.I was also thinking that we could use
$nameand$typein those ifs instead of$item->info['project']and$item->typeto save some horizontal space, but that's a cleanup which would be in a separate commit.Thanks,
Antonio
Comment #27
jonhattanNote: you need very latest drush MASTER to run this patch succesfully.
Changes are basicly a shift from a module-based code to a project-based code. There're is also other fixes in. Full list:
1. fix update service check (drupal.org, features servers,..). It was not working for other services than drupal.org.
2. leverage _pm_find_common_path() to find project path. More reliable now.
3. leverate new drush_get_projects(): we start working from the projects array already obtained by drush --no reinvent.
Comment #28
ao2 commented@jonhattan, the patch works OK for modules, themes and libraries, thanks a lot.
Here below I tried to review it with http://drupal.org/project/dreditor as an exercise.
Add an extended commit message too. The short commit message tells briefly what you're trying to accomplish, the extended one should tell also why you do it and what are the behavioral changes the patch introduces, finally the code diff tells how the change is implemented.
This could go in a separate commit, maybe? As a quick (partial) fix, so to not pollute the _check_updatexml() patch.
why the check changed to
!== FALSEhere it is not obvious to me.An extended commit message wouldn't hurt here as well, albeit less necessary IMHO.
Shouldn't this go in the previous commit?
Maybe this one could be a separate preparatory commit for the levarage drush_get_projects one.
Regards,
Antonio
Powered by Dreditor.
Comment #29
jonhattanThere're two commits in the patch.
First commit is #24 and aditionally fixes the update service check --that I realized was not working for external projects (I tested it with 'singular' theme from developmentseed's repo).
Second commit is the big one: it reimplements a big part of generate-makefile with a shift from a module-based code to a project-based code as stated in #27. It also uses drush's
_pm_find_common_path()to obtain the install location for a project.Perhaps some line in the second commit fits better the first commit but such is life. I can't easily go back to uncommit-change-commit again. Also changes are not previously planned to the last detail but done in the run.
To explain this is straightforward:
=== TRUEwas not working. $update_check contains the xml from the update service or FALSE. It never is set to TRUE.Comment #30
ao2 commentedwrt. patch from #27: RTBC, as it is indeed working fine.
Comment #31
3rdLOF commentedREMOVED - WRONG ISSUE
Late night working, was using the wrong commands. Spaced out. My apologies.
Comment #32
alex.pilon commented#24 worked for me as well (drush 4.2, and drush make 2.0)
Comment #33
dmitrig01 commentedComment #34
dmitrig01 commentedThanks!
Comment #36
benshell commentedI'm still having this problem with Drush 4.4 and 4.5-dev. Should this have been fixed? I can try to debug further if necessary.
Comment #37
puzl commentedStill having this problem in Drush 4.4.
Comment #38
benshell commentedUpdate: I think this bug has been fixed. When I posted a couple weeks ago I was up-to-date with Drush but not Drush Make. After updating Drush Make the make-generate command works perfectly.
Comment #39
jonhattan