After running drush make on my makefile, there was a second, complete copy of the modules directory within itself, breaking the installation process. I don't know that this is necessarily related but it struck me as strange that I had to include drupal as one of the projects in my makefile for the make command to execute correctly. I've pasted my makefile below. It does execute without errors, and I am able to install Drupal after removing the extra modules directory.
core = 6.x
projects[] = "drupal"
projects[] = "advanced_help"
projects[] = "admin_menu"
projects[] = "cck"
projects[] = "cache_disable"
projects[] = "calendar"
projects[] = "calendar_block"
projects[] = "computed_field"
projects[] = "contemplate"
projects[] = "content_access"
projects[] = "date"
projects[] = "devel"
projects[] = "fckeditor"
projects[] = "filefield"
projects[] = "imageapi"
projects[] = "imagecache"
projects[] = "imagefield"
projects[] = "imagefield_crop"
projects[] = "local_menu"
projects[] = "login_destination"
projects[] = "node_export"
projects[] = "pathauto"
projects[] = "poormanscron"
projects[] = "token"
projects[] = "views"
projects[] = "webform"
projects[] = "weight"
libraries[jquery_ui][download][type] = "get"
libraries[jquery_ui][download][url] = "http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery-ui.js"
libraries[jquery_ui][directory_name] = jquery.ui
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 675162-3.patch | 1.73 KB | franskuipers |
| #7 | 675162-2.patch | 1.72 KB | franskuipers |
| #6 | 675162-1.patch | 968 bytes | franskuipers |
Comments
Comment #1
dmitrig01 commentedPlease post the log of running the same command with --debug.
Also, try using the dev (2.x) version.
Comment #2
dmitrig01 commentedComment #3
john.karahalis commentedI have been experiencing a similar issue while trying to build a drupal-org.make file. I believe davidfells means this -
If you already have a directory named "modules" in your working directory, Drush Make will place downloaded modules in a directory called ./modules/modules
Steps to repeat:
drush make --drupal-org [filename].makeExpected Result:
Modules are downloaded to the ./modules directory (e.g., ./modules/contrib/views)
Actual Result:
Modules are downloaded a ./modules/modules directory (e.g., ./modules/modules/contrib/views)
Comment #4
dmitrig01 commentedthis is due to the way the command mv works. I'll see if there is a flag which can stop this behavior - because what Drush make does is non-recursively copy all files over from a working tmp directory.
Comment #5
john.karahalis commentedAh, very interesting. That makes sense.
It looks like the
-Tflag is what you're looking for. I'm not exactly sure how Drush Make is architected, but here's a basic example of-Tusage:Original Directory Structure:
mv subdir dir/subdir creates the following structure:
mv -T subdir dir/subdir creates the following structure:
./dir/subdir/file2Of course, that bashes file1. Maybe some combination of the
-Tflag and some basic merging will do the trick.Or you could always use a combination of
cpandrmto do the same thing. For example:Comment #6
franskuipers commentedI tried to solve it with mv parameters, but didn't find any parameter working in all cases.
The patch tests if the destination dir exists, and uses cp -rf is so.
Fact is we overwrite already existing modules (without removing old files). A notice would be nice here, maybe we need to run update.php if we overwrite a project with a new version.
Let me know, then I will add a notice per module.
Comment #7
franskuipers commentedRealized last patch is only solving it when $base_path = '.'
New patch with deleting existing project and warning.
Comment #8
k4ml commented#7 patch seem to work with my intended workflow. I already have drupal core installed in `www`. My layout look like:-
`sites` is already generated skeleton with `all` and `default` directory. Now I want to run the following command:-
and have all the modules and themes downloaded into `sites/all/modules` and `sites/all/themes` respectively. Over the time I might add new project into contrib.make and re-running the command would download the newly added project. Would be nice if drush make could check first whether the project already exists (and up to date) rather than just redownloading everything again.
Comment #9
k4ml commentedLook like there's some nasty bug with patch in #7. My hg clone just been wiped out (or not copied). My .make file:-
drupal6-core directory is not created. Here some output with drush make --debug:-
Comment #10
sarasioux commentedNot sure if this helps, but I was having this problem and solved it by removing (or moving) the existing modules & themes folders out of the way before running the make command. Mine were stored in an install profile folder, so I was seeing /profiles/profilename/modules/modules.
Comment #11
k4ml commentedThat's the problem, you have to delete existing folders which mean it only useful for one off operation. You can't 'incrementally' add stuff your .make file, re-run it to get the newly added module.
I still can't find a way to solve this.
cp -awhile work quite well and simpler, doesn't copy hidden directory (.hg, .git etc). Using tar I have the problem with the leading path and have to use--strip-componentswhich I think useless unless we know the number of components to strip to get back original directory structure.Comment #12
franskuipers commented@k4ml regarding #9
The patch in #7 still only worked when $base_path = "." , not when $base_path = "drupal6_core".
Even this should work now and keeps your .hg directory:
From #8:
This seems not easy to implement, so I won't work on this. Redownloading is cheap these days.
Please test this new patch!
Comment #13
alex_b commentedI am using this patch right now to avoid the modules/modules/ directory effect. Works as expected. Setting to NR to catch the maintainer's attention :-)
Comment #14
seanrOddly, I run into this on one server, but not another. Both servers have local git repositories that include some custom modules. As I'm building the site on one server, I'll use git push, and then git pull on the other server and run ./rebuild.sh, and it create the improperly nested folders. ./rebuild.sh on the original server does not cause that. Any idea why it works on one and not the other?
Comment #15
arcane commentedAfter I run the patch from #7, .htaccess file is created as a directory. Afterwards I am not able to access my website because .htaccess file is missing.
Comment #16
dmitrig01 commentedCan you try adding a tests? There's a new section in README.txt describing how to do that.
Comment #17
dmitrig01 commentedComment #18
dmitrig01 commentedComment #19
dmitrig01 commentedI decided to take a completely different approach
Comment #20
john.karahalis commentedWas this fixed in beta8? What was the different approach?
Comment #21
dmitrig01 commentedit was - i used cp -rn i believe