Closed (fixed)
Project:
Drush
Component:
PM (dl, en, up ...)
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
23 Oct 2010 at 23:58 UTC
Updated:
10 Nov 2010 at 16:30 UTC
Jump to comment: Most recent file
I started getting this all of a sudden. Drush is at latest HEAD. Possibly PEBCAK. I tried searching and found things like #726970: Drush bootstrap problem on OS X 10.6 but didn't immediately seem like a duplicate.
webchicks-MacBook-Pro:Sites webchick$ drush dl drupal
rsync: link_stat "/var/folders/X4/X4SWL9zbEOO5EnKsj9viy++++TI/-Tmp-/drush_tmp_1287878009/drupal/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-40/rsync/main.c(992) [sender=2.6.9]
Project drupal (6.19) downloaded to /Users/webchick/Sites/drupal. [success]
Project drupal contains 0 modules: .
Even though it says "success", the drupal folder is completely empty.
That weird-ass tmp directory seems to be coming from sys_get_temp_dir(). We removed that function call in D7 core due to problems it was causing with Mac users. (See http://drupal.org/node/551658#comment-2919160 and down) Not sure if that's also my problem here or something else.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | drush-dl-no-tests.patch | 2.19 KB | jonhattan |
| #12 | drush-950928.patch | 3.97 KB | jonhattan |
| #6 | debug.txt | 25.55 KB | webchick |
| #3 | drush-950928.patch | 2.6 KB | jonhattan |
Comments
Comment #1
moshe weitzman commentedWe made some changes to this code recently and broke something. I can reproduce the error. Hoping jonhattan can take a look.
Comment #2
jonhattanIt is
sys_get_temp_dir()and the rsync thing is because rename() fails indrush_move_dir().Comment #3
jonhattanSo the only solution I think of is having our own
file_directory_temp(). Patch attached.I'm not happy with the highly unprobable dead end someone can reach with this patch. Is fine to just exit() if no tmp directory available?
OTOH, does http://es.php.net/manual/en/function.tmpfile.php raise a similar error? This function is used by
core-cliandsql-query.Comment #4
webchickThis gives me:
So other than that odd warning, seems to be working great now. Yay!
And I had no idea about drush core-cli. OMG! How cool! Do you have suggestions on how I might test to see if the error occurs there? I did "dl cck" from within drush shell, and it did seem to work ok.
Comment #5
jonhattanI think entering core-cli is enough but to be sure, test if you have
cddavailable (it is not a command but a custom bash function).I'm confused about that spurious warning, and I think it is a bug if you use --drupal-project-rename. I think the problem is around
tar -xvfincommands/pm/package_handler/wget.inc:50:63. The first line in the tar output is expected to bedrupal-6.19/.Can you provide the output of
drush --debug dl drupal?. Note it is a big output so pipe it to a file.Comment #6
webchickHm.
Here's the debug output.
Comment #7
moshe weitzman commentedjust type cdd at the command prompt, not help cdd.
you can learn more about cdd with help core-cli
Comment #8
webchickIs "x drupal-6.19" a valid filename? I thought those Xs next to drupal-6.19/themes/pushbutton/tabs-option-off-rtl.png et al were merely decorative.
Comment #9
webchickOops. :P
Yes, it works fine. :)
Comment #10
jonhattan@webchick this is a Mac rarity. Expected output is:
I'd love to see also the output of
tar -tf drupal-6.19.tar.gz(this is what drush used before a big change in pm-download). If it does not prependxto each line we have to revert this part. If it's also x-prepended, a workaround will be needed, in despite of kittens.It could be also need to test this on windows...
Comment #11
webchicktar -tf does not prepend X:
Comment #12
jonhattanSo the fix is to revert to the old way: tar -xf & tar -tf
Comment #13
webchickYay! :D
(my, that's a lot of modules. :))
Marking RTBC. The only other thing I'd maybe suggest (if this was the Drupal core queue) is commenting the -tf / -xf lines if there's a high probability someone comes in later and tries to "clean up" this section of the code again.
Thanks so much for your quick work, jonhattan! Much appreciated.
Comment #14
jonhattanCommited, with doc for the need of -tf.
Comment #15
moshe weitzman commentedIdeally, we should not be listing hidden modules after success, even though drush is quite capable of enabling them.
Comment #16
jonhattanQuick shot. not all the hidden ones but all in
tests/.The full solution is to grep .info files, but it will only catch testing profile.
don't know if there're hidden but non-test modules in contrib/. If not, I like the approach in this patch. We can just add a special case for profile == testing.
tomorrow more/
Comment #17
webchickSeems like we should probably break this into another issue, but...
Here's the output this patch gives me (had to use cvs because ftp was timing out):
Much more betterer. :)
While there might be a use case for a non-test hidden = TRUE module (I'm thinking something like http://drupal.org/project/paranoia or http://drupal.org/project/killswitch), I would imagine that's by far the exception rather than the norm, so this approach should be fine. I guess it's possible that contrib also doesn't follow core's best practice of putting these modules into a sub-folder called 'tests', but then we could file task issues on those case-by-case.
I don't understand the code here enough to RTBC.
Comment #18
jonhattanMoved to a new issue #954702: Do not list test/hidden projects after drush dl