Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using makefile with install profile and download:type: copy puts files in wrong location #2311

Closed
jonpugh opened this issue Aug 16, 2016 · 7 comments
Assignees

Comments

@jonpugh
Copy link
Contributor

jonpugh commented Aug 16, 2016

I'm working on setting up automated tests for Aegir using Travis.

I was able to get the "hosting" drupal modules to copy from a local path using download type == 'copy', but when I try to do the same for hostmaster, my install profile ends up in sites/all/modules.

Steps to reproduce:

  1. Get a drupal distribution:

    git clone http://git.drupal.org:project/hostmaster
    
  2. Setup a makefile to copy that profile:

    build-local.make

      core = 7.x
      api = 2
    
      projects[drupal][type] = "core"
    
      # Travis docker-compose.yml puts hosting module at /source/hostmaster
      projects[hostmaster][type] = "profile"
      projects[hostmaster][download][type] = "copy"
      projects[hostmaster][download][url] = "hostmaster"
  3. Run drush make

    drush make build-local.make built
    
  4. Look for the profile in the expected location. It's not there.

    $ ls -la built/profiles
    total 24
    drwxr-xr-x. 5 jon jon 4096 Jul  7 14:25 ./
    drwxr-xr-x. 9 jon jon 4096 Jul  7 15:08 ../
    drwxr-xr-x. 3 jon jon 4096 Jul  7 14:25 minimal/
    -rw-r--r--. 1 jon jon 1041 Jul  7 14:25 README.txt
    drwxr-xr-x. 3 jon jon 4096 Jul  7 14:25 standard/
    drwxr-xr-x. 3 jon jon 4096 Jul  7 14:25 testing/
    
  5. Look for the profile in sites/all/modules. There it is!

    $ ls -la built/sites/all/modules
    total 28
    drwxr-xr-x.  6 jon jon 4096 Aug 16 13:33 ./
    drwxr-xr-x.  5 jon jon 4096 Jul  7 14:25 ../
    drwxr-xr-x.  8 jon jon 4096 Aug 16 13:33 aegir/
    drwxr-xr-x. 11 jon jon 4096 Aug 16 13:33 contrib/
    drwxr-xr-x.  4 jon jon 4096 Aug 16 13:33 developer/
    drwxr-xr-x.  3 jon jon 4096 Aug 16 13:32 hostmaster/
    -rw-r--r--.  1 jon jon 1474 Jul  7 14:25 README.txt
    
@jonpugh
Copy link
Contributor Author

jonpugh commented Aug 16, 2016

Ping @ergonlogic: this bug is preventing automated testing on hostmaster.

@helmo
Copy link
Contributor

helmo commented Aug 16, 2016

I think it's recursing into the profile to run the included hostmaster.make ... after that it's handled as a module .... 'DrushMakeProject_Module Object'

@jonpugh
Copy link
Contributor Author

jonpugh commented Aug 16, 2016

Ah, interesting.

I am testing now with openatrium, which does not have an openatrium.make file....

@jonpugh
Copy link
Contributor Author

jonpugh commented Aug 16, 2016

Nope! It's not just hostmaster. OpenAtrium also installs in the wrong place.

 $ ls -la test-atrium/sites/all/modules 
total 28
drwxr-xr-x.   6 jon jon 4096 Aug 16 17:10 ./
drwxr-xr-x.   5 jon jon 4096 Jul  7 14:25 ../
drwxr-xr-x.  39 jon jon 4096 Aug 16 17:10 apps/
drwxr-xr-x. 130 jon jon 4096 Aug 16 17:10 contrib/
drwxr-xr-x.   7 jon jon 4096 Aug 16 17:05 openatrium/
drwxr-xr-x.  12 jon jon 4096 Aug 16 17:10 panopoly/
-rw-r--r--.   1 jon jon 1474 Jul  7 14:25 README.txt

Just FYI it's really slow, and errored out, so I had to use...

drush make build-atrium.make test-atrium --force-complete --concurrency=5

Much faster!

@jonpugh
Copy link
Contributor Author

jonpugh commented Aug 16, 2016

tracking it up the chain...

It's a module in drush_make_process() when it's loaded from the temporary file...

@jonpugh
Copy link
Contributor Author

jonpugh commented Aug 16, 2016

Ok! I got the profile (and all dependant modules) into the right place using

projects[hostmaster][contrib_destination] = "profiles"

Once that worked I realized that the default might be being set for hostmaster as well, so I looked and found

defaults[projects][subdir] = "contrib"

in drupal-org.make.

Commenting out this (and removing the contrib_destination option above) also worked.

jonpugh added a commit to aegir-project/tests that referenced this issue Aug 16, 2016
@greg-1-anderson
Copy link
Member

Make is deprecated. Closing old issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants