Hi,

I am using the latest version of Aegir that includes drush_make and uses it to install parts of the aegir frontend. My installation went fine and Aegir is working correctly so i would assume that Drush Make is working.

I have confirmed that the drush_make files are in the .drush folder alongside provision.

This is my experience while trying to install managing news using the supplied.make file. I should point out that I have tested this with the feature server make file from Devseed and I get the same result.

I am in my var/aegir/,
I have copied and pasted the code from Mig5's managing news make file into a file called managingnews.build in this folder
I run php drush/drush.php make managingnews.build

A Drupal installation directory could not be found [error]
The command 'drush.php make managingnews.build' could not be found.

I am following the instructions on http://www.mig5.net/content/building-drupal-applications-drushmake-provi...

Any help would be appreciated

Thanks
Gregg

Comments

Anonymous’s picture

This seems to occur only if a destination directory is not given. I am not sure if this is a bug or by design now with all the recent changes but I can reproduce it.

It also only seems to occur if the full path to drush is not given. See this alternative where I specify the absolute path to drush

aegir@li83-39:~$ php /var/aegir/drush/drush.php make builds/managingnews.build 
Make new site in the current directory? (y/n)

On top of that, if you *don't* specify the absolute path, but specify a destination dir for the build, you get this error:

aegir@li83-39:~$ php drush/drush.php make builds/managingnews.build managingnews
Project information for drupal retrieved.                            [ok]
drupal downloaded from                                               [ok]
http://ftp.drupal.org/files/projects/drupal-6.14.tar.gz.
Unable to export managingnews from                                   [error]
pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib
contributions/profiles/managingnews.
An error occurred at function : drush_drush_make_make                [error]

This error also occurs if one choose 'y' to build in the current dir per the scenario where the absolute path has been specified.

I am not sure if recent changes in the makefile format could have caused this.

Anonymous’s picture

Just noticed the missing slash. Didn't spot it because of the line wrap. drupal-contribcontributions

Unable to export hostmaster from pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contribcontributions/profiles/hostmaster

Is a slash being stripped in drush_make that shouldn't be, or are we expected to put a forward slash now? the relevant part of the aegir.make is this

 	projects[hostmaster][download][root] = "pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib"
 	projects[hostmaster][download][module] = "contributions/profiles/hostmaster" 

Should it now be this?

 	projects[hostmaster][download][root] = "pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib"
 	projects[hostmaster][download][module] = "/contributions/profiles/hostmaster" 

(keep in mind that the next release is going to be doing this with git anyway, so it might be a moot point.. i.e we won't really be able to 'fix' it since the makefile will differ for the next release). But since this is how it has been done all this time, it might need documenting if it's by design.

Anonymous’s picture

Title: Drush Make & Aegir » drush_make no longer concatenates the [root] with [module] using a slash, breaking cvs checkouts in existing makefiles.
Version: 6.x-2.0-beta3 » 6.x-2.0-beta5
Priority: Normal » Critical

changing title and version

Anonymous’s picture

I see that the missing slash is actually only in the error message being thrown:

 drush_make_error('DOWNLOAD_ERROR', dt('Unable to @command %project from %root %module.', array('%project' => $name, '@command'=> $command, '%root' => $download['root'], '%module' => $download['module'])));

so this is perhaps not the problem here and probably occurs earlier. Sorry for the noise.

Anonymous’s picture

Title: drush_make no longer concatenates the [root] with [module] using a slash, breaking cvs checkouts in existing makefiles. » old makefiles using cvs don't specify the first : colon in the cvsroot, thus breaking in new versions of drush_make
Priority: Critical » Normal

Running with debug on a cvs build reveals it's a badly formatted CVSROOT. It is missing the first full colon :

Executing: cvs                                                          [notice]
-d'pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib'
'export' -d'managingnews' '-rDRUPAL-6--1'
'contributions/profiles/managingnews' [1.688 sec]
  cvs export: CVSROOT password specification is only valid for
  cvs export: pserver connection method.
  cvs [export aborted]: Bad CVSROOT: `pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib'.
Unable to export managingnews from                                   [error]

Looks like the full colon was added for the default ['root'] if not specified, in this commit

where it used to hardcode it

drush_shell_exec("(cd %s; cvs -d:%s export -d%s %s %s)", $this->project->tmp_path, $this->project->download['root'], $this->project->name, $flags, $this->project->download['module']);

So I guess it is existing makefiles that need to change to this format, if they choose to specify the ['root'] (which I guess is not really necessary), to include the first : colon.

I suppose you can mark this as 'won't fix' then, since you've already 'fixed' it and it is the existing makefiles that people will need to update where necessary.

dmitrig01’s picture

We should format it for them. running a simple trim($download['root'], ':') should do it.

dmitrig01’s picture

(and then prepend the colon)

iaminawe’s picture

Hi Mig5 & Dimitri

Thanks for the suggestions above. I found that my problem was actually that I was not running the drush make command as the aegir user... doh

So now the drush make files are doing their magic but for some reason, after I have watched all the dependencies download, I cannot find the downloaded files anywhere on my system.

An example is this, I change to the aegir user with su -s /bin/sh aegir

Then I run this make file from /var/aegir/platforms where my make file is stored.
php /var/aegir/drush/drush.php make featureserver.make /var/aegir/platforms/featureserver

I would expect there to be a featureserver folder created but I dont see anything new in the folder.
Doing a find / -name 'featureserver' does not find it anywhere on my server

Any ideas?

Thanks

iaminawe’s picture

ahhh if it isn't forgetting to change to the aegir user its permissions... seem to trip me up all the time.

I needed to chown the entire platforms folder as the aegir user and then it works fine...

Thanks for help
Gregg

hunmonk’s picture

i'd just as soon we 'won't fix' this -- it seems weird to have allowed that format in the first place. the first colon seems like it should be an actual part of the declaration in the .make file.

or, if we want to give people some time, we can at least toss a deprecation warning in there, and then remove the hack in 6.x-3.x -- but since we haven't even cut an official release yet, i say a small change like this is totally legal ;)

dmitrig01’s picture

I think that it's ok if we provide a specific warning. However, it would be just as much code to include the colon (maybe even less) so we might as well do it.

$this->download['root'] = ':' . trim($this->download['root'], ':');

hunmonk’s picture

you can't do that -- it breaks being able to use a local repository, which is why i moved the colon in the first place. i suppose you could inspect the root string for pserver and add the colon conditionally, but really -- it would be so much cleaner if we just made people use the right format from now on. :)

yhahn’s picture

I'm with what hunmonk says in #10.

I've committed: http://drupal.org/cvs?commit=302372 which pushes this standardization into the --working-copy option as well.

ahabman’s picture

My drupal newbie error was caused by not having CVS installed. It showed up as

Unable to export [something] from :pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib contributions/modules/admin.

yajnin’s picture

Had this issue. "chown aegir:aegir /var/aegir" cleared it up.

frankcarey’s picture

Note: I had to use the following to get a profile downloaded

core = 6.17
projects[] = drupal
projects[topmodules][download][type] = "cvs"
projects[topmodules][download][module] = "contributions/profiles/topmodules"
projects[topmodules][download][revision] = "HEAD"
luchochs’s picture

Thanks ahabman, your observation helped another newbie (alias Luciano.) in the world of the profiles and CVS.

dmitrig01’s picture

Status: Active » Fixed

I don't believe there's a problme here :D

Status: Fixed » Closed (fixed)

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