Hi,

When I run drush make I get this error:

my_profile cloned from git@github.com:my_profile.git.
Checked out branch my_branch.
Unable to copy /tmp/drush_tmp_1339402421_4fd5a8b57adc7/my_profil to /tmp/make_tmp_1339402420_4fd5a8b4871ab/__build__/profiles/my_profile.

My .make file looks like this:

; API
api = 2

; Core
core = 7.x

; Drupal project.
projects[drupal] = 7.14

projects[my_profile][type] = profile
projects[my_profile][download][type] = git
projects[my_profile][download][url] = git@github.com:my_profile.git
projects[my_profile][download][branch] = my_branch

And I run it with: drush make --no-gitinfofile platform.make web

Could it be something with my local permissions, or is this a drush make issue?

I use Drush 5.3.

CommentFileSizeAuthor
#8 drush-1626972.patch940 bytesjonhattan
#5 debug.txt51.16 KBgagarine

Comments

jonhattan’s picture

misc’s picture

I do not really see how they relate?
Updated to Drush 5.4, same issue.
Could it have something to do with that I have a password to my ssh key?

jhedstrom’s picture

Could you try running the failing build with either the -v flag or the --debug flag and post any relevant warnings or notices back here. Also, if that doesn't provide any useful feedback, if you could reproduce the error with an example that folks here can try out themselves, that will help track down the problem.

misc’s picture

I can not setup the same - because it is protected by ssh-key, but the debug looks like this:

my_profile cloned from git@github.com:my_profile.git. [76.7 sec, 11.18 MB] [ok]
 * [@self.0] Bootstrap to phase 0. [76.77 sec, 10.82 MB] [bootstrap]
 * [@self.0]  * [@self.41] /usr/bin/php /usr/share/php/drush/drush.php --php=/usr/bin/php  --backend=2 --reserve-margin=14 make-process /tmp/make_tmp_1339494349_4fd70fcd0f296 2>&1 [76.77 sec, 12.86 MB]                             [notice]
 * [@self.0] Bootstrap to phase 0. [77 sec, 10.91 MB]    [bootstrap]
 * [@self.0] Found command: make-process (commandfile=make) [77.02 sec, 10.91 MB]                                                                                                                                                  [bootstrap]
 * [@self.0] Loading release_info engine. [77.21 sec, 10.92 MB]                                                                                                                                                                       [notice]
 * [@self.0] Bootstrap to phase 0. [77.25 sec, 10.82 MB] [bootstrap]
 * [@self.0] Bootstrap to phase 0. [77.43 sec, 10.91 MB] [bootstrap]
 * [@self.0] Found command: make-process (commandfile=make) [77.44 sec, 10.91 MB] [bootstrap]
 * [@self.0] Loading release_info engine. [77.57 sec, 10.92 MB] [notice]
 * [@self.1] Checked out branch branchtest. [78.3 sec, 11.19 MB] [ok]
 * [@self.1] Unable to copy /tmp/drush_tmp_1339494352_4fd70fd0934b9/my_profile to /tmp/make_tmp_1339494349_4fd70fcd0f296/__build__/profiles/my_profile. [78.31 sec, 12.3 MB] [error]

Get the same problem in to different setups - Ubuntu and Mac.
With Drush 4.5 with drush make it worked.

gagarine’s picture

Title: Unable to copy » Unable to copy downloaded profile to __build__/profiles
StatusFileSize
new51.16 KB

Get the same error with https://github.com/SmartGov/SmartGovApp_distribution

Attached verbose output.

jonhattan’s picture

To reproduce:

cd /tmp
wget https://github.com/SmartGov/SmartGovApp_distribution/zipball/7.x-1.x
unzip 7.x-1.x
drush make SmartGov-SmartGovApp_distribution-312788f/build-smartgovapp.make /tmp/smartgov

This bug was introduced between rc3 and rc4.

jonhattan’s picture

It's commit http://drupalcode.org/project/drush.git/commitdiff/d16701f?hp=90bf5e23b2...

In concrete this change.

-  drush_shell_exec('cp -Rf %s %s', $tmp_location, dirname($download_location));
+  drush_copy_dir($tmp_location, $download_location, TRUE);

The problem is in drush_copy_dir(). There's an @ supressing errors in if (@drush_op('_drush_recursive_copy', $src, $dest)) { at includes/filesystem.inc:199

Without the @ an error is shown:

# drush make SmartGov-SmartGovApp_distribution-312788f/build-smartgovapp.make /tmp/smartgov2
drupal-7.14 downloaded.                                                                                                                                                                                 [ok]
smartgovapp cloned from git://github.com/SmartGov/SmartGovApp.git.                                                                                                                                      [ok]
Checked out branch 7.x-1.x.                                                                                                                                                                             [ok]
copy(/tmp/drush_tmp_1344630822_502570267f1bc/smartgovapp/modules/mink_tests/bin/goutte.phar): failed to open stream: No such file or directory filesystem.inc:224                                       [warning]
Unable to copy /tmp/drush_tmp_1344630822_502570267f1bc/smartgovapp to /tmp/make_tmp_1344630821_50257025015fd/__build__/profiles/smartgovapp. 

and.. it's a symlink, that is broken.

# ls -lh /tmp/drush_tmp_1344630719_50256fbfcd397/smartgovapp/modules/mink_tests/bin/goutte.phar 
lrwxrwxrwx 1 root root 35 ago 10 22:32 /tmp/drush_tmp_1344630719_50256fbfcd397/smartgovapp/modules/mink_tests/bin/goutte.phar -> ../vendor/fabpot/goutte/goutte.phar
jonhattan’s picture

Status: Active » Needs review
StatusFileSize
new940 bytes

I don't know why it's broken. That's the project's fault.

The patch attached recreate symlinks instead of copying the link's destination. It also removes a check in drush_delete_dir() that is not strictly neccesary and allows to solve the issue here. Tests are passing.

jhedstrom’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks reasonable to me. I haven't tested locally, but if tests are passing commit away.

jonhattan’s picture

Title: Unable to copy downloaded profile to __build__/profiles » Recreate symlinks in drush_copy_dir() instead of copying
Status: Reviewed & tested by the community » Fixed

Committed.

jonhattan’s picture

jonhattan’s picture

This is the patch, in case someone wants to apply:
http://drupalcode.org/project/drush.git/patch/ef8910c?hp=2fff6c424ad344f...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.