Don't fc_sort on platform file contexts
Sorting algorithm of fc_sort is not perfect and often causes unexpected behaviors. We are moving from fc_sort to manual ordering of platform file_contexts files. In addition, this sets remove_comment as true by default, as fc_sort has been removing comments / empty lines. Bug: 299839280 Test: TH Change-Id: Ic8a02b64fc70481234467a470506580d2e6efd94
This commit is contained in:
parent
daa1cec849
commit
dfa4a48b1c
2 changed files with 6 additions and 2 deletions
|
@ -289,8 +289,8 @@ func (m *selinuxContextsModule) buildGeneralContexts(ctx android.ModuleContext,
|
|||
}
|
||||
|
||||
func (m *selinuxContextsModule) buildFileContexts(ctx android.ModuleContext, inputs android.Paths) android.Path {
|
||||
if m.properties.Fc_sort == nil {
|
||||
m.properties.Fc_sort = proptools.BoolPtr(true)
|
||||
if m.properties.Remove_comment == nil {
|
||||
m.properties.Remove_comment = proptools.BoolPtr(true)
|
||||
}
|
||||
return m.buildGeneralContexts(ctx, inputs)
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ file_contexts {
|
|||
":file_contexts_files{.vendor}",
|
||||
],
|
||||
soc_specific: true,
|
||||
fc_sort: true,
|
||||
}
|
||||
|
||||
file_contexts {
|
||||
|
@ -113,6 +114,7 @@ file_contexts {
|
|||
],
|
||||
stem: "vendor_file_contexts",
|
||||
recovery: true,
|
||||
fc_sort: true,
|
||||
}
|
||||
|
||||
file_contexts {
|
||||
|
@ -145,6 +147,7 @@ file_contexts {
|
|||
name: "odm_file_contexts",
|
||||
srcs: [":file_contexts_files{.odm}"],
|
||||
device_specific: true,
|
||||
fc_sort: true,
|
||||
}
|
||||
|
||||
file_contexts {
|
||||
|
@ -152,6 +155,7 @@ file_contexts {
|
|||
srcs: [":file_contexts_files{.odm}"],
|
||||
stem: "odm_file_contexts",
|
||||
recovery: true,
|
||||
fc_sort: true,
|
||||
}
|
||||
|
||||
hwservice_contexts {
|
||||
|
|
Loading…
Reference in a new issue