Common Drush Make errors and their solutions

Last updated on
11 July 2022

Packaging of drupal-org.make files present in a distribution on Drupal.org will end in November 2022. Drupal distributions can provide packaged downloads from alternative sources (ie. GitHub) or point users to documentation about running drush make locally or as part of a build process. Developers who want to manage an Install Profile with Composer are encouraged to get involved in the Distribution Modernization Initiative.  

When running drush verify-makefile on your distribution's make file, or when attempting to create a release of your distribution on Drupal.org, you may encounter errors. Only users with 'administer releases' permission on a project can see the errors on Drupal.org.

These are some common errors and what you can do about them.

projects[drupal] is not allowed in a regular drupal-org.make file.

This error will occur if you have a projects[drupal] entry in your .make file. Remove it.

If you're just including an official release of Drupal core in your distribution, all you need to do is define the top-level core attribute in your drupal-org.make file with an exact version and it will work. For example:

core = 7.31

However, if you need to define anything more complicated than that (for example, to include patches for core, to specify a -dev release, to checkout a specific Git revision from the end of a branch, etc), you must define these things in a separate drupal-org-core.make file. The only thing you can put in this separate file is your definition for the Drupal core project. For example:

drupal-org-core.make

api = 2
core = 7.x
projects[drupal][version] = 7.13
projects[drupal][patch][] = http://drupal.org/files/issues/992540-3-reset_flood_limit_on_password_reset-drush.patch
projects[drupal][patch][] = http://drupal.org/files/issues/object_conversion_menu_router_build-972536-1.patch

For more information about why this is necessary, see Managing Drush make files for an installation profile.

Project profile_name can not be included in itself.

This cause of a failed build for drupal-org.make in your packaging error messages (where profile_name is whatever the name of the project, the installation profile, you are building this distribution around, simply means you have lines like the following in your .make file, where profile_name is your profile, and you must remove it:

; Profiles
projects[profile_name][type] = "profile"</profiles>

The project download-level attribute 'branch' must be defined when the 'revision' attribute is specified on project '$project_name'.

You'll get this if you are specifying a git clone of a specific revision of the code, for example:

projects[ctools][type] = module
projects[ctools][download][type] = git
projects[ctools][download][revision] = 747151e

The problem is that the packaging system does not know how to resolve that to a particular branch of the code since commits can be part of multiple branches. The solution is to specify the exact branch you mean for that revision to come from. For example:

projects[ctools][type] = module
projects[ctools][download][type] = git
projects[ctools][download][revision] = 747151e
projects[ctools][download][branch] = 7.x-1.x

Although you're specifying both a revision and a branch, drush make is smart enough to use the most specific thing (the revision) when cloning. It just uses the branch information for other metadata (updating the .info files in the things it checked out, and for displaying the contents of the distribution on the release node).

The project-level attribute '$attribute_name' on project '$project_name' is not allowed

This means that you've put something in the array of attributes about a given project that the packaging system doesn't understand or can't allow. A common reason for this is that you put something at the project-level that needs to be defined in the download subarray. For example:

Invalid:

projects[ctools][revision] = 747151e

Valid:

projects[ctools][download][revision] = 747151e

The library '$name' cannot be downloaded from $url, the URL must be in the whitelist available at http://drupal.org/packaging-whitelist.

This could indicate one of two things:

1) Exactly what the error says; an external library must be both GPL-compatible and included in the list at http://drupal.org/packaging-whitelist in order to be included in a distribution hosted on Drupal.org.

2) The library is already in the list, but the URL that you are trying to download it from has not been whitelisted.

If the library is not found in the list, please follow the directions at Drupal.org Library Packaging Whitelist. If the URL isn't being accepted (for example, the project changed to a new URL), file an issue at the Drupal.org Library Packaging Whitelist issue queue to have the URL added.

The download-level attribute 'url' can only be used if it is pointing to git.drupal.org. The URL for project 'xxx' is invalid (username@git.drupal.org:sandbox/username/XXX.git).

Your .make file is pointing to a Drupal.org sandbox project, which has no official release. This capability is not supported.

ERROR: profilename-version specified an invalid 'core' attribute -- the core major version must match the API version of the release.

This error will happen upon attempting to create a project release if there is a mismatch between the core = X line in the drupal-org.make file and the Git branch/tag to which it's committed. Make sure that if your distro is being packaged from Git tag 7.x-1.5, its drupal-org.make file specifies core = 7.x, not core = 6.x.

ERROR: >> Unable to create /tmp/drush_tmp_...

Update: this is fixed in git. The fix will be released with Drush 5.5 and Drush 4.7.
Sadly, there appears to be a race condition inside drush make itself, and sometimes it gets a transient error about failing to create various temporary directories. Luckily, this almost always clears itself up automatically the next time the packaging script runs (every 5 minutes for official releases, every 12 hours for -dev snapshots). So, there's nothing you need to do in this case except take a break, stretch your wrists, relax your eyes, and fully enjoy a few deep breaths.

ERROR: unable to download https://...

It is possible a .make that includes a whitelisted URL that works using drush make on another server will fail to download when packaged on Drupal.org. This can be caused by issues with the SSL certificate on the server hosting the whitelisted URL. If that happens and using the non-secure URL is an option, request the whitelist be changed and/or the non-secure version of the URL be added. The error in the packaging is the same error you would see if the file had been moved and the URL returned a 404.

Help improve this page

Page status: No known problems

You can: