Can I move the sites and profiles directories?
I'd like to separate my work from core Drupal. As of 5.x, Drupal supports the sites/all directory, where I can put my modules and themes. And that's a great step in the right direction. However, to make my source code more manageable, I'd like my sites and profiles to be outside the Drupal directory. Without going into too much detail, this will allow me to manage my code with svn's externals property. So today my directory structure looks something like this: www/drupal-5.1/index.php www/drupal-5.1/sites/ www/drupal-5.1/profiles/ www/drupal-5.1/[lots of other things] And what I'd like is something like: www/drupal-5.1/index.php www/sites/ www/profiles/ www/drupal-5.1/[lots of other things] The trick then would be to get Drupal to find my sites and profiles directories. Is my only option to hack core? Any other suggestions? Note that I don't want to set up symbolic links from www/drupal-5.1/sites to my sites directories. I have my code (including the drupal core I am using) in subversion, and I'd like to checkout out an entire site in a single step. Having to replace Drupal's sites and profiles directories with symbolic links is an extra step I'd like to avoid. Thanks in advance for any help, -Dave
On 6/9/07, Dave Cohen <drupal@dave-cohen.com> wrote:
Note that I don't want to set up symbolic links from www/drupal-5.1/sites to my sites directories. I have my code (including the drupal core I am using) in subversion, and I'd like to checkout out an entire site in a single step. Having to replace Drupal's sites and profiles directories with symbolic links is an extra step I'd like to avoid.
SVN supports symbolic links. See https://svn.bryght.com/dev/browser/bryghtbase/DRUPAL-5/trunk for an example layout. We have a top level modules, profiles, themes, modules, and patches directory. Symlinks abound. -- Boris Mann Office 604-682-2889 Skype borismann http://www.bryght.com
Quoting Boris Mann <boris@bryght.com>:
On 6/9/07, Dave Cohen <drupal@dave-cohen.com> wrote:
Note that I don't want to set up symbolic links from www/drupal-5.1/sites to my sites directories. I have my code (including the drupal core I am using) in subversion, and I'd like to checkout out an entire site in a single step. Having to replace Drupal's sites and profiles directories with symbolic links is an extra step I'd like to avoid.
SVN supports symbolic links.
See https://svn.bryght.com/dev/browser/bryghtbase/DRUPAL-5/trunk for an example layout. We have a top level modules, profiles, themes, modules, and patches directory. Symlinks abound.
This is cool. I'll have to give it a try. On windows directory junction points would probably work as well. Boris do you know how the windows client works in regard to a checkout from your server with the symbolic links? Does it create junction points or does it just create copies? I'll go ask an SVN list. Earnie
On 6/10/07, Earnie Boyd <earnie@users.sourceforge.net> wrote:
SVN supports symbolic links.
See https://svn.bryght.com/dev/browser/bryghtbase/DRUPAL-5/trunk for an example layout. We have a top level modules, profiles, themes, modules, and patches directory. Symlinks abound.
This is cool. I'll have to give it a try. On windows directory junction points would probably work as well. Boris do you know how the windows client works in regard to a checkout from your server with the symbolic links? Does it create junction points or does it just create copies? I'll go ask an SVN list.
Don't know, good luck, wouldn't trust symbolic links on Windows. (erm....don't use Windows? and yes, I am serious....you an easily run VMware locally....) -- Boris Mann Office 604-682-2889 Skype borismann http://www.bryght.com
On Jun 9, 2007, at 4:05 PM, Dave Cohen wrote:
I'd like to separate my work from core Drupal. As of 5.x, Drupal supports the sites/all directory, where I can put my modules and themes. And that's a great step in the right direction.
However, to make my source code more manageable, I'd like my sites and profiles to be outside the Drupal directory. Without going into too much detail, this will allow me to manage my code with svn's externals property.
So today my directory structure looks something like this:
www/drupal-5.1/index.php www/drupal-5.1/sites/ www/drupal-5.1/profiles/ www/drupal-5.1/[lots of other things]
And what I'd like is something like:
www/drupal-5.1/index.php www/sites/ www/profiles/ www/drupal-5.1/[lots of other things]
I'll second Boris. I'm using symbolic links in my SVN in a similar manner. I haven't tested it with profiles, but my structure is something like this: www/drupal-5.1 www/local/ www/local/modules www/local/themes www/local/files and in sites/all/ I've made symbolic links to ../../../local/modules and the same for themes. Files gets ../local/files placed in drupal-5.1. This works well because none of these directories are included with a default Drupal installation. After this I import the www directory into my repository and it works fine on the server and on my localhost. I tried putting all my profiles into a subdir under /profiles. i.e. at profiles/myprofiles/profilename.profile. But this doesn't work and results in a "failed opening ./profiles/profilename.profile" error. Are you having any other problems with symbolic links? -Mike __________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 714.356.0168
Thanks for the tip, guys. By checking the symbolic link into svn, it looks like I'll get what I want. I was afraid any developer checking out the tree would have to create a links manually. (Although I'm wondering if this works on Windows.) -Dave On Saturday 09 June 2007 06:38:00 pm Michael Prasuhn wrote:
I'll second Boris. I'm using symbolic links in my SVN in a similar manner. I haven't tested it with profiles, but my structure is something like this:
www/drupal-5.1 www/local/ www/local/modules www/local/themes www/local/files
and in sites/all/ I've made symbolic links to ../../../local/modules
one more example - see the svn repository which advantagelabs makes available to the world. it has all core drupal versions and all of the top contributed modules. it is a real nice service. - http://svn.advantagelabs.com Dave Cohen wrote:
I'd like to separate my work from core Drupal. As of 5.x, Drupal supports the sites/all directory, where I can put my modules and themes. And that's a great step in the right direction.
However, to make my source code more manageable, I'd like my sites and profiles to be outside the Drupal directory. Without going into too much detail, this will allow me to manage my code with svn's externals property.
So today my directory structure looks something like this:
www/drupal-5.1/index.php www/drupal-5.1/sites/ www/drupal-5.1/profiles/ www/drupal-5.1/[lots of other things]
And what I'd like is something like:
www/drupal-5.1/index.php www/sites/ www/profiles/ www/drupal-5.1/[lots of other things]
The trick then would be to get Drupal to find my sites and profiles directories. Is my only option to hack core? Any other suggestions?
Note that I don't want to set up symbolic links from www/drupal-5.1/sites to my sites directories. I have my code (including the drupal core I am using) in subversion, and I'd like to checkout out an entire site in a single step. Having to replace Drupal's sites and profiles directories with symbolic links is an extra step I'd like to avoid.
Thanks in advance for any help,
-Dave
participants (5)
-
Boris Mann -
Dave Cohen -
Earnie Boyd -
Michael Prasuhn -
Moshe Weitzman