Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
awssdk.make should only checkout the AWS SDK library, not the libraries module itself. User's may already have a specific 2.x version of libraries in use. For example, the distro I'm building has pinned libraries 2.x to a specific commit via a git checkout. It also places the module in /modules/contrib. AWS SDK's make file downloads a duplicate version of libraries into /modules and I can't stop it.
Comment | File | Size | Author |
---|---|---|---|
#12 | 1240610-2-remove-libraries.patch | 355 bytes | thsutton |
#6 | 1240610-awssdk-duplicate-libraries-4.3.patch | 444 bytes | rickvug |
#5 | 1240610-awssdk-duplicate-libraries-4.2.patch | 435 bytes | rickvug |
#1 | 1240610-awssdk-duplicate-libraries.patch | 439 bytes | rickvug |
Comments
Comment #1
rickvug CreditAttribution: rickvug commentedPatch attached.
Comment #2
boombatower CreditAttribution: boombatower commentedAre you using drush make -dev which has a fix for recursive make files? I have a site I run that has a make file that includes a tree of make files and I can override the libraries version in the primary make file...it just has to be included by drush make first.
The structure of dependencies works fine otherwise since AWS SDK should be lower down the tree then any distro.
If anything this sounds like your make file structure is messed up or a drush make bug. If you have the same key name 'libraries' in the projects array in your make file it should ignore any entries after the first one.
Comment #3
rickvug CreditAttribution: rickvug commented@boomatower Adding the patch above into the profile make file actually fixed the issue. A custom patched version of drush make is being used on the project for mercurial support. I'm not sure of the version but I doubt that it is based on the dev code. drush make must apply patches before reading a module's make file.
Comment #4
boombatower CreditAttribution: boombatower commentedWhatever works, but as I said I have a project with a primary profile make file that ends up including ~15 other makes recursively and I can override any of the latter make files by placing things in the profile make file. I do so on a regular basis to stick to a static release/commit as you mentioned.
When your custom version gets updating or if you haven't done so already try out that approach.
Comment #5
rickvug CreditAttribution: rickvug commentedAttaching a new patch against 4.2 for my own benefit. At present time the project I'm working on doesn't have an up to date version of drush make so a patch is required.
Comment #6
rickvug CreditAttribution: rickvug commentedAnother re-roll for my own benefit.
Comment #7
boombatower CreditAttribution: boombatower commentedCan you please just use the proper method and place a line ahead of it in your primary make file? Fix your drush make, but otherwise this is rather silly.
Solved...done...simple as that.
Comment #8
girishmuraly CreditAttribution: girishmuraly commentedAdding libraries *after* awssdk in the profile's make file overrides the awssdk.make file setting successfully. So the order to be used in the distro profile make file is awssdk first, then libraries. viz:
Edit: Please see further clarification in my next comment based on more testing.
Comment #9
rickvug CreditAttribution: rickvug commented@girishmuraly Thanks for documenting that.
Comment #10
girishmuraly CreditAttribution: girishmuraly commentedI'm sorry I'm having to re-open this because further testing showed erroneous behaviour in two different versions of drush.
I'm specifically comparing here (drush 4.5 + drush_make 6.x-2.3) vs. drush 5.8 (which has drush_make within it)
I have the same use case as rickvug above: I have an install profile that has [libraries] module and [awssdk] module to be downloaded in its make file.
So myprofile.make looks like
I am trying to run 'drush make' on myprofile.make.
The following are various combinations of placing the projects[] array within the profile's make files tried in the two different versions of drush and running `drush make` on myprofile,make.
Drush 4.5 + drush_make 6.x-2.3
Case 1
Downloading only awssdk module in myprofile.make (with the hope that awssdk.make will get Libraries module for me)
Result: Libraries module is downloaded as specified in awssdk.make and is placed in myprofile/modules/
Now I really do not want to put libraries in myprofile/modules/. I want it in myprofile/modules/contrib/. So I try..
Case 2
Add AWSSDK first, then Libraries module in mpyprofile.make, like so:
Result: This places libraries module in myprofile/modules/contrib/ only (which is how I'd expect it).
Case 3
Add Libraries first, then AWSSDK module in mpyprofile.make, like so:
Result: Libraries module is placed in myprofile/modules/contrib/ only (like case 2 above). So there is no difference based on the order of modules specified in myprofile.make file.
Now onto strange things..
Drush 5.8
Case 1
Downloading only awssdk module in myprofile.make
Result: Libraries module is downloaded as specified in awssdk.make and is placed in myprofile/modules. As expected.
Again, I really do not want to put libraries in myprofile/modules/, but rather in myprofile/modules/contrib/. So I try..
Case 2
Add AWSSDK first, then Libraries module in mpyprofile.make, like so:
Result: This places libraries module in myprofile/modules/ and myprofile/modules/contrib/ which I did not expect!
This is definitely a problem as it would have code defined twice.
Case 3
Add Libraries first, then AWSSDK module in mpyprofile.make, like so:
Result: Same as in case 2 above - puts libraries module in myprofile/modules/ and myprofile/modules/contrib/
I tested this on two different machines with drush 5.8 and got the same result.
Note: In all the cases above, the 'aws-sdk-for-php' lib mentioned in awssdk.make gets correctly downloaded to myprofile/libraries/awssdk/ which is correct and works, so is not discussed more here.
I guess there is some bug in drush5 or drush_make in one of the issue queues that lists this problem.
Due to these differences in drush (make) I think we should remove the libraries module from awssdk.make and leave it as a dependency in awssdk.info. Especially since drush 5.8 - the newest version - gives wrong results. Install profiles could define where exactly they want to place libraries and which version they need.
Comment #11
DamienMcKennaThen there's the simple thing that a module shouldn't force downloading its dependencies, let the site builder deal with that.
Changing this to a Bug Report as this is a fault in the module.
Comment #12
thsutton CreditAttribution: thsutton commentedThanks for your work on this module.
Is there any chance of getting this issue resolved?
As @DamienMcKenna mentioned, it's not up to this module where I put the Libraries module on my site and, as @girishmuraly noted, the functionality you seem to use doesn't work in Drush 5.8.
Comment #13
marcelovaniShall we move to https://www.drupal.org/node/2654126
Comment #14
marcelovaniFixed here https://www.drupal.org/node/2654126