安装配置文件中的Drupal模块案例问题

时间:2013-05-08 08:50:21

标签: drupal-7 drush

我一直在尝试创建一个Drupal 7安装配置文件,但似乎某些模块对install_verify_requirements()验证的名称和实际的模块安装目录(主要影响unix / linux安装)使用不同的大小写,这是一个例子:

# myprofile.info

name = myprofile
description = Some name for my profile
core 7.x

; Core
dependencies[] = block
dependencies[] = color
dependencies[] = comment
dependencies[] = contextual
dependencies[] = dashboard
dependencies[] = help
dependencies[] = image
dependencies[] = list
dependencies[] = menu
dependencies[] = number
dependencies[] = options
dependencies[] = path
dependencies[] = taxonomy
dependencies[] = dblog
dependencies[] = search
dependencies[] = shortcut
dependencies[] = toolbar
dependencies[] = overlay
dependencies[] = field_ui
dependencies[] = file
dependencies[] = rdf

; Contrib
dependencies[] = ctools
dependencies[] = features
dependencies[] = pathauto
dependencies[] = views
dependencies[] = entitycache
dependencies[] = storage_api 

并且

# myprofile.make
core = 7.x
api = 2
projects[drupal][type] = core

; Contrib Modules
projects[] = ctools
projects[] = features
projects[] = pathauto
projects[] = views
projects[] = entitycache
projects[] = storage_api

当你跑步时:

drush make profiles/myprofile/myprofile.info

所有项目都会在没有问题的情况下下载到profiles / myprofile / modules中,但只要你尝试

drush site-install

您收到错误报告未找到Storage_api模块。你注释掉storage_api,一切都按预期工作。

有关如何将模块安装路径从storage_api设置为Storage_api的任何线索,所以install_verify_requirements()函数实际上找到了应该找到的内容?或者只是强制小写检查的任何方式?

提前致谢!

1 个答案:

答案 0 :(得分:0)

问题是实际上storage_api不包含任何名为storage_api的东西。相反,myprofile.info文件应该包括

dependencies[] = storage
dependencies[] = storage_core_bridge
dependencies[] = storage_audit
dependencies[] = storage_audit_test

而不是dependencies[] = storage_api

一般来说,这样做很明智:

$ find ./modules/module -name "*.install"实际上可以找到可配置的dependencies[]