msi: Look at the requested action when publishing assemblies, not the action taken.

This commit is contained in:
Hans Leidekker 2010-03-02 14:57:37 +01:00 committed by Alexandre Julliard
parent ff3ed5f051
commit 6c6b2a7a18
1 changed files with 10 additions and 5 deletions

View File

@ -6481,20 +6481,25 @@ static UINT load_assembly(MSIRECORD *rec, LPVOID param)
{ {
ASSEMBLY_LIST *list = param; ASSEMBLY_LIST *list = param;
MSIASSEMBLY *assembly; MSIASSEMBLY *assembly;
LPCWSTR component;
assembly = msi_alloc_zero(sizeof(MSIASSEMBLY)); assembly = msi_alloc_zero(sizeof(MSIASSEMBLY));
if (!assembly) if (!assembly)
return ERROR_OUTOFMEMORY; return ERROR_OUTOFMEMORY;
assembly->component = get_loaded_component(list->package, MSI_RecordGetString(rec, 1)); component = MSI_RecordGetString(rec, 1);
assembly->component = get_loaded_component(list->package, component);
if (!assembly->component)
return ERROR_SUCCESS;
if (!assembly->component || !assembly->component->Enabled || if (assembly->component->ActionRequest != INSTALLSTATE_LOCAL &&
!(assembly->component->Action & (INSTALLSTATE_LOCAL | INSTALLSTATE_SOURCE))) assembly->component->ActionRequest != INSTALLSTATE_SOURCE)
{ {
TRACE("Component not set for install, not publishing assembly\n"); TRACE("Component not scheduled for installation: %s\n", debugstr_w(component));
msi_free(assembly); assembly->component->Action = assembly->component->Installed;
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
assembly->component->Action = assembly->component->ActionRequest;
assembly->feature = find_feature_by_name(list->package, MSI_RecordGetString(rec, 2)); assembly->feature = find_feature_by_name(list->package, MSI_RecordGetString(rec, 2));
assembly->file = msi_find_file(list->package, assembly->component->KeyPath); assembly->file = msi_find_file(list->package, assembly->component->KeyPath);