drush_make fails with a "Could not retrieve version information" error if there is no network access even though the make file refers only to git repositories on local dev machine.

When network access is available again the make file builds fine, pulling from local git repo as it should.

Comments

dmitrig01’s picture

could you post the output of running it with --debug? thanks

boztek’s picture

Moborg:prototype boris$ drush make prototype.build pt4 --debug
Found command: make [0.032 sec] [bootstrap]
Calling mkdir(/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562)
Created directory temporary directory [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562
[0.034 sec]
Could not retrieve version information for drupal. [0.139 sec] [error]
Executing: git clone /Users/boris/Sites/PROFILES/prototype/.git [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/prototype
[0.141 sec]
Initialized empty Git repository in /private/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/prototype/.git/
prototype cloned from /Users/boris/Sites/PROFILES/prototype/.git. [ok]
[0.236 sec]
Executing: cd [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/prototype
&& git checkout -b local origin/local [0.237 sec]
fatal: git checkout: branch local already exists
Checked out branch local. [0.244 sec] [ok]
Calling mkdir(/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/__build__)
Calling mkdir(/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/__build__/profiles)
Executing: mv [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/prototype
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/__build__/profiles
[0.245 sec]
Executing: git clone /var/drupal/CONTRIB/cck.git [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/cck
[0.252 sec]
Initialized empty Git repository in /private/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/cck/.git/
cck cloned from /var/drupal/CONTRIB/cck.git. [0.316 sec] [ok]
Executing: cd [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/cck
&& git checkout -b DRUPAL-6--2-5 origin/DRUPAL-6--2-5 [0.317 sec]
Switched to a new branch 'DRUPAL-6--2-5'
Branch DRUPAL-6--2-5 set up to track remote branch DRUPAL-6--2-5 from origin.
Checked out branch DRUPAL-6--2-5. [0.475 sec] [ok]
Calling mkdir(/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/__build__/profiles/prototype/modules)
Calling mkdir(/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/__build__/profiles/prototype/modules/contrib)
Executing: mv [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/cck
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/__build__/profiles/prototype/modules/contrib
[0.476 sec]
Executing: mv [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562/__build__
pt4 [0.492 sec]
Executing: rm -r [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1257651562
[0.497 sec]
Command dispatch complete [0.525 sec] [notice]

boztek’s picture

Some more info - I'm testing with two local git repos, one with drupal with a branch called DRUPAL-6-14 created by using 'git branch --track DRUPAL-6-14 DRUPAL-6-14' to "track" the tagged release instead of using HEAD.
The other repo is setup similarly for CCK with version DRUPAL-6--2-5 as a branch.

This is the behaviour I'm seeing -

1. Build with network access and with projects[drupal][download][branch] = "DRUPAL-6-14"
- WORKS
2. Build without network access and with or without projects[drupal][download][branch] = "DRUPAL-6-14"
- drupal core doesn't appear in destination but the install profile and CCK 2.5 is there all by itself.

Debug results are in above comment.

dmitrig01’s picture

Ok, sorry for lack of replies - I've been kind of busy. Are you sure this is a git problem? Does it work if you manually execute the commands?

dmitrig01’s picture

Status: Active » Postponed (maintainer needs more info)
boztek’s picture

Version: 6.x-2.0-beta1 » 6.x-2.0-beta5
Status: Postponed (maintainer needs more info) » Active

I gave up on this but I'm going to look at it again. Currently using beta 5 with the patch to stop eager deleting of .git files to allow checkout of specific branches (http://drupal.org/node/661794).

With network active the build succeeds with the following output (except .git is being deleted now which is somewhat annoying):

192-168-1-104:dev boris$ drush make dev.build test --debug
Found command: make [0.037 sec]                                      [bootstrap]
Initializing drush commandfile: drush_make [0.037 sec]               [bootstrap]
Initializing drush commandfile: drush_make_d_o [0.038 sec]           [bootstrap]
Calling mkdir(/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389)
Created directory temporary directory                                   [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389
[0.043 sec]
Project information for drupal retrieved. [1.384 sec]                [ok]
Executing: git clone '/var/drupal/CORE/drupal.git'                      [notice]
'/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389'/'drupal'
[1.388 sec]
  Initialized empty Git repository in /private/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389/drupal/.git/
drupal cloned from /var/drupal/CORE/drupal.git. [3.148 sec]          [ok]
Executing: git checkout -b 'DRUPAL-6-14' origin/'DRUPAL-6-14' [3.148    [notice]
sec]
  Switched to a new branch 'DRUPAL-6-14'
  Branch DRUPAL-6-14 set up to track remote branch DRUPAL-6-14 from origin.
Checked out branch DRUPAL-6-14. [3.518 sec]                          [ok]
Executing: rm -rf                                                       [notice]
'/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389'/'drupal'/.git
[3.519 sec]
Executing: mv                                                           [notice]
'/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389'/'drupal'
'/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389'/__build__
[3.527 sec]
Executing: mv                                                           [notice]
'/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389'/__build__
'test' [3.533 sec]
Executing: rm -r                                                        [notice]
'/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903389'
[3.538 sec]
Command dispatch complete [3.543 sec]                                   [notice]

But with no network access it fails like this:

192-168-1-104:dev boris$ drush make dev.build test --debug
Found command: make [0.036 sec]                                      [bootstrap]
Initializing drush commandfile: drush_make [0.037 sec]               [bootstrap]
Initializing drush commandfile: drush_make_d_o [0.037 sec]           [bootstrap]
Calling mkdir(/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903225)
Created directory temporary directory                                   [notice]
/var/folders/Jg/Jg6QXDsVHLabMXzG4FvkZE+++TM/-Tmp-/drush_make_tmp_1263903225
[0.041 sec]
Could not retrieve version information for drupal. [0.145 sec]       [error]
Undefined index:  core [0.146 sec]                                      [notice]
No core project specified. [0.147 sec]                               [error]
An error occurred at function : drush_drush_make_make [0.149 sec]    [error]
Command dispatch complete [0.149 sec]                                   [notice]
yhahn’s picture

Status: Active » Postponed (maintainer needs more info)

If you could post your full makefile it would be very helpful.

dmitrig01’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)