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.
My current understanding is that Drush adds information to .info files for git cloned repos so they can work with the d.o. update server. An example of this is:
; Information added by drush on 2013-01-16
version = "unknown"
project = "example"
datestamp = "1358344247"
The problem is I already set the version property at the top of my .info file and Drush is overriding it. The top of my .info file:
name = Example
description = Install profile for example
version = 1.0
core = 7.x
files[] = example.info
files[] = example.profile
As a result, the Status report on my Example site states that the profile is "example-unknown". It should say "example-1.0". I suggest not overriding properties in .info files if they are already set.
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedThere is an option to disable that overwriting. You can set it in a drushrc.php and forget about it.
Comment #2
dkingofpa CreditAttribution: dkingofpa commentedI thought some of the overwriting was necessary? If it isn't, why do it at all (or at the very least, why make it default)? Are there use cases where you wouldn't want to place that disable option in a drushrc.php file? For example, git repos cloned from d.o. vs. custom module repos?
Comment #3
dkingofpa CreditAttribution: dkingofpa commentedComment #4
jhedstromIs this for a module hosted on d.o.? If so, then that information should not be committed to the repository. If this is for a module hosted elsewhere, then this issue would appear to be a duplicate of #1881378: .info rewriting happens for private modules.
Comment #5
dkingofpa CreditAttribution: dkingofpa commentedI think you're right. This can be considered a duplicate of #1881378: .info rewriting happens for private modules.