I have been building install profiles that are different than the two provided by core and found an issue with the way dependencies are installed. In the Standard Profile the order items are installed is

Array
(
    [0] => user
    [1] => field_sql_storage
    [2] => block
    [3] => number
    [4] => list
    [5] => node
    [6] => options
    [7] => filter
    [8] => text
    [9] => color
    [10] => field
    [11] => comment
    [12] => contextual
    [13] => dashboard
    [14] => dblog
    [15] => field_ui
    [16] => file
    [17] => taxonomy
    [18] => help
    [19] => image
    [20] => menu
    [21] => overlay
    [22] => path
    [23] => rdf
    [24] => search
    [25] => shortcut
    [26] => toolbar
    [27] => standard
)

In my custom profile the order is

Array
(
    [0] => user
    [1] => field_sql_storage
    [2] => block
    [3] => number
    [4] => list
    [5] => node
    [6] => options
    [7] => filter
    [8] => text
    [9] => comment
    [10] => field
    [11] => contact
    [12] => contextual
    [13] => dashboard
    [14] => dblog
    [15] => field_ui
    [16] => file
    [17] => taxonomy
    [18] => help
    [19] => image
    [20] => menu
    [21] => overlay
    [22] => path
    [23] => rdf
    [24] => search
    [25] => shortcut
    [26] => toolbar
    [27] => store
)

In the first case field is installed before comment. field is a required module and is thus added to the list modules to install. In the second case field is there but after comment. comment_enable() depends on field to install itself. comment_enable() will create the field comment_body if it is not already there. If field module is not available there is an error.

We have this great dependency mapping system in graph.inc. But, comment.info does not label field module as a dependency. So, when the dependencies are build field module may not be installed before comment module. We need to mark it as a dependency so it is always installed first. The attached patch does just that.

CommentFileSizeAuthor
comment_field_dep.patch408 bytesmfer

Comments

damien tournoud’s picture

Status: Needs review » Closed (duplicate)
mfer’s picture

@Damien thanks for the heads up. continuing work over there.