Merged 5.1-MC1 (5.1.0) to HEAD (5.1)

119086 adavis: Merged 5.1.N (5.1.1) to 5.1-MC1 (5.1.0)
      118716 arebegea: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1)
         118657 adavis: Merged 5.0.2-CLOUD42 (Cloud ) to 5.0.N (5.0.4)
            118656 adavis: Merged 5.0.2-CLOUD (Cloud ) to 5.0.2-CLOUD42 (Cloud )
               118655 adavis: Merged 5.0.2-PLUS (5.0.2-PLUS) to 5.0.2-CLOUD (Cloud )
                  118542 amorarasu: Merged DEV to 5.0.2-PLUS (5.0.2-PLUS)
                     117462 118473 amorarasu: MNT-15147: Cloud 40 Upgrade takes too long
                        - Make the patch.fixPersonSizeCurrentType to not apply to tenants
                        - Added support for making patch.addUnmovableAspect deferred


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@119927 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jean-Pierre Huynh
2015-12-10 10:22:56 +00:00
parent 7e90c583d8
commit 73561a5fa3
6 changed files with 51 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2014 Alfresco Software Limited.
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -183,6 +183,10 @@ public class PatchServiceImpl implements PatchService
// go through all the patches and apply them where necessary
for (Patch patch : sortedPatches)
{
if(patch.isDeferred())
{
continue;
}
// apply the patch
success = applyPatchAndDependencies(patch, appliedPatchesById);
if (!success)
@@ -284,9 +288,9 @@ public class PatchServiceImpl implements PatchService
AppliedPatch appliedPatch = appliedPatchesById.get(id);
if (appliedPatch != null && appliedPatch.getSucceeded())
{
if (appliedPatch.getWasExecuted() && appliedPatch.getSucceeded())
if (appliedPatch.getWasExecuted())
{
// It was sucessfully executed
// It was successfully executed
return true;
}
// We give the patch another chance
@@ -549,6 +553,7 @@ public class PatchServiceImpl implements PatchService
patch.getId(),
I18NUtil.getMessage(patch.getDescription()));
logger.info(msg);
// the patch is executed regardless of the deferred flag value
report = (patch.isDeferred()) ? patch.applyAsync() : patch.apply();
state = STATE.APPLIED;
}