A minor issue occurs when using Drush make. I get the following warning:

Found makefile: shadowbox.make [ok]
You need to specify an API version of two in your makefile: [warning]
api = 2

This occurred with Drush 3.3 and Drush Make 2.0-beta9.
Please add a line with "api = 2" in the make file and Drush make will make sweet love to you again.

Comments

tunic’s picture

Priority: Minor » Normal

Subscribing.

Drupal 7 version is afftected too.

The real problem is that any makefile that includes shadowbox will fail because the api version number missing in the shadowbox included makefile, so it will be unable to deploy a drupal installation along the modules and themes contained (well, you can get de deployed files from /tmp but I guess is not the right way).

Now that Drupal gets more and more automated and console driven I think it's a big problem.

Changing priority to normal.

manfer’s picture

StatusFileSize
new421 bytes

I attach patch for 6.x version. It has been commited.

manfer’s picture

Version: 6.x-4.x-dev » 7.x-3.0-beta1
StatusFileSize
new421 bytes

Same needed on 7.x version. Patch attached. It has been commited.

manfer’s picture

Status: Active » Needs review
tjodolv’s picture

Hello. I'm getting this error when I attempt to install drupal with drush make and shadowbox as one of the modules:

shadowbox downloaded from http://ftp.drupal.org/files/projects/shadowbox-6.x-4.2.tar.gz.   [ok]
Found makefile: shadowbox.make   [ok]
You need to specify an API version of two in your makefile:   [warning]
api = 2
No core project specified.   [error]
shadowbox downloaded from http://www.shadowbox-js.com/download.   [ok]

I'm not sure why, because the core parameter is specified in both my makefile and the shadowbox.make file.

Could one possible solution be to just name the file shadowbox.make.example, and provide it as an example for how to specify the library parameters in a custom makefile? This may be an issue with drush make, but as it is now, it's fixed by not including shadowbox in my makefile, and just install it manually afterwards.

Note: This was done with the 6.x version, not 7.x.

manfer’s picture

The api = 2 line in the make file has been added and committed to 6.x-4.x branch the 6.x-4.2 version has the make file problem as reported in this thread.

In your output 6.x-4.2 is referenced and that's why the problem appears.

I'm not familiarized with make. It is something new for me. I would look how it works. Anyway if it helps, the correct version that should be referenced, the one with the patch aplyed is:

http://ftp.drupal.org/files/projects/shadowbox-6.x-4.x-dev.tar.gz

I suppose in some place in your make file there is a way to reference that tag:
...[shadowbox][download][tag] = "6.x-4.x-dev"
instead of:
...[shadowbox][download][tag] = "6.x-4.2"

or something similar. I repeat I'm not familiarized with drush make. I would need your help on this. Sorry and thanks.

If this can't be done I can think about the possibility of making a new fixed release 6.x-4.3 version.

This still needs review.

tjodolv’s picture

To be more precise: The warning about the API line is just a warning, and drush make will assume "2" as the default. However, the error about core is something else, and to be honest, I don't understand why it shows up. The shadowbox.make file simply declares it one more time (just like a PHP variable can be redeclared?) but that makes the drush make process "lose track" of what the drupal core version is, and it fails with the error. I'm not an expert on drush make myself, but I'll use it more (and shadowbox too :) ).

I'll leave a note about this in drush_make's issue queue as well.

manfer’s picture

Ups, I hadn't notice the other issue: "No core project specified. [error]" :)

I would really appreciate anyway if someone can confirm the api version warning disappears when 6.x-4.x-dev version is used. I will try myself.

And let's investigate the core project problem. Thanks.

manfer’s picture

I don't think the error is something about the core version but the core project. In the drush make example we can read:

; Core project
; ------------
; In order for your makefile to generate a full Drupal site, you must include
; a core project. This is usually Drupal core, but you can also specify
; alternative core projects like Pressflow. Note that makefiles included with
; install profiles *should not* include a core project.

After some read and knowing this make file in shadowbox is to be used to download the shadowbox library, what I have not clear is if this should be only an example on how to include that part of the make file to your custom make file (with core and other modules) or it is something supposed to be used to automate the installation of the shadowbox library too in an already working drupal site. I think it is only an example.

I postpone this issue.

If someone knows exactly what this is for please report what would be the correct shadowbox.make file. And if you think I should rename the file cause it is only an example to include that code in other make file give me your advice too.

Thanks.

tunic’s picture

As manfer pointed out problem is that you have to include the general core version (6.x) modules must be compatible with, and the exact drupal project installation profile, because you can also downloa, for exampled, a Managing News instead of default Drupal core.

So, you have to include:

api = 2
projects[] = drupal

...along the already included "core = 6.x".

Why have you to include this information in a makefile that just download a library from Internet? Well, in this case it may be too much, but in general Drush Make must know this data to fetch the right versions. I suppose is easier for Drush Make to just ask for that data in all makefiles than to be smart enought to know when are needed. In fact I guess in this case projects[] = drupal is just ignored (but required).

So, final makefile content for 6.x should be (without initial comments):

core = 6.x

api = 2

projects[] = drupal

libraries[shadowbox][download][type] = "post"
libraries[shadowbox][download][post_data] = "format=tar&adapter=jquery&players[]=img&players[]=iframe&players[]=html&players[]=swf&players[]=flv&players[]=qt&players[]=wmp&language=en&css_support=on"
libraries[shadowbox][download][file_type] = "tar.gz"
libraries[shadowbox][download][url] = "http://www.shadowbox-js.com/download"
libraries[shadowbox][directory_name] = "shadowbox"
libraries[shadowbox][destination] = "libraries"

The same for 7.x just changing core major number.

I have tested it using a local git repository with modified shadowbox.make to simulate the whole drush make process and works ok. A full Drupal site with shadowbox is deployed, with shadowbox library deployed in sites/all/libraries.

Sorry for not attaching a patch, I'm learning git...

manfer’s picture

Status: Needs review » Fixed

Thanks for the explanation and tests.

Pushed to 6.x-4.x (dev version) and to 7.x-3.x, new 7.x-3.0-beta3 released.

tunic’s picture

Thanks for yor commit, now drush make makefiles that include shadowbox works like a charm :-)

Tested with D6 version.

Note for drushmakers: remember you have to set version to 4.x-dev, at least until the recommended version includes this fix.

Status: Fixed » Closed (fixed)

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

  • Commit 62160af on 7.x-3.x, 8.x-1.x by manfer:
    #949392 by xatoo_,tunic: Fixed make file.
    
    
  • Commit d41d893 on 7.x-3.x, 8.x-1.x by manfer:
    Issue #949392 by manfer: Fixed make file adding api version.