aboutsummaryrefslogtreecommitdiff
path: root/src/engine/dependency.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/dependency.cpp')
-rw-r--r--src/engine/dependency.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/engine/dependency.cpp b/src/engine/dependency.cpp
index 4833de94..9ab76551 100644
--- a/src/engine/dependency.cpp
+++ b/src/engine/dependency.cpp
@@ -234,6 +234,8 @@ extern "C" HRESULT DependencyDetect(
234 BURN_REGISTRATION* pRegistration = &pEngineState->registration; 234 BURN_REGISTRATION* pRegistration = &pEngineState->registration;
235 STRINGDICT_HANDLE sdIgnoredDependents = NULL; 235 STRINGDICT_HANDLE sdIgnoredDependents = NULL;
236 BURN_PACKAGE* pPackage = NULL; 236 BURN_PACKAGE* pPackage = NULL;
237 BOOL fSelfDependent = NULL != pRegistration->wzSelfDependent;
238 BOOL fActiveParent = NULL != pRegistration->sczActiveParent && NULL != *pRegistration->sczActiveParent;
237 239
238 // Always leave this empty so that all dependents get detected. Plan will ignore dependents based on its own logic. 240 // Always leave this empty so that all dependents get detected. Plan will ignore dependents based on its own logic.
239 hr = DictCreateStringList(&sdIgnoredDependents, INITIAL_STRINGDICT_SIZE, DICT_FLAG_CASEINSENSITIVE); 241 hr = DictCreateStringList(&sdIgnoredDependents, INITIAL_STRINGDICT_SIZE, DICT_FLAG_CASEINSENSITIVE);
@@ -263,16 +265,20 @@ extern "C" HRESULT DependencyDetect(
263 ExitOnFailure(hr, "Failed to detect dependents for related bundle '%ls'", pPackage->sczId); 265 ExitOnFailure(hr, "Failed to detect dependents for related bundle '%ls'", pPackage->sczId);
264 } 266 }
265 267
266 if (pRegistration->wzSelfDependent) 268 if (fSelfDependent || fActiveParent)
267 { 269 {
268 for (DWORD i = 0; i < pRegistration->cDependents; ++i) 270 for (DWORD i = 0; i < pRegistration->cDependents; ++i)
269 { 271 {
270 DEPENDENCY* pDependent = pRegistration->rgDependents + i; 272 DEPENDENCY* pDependent = pRegistration->rgDependents + i;
271 273
272 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->wzSelfDependent, -1, pDependent->sczKey, -1)) 274 if (fActiveParent && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczActiveParent, -1, pDependent->sczKey, -1))
275 {
276 pRegistration->fParentRegisteredAsDependent = TRUE;
277 }
278
279 if (fSelfDependent && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->wzSelfDependent, -1, pDependent->sczKey, -1))
273 { 280 {
274 pRegistration->fSelfRegisteredAsDependent = TRUE; 281 pRegistration->fSelfRegisteredAsDependent = TRUE;
275 break;
276 } 282 }
277 } 283 }
278 } 284 }
@@ -348,17 +354,6 @@ LExit:
348 return hr; 354 return hr;
349} 355}
350 356
351extern "C" BOOL DependencyDependentExists(
352 __in const BURN_REGISTRATION* pRegistration,
353 __in_z LPCWSTR wzDependentProviderKey
354 )
355{
356 HRESULT hr = S_OK;
357
358 hr = DepDependentExists(pRegistration->hkRoot, pRegistration->sczProviderKey, wzDependentProviderKey);
359 return SUCCEEDED(hr);
360}
361
362extern "C" HRESULT DependencyPlanPackageBegin( 357extern "C" HRESULT DependencyPlanPackageBegin(
363 __in BOOL fPerMachine, 358 __in BOOL fPerMachine,
364 __in BURN_PACKAGE* pPackage, 359 __in BURN_PACKAGE* pPackage,