@@ -154,6 +154,17 @@ List<AruPatch> getRecommendedPatches(AruProduct product, String version, String
154
154
String releaseNumber = getReleaseNumber (product , version , userId , password );
155
155
Document aruRecommendations = getRecommendedPatchesMetadata (product , releaseNumber , userId , password );
156
156
List <AruPatch > patches = AruPatch .getPatches (aruRecommendations );
157
+ String psuVersion = getPsuVersion (patches );
158
+ if (!Utils .isEmptyString (psuVersion )) {
159
+ patches .forEach (p -> logger .fine ("Discarding recommended patch {1} {2}" , p .patchId (), p .description ()));
160
+ logger .fine ("Recommended patch list contains a PSU, getting recommendations for PSU version {0}" ,
161
+ psuVersion );
162
+ // get release number for PSU
163
+ String psuReleaseNumber = getReleaseNumber (product , psuVersion , userId , password );
164
+ // get recommended patches for PSU release (Overlay patches are only recommended on the PSU release)
165
+ Document psuRecommendation = getRecommendedPatchesMetadata (product , psuReleaseNumber , userId , password );
166
+ patches = AruPatch .getPatches (psuRecommendation );
167
+ }
157
168
patches .forEach (p -> logger .info ("IMG-0068" , product .description (), p .patchId (), p .description ()));
158
169
logger .exiting (patches );
159
170
return patches ;
@@ -165,6 +176,17 @@ List<AruPatch> getRecommendedPatches(AruProduct product, String version, String
165
176
}
166
177
}
167
178
179
+ private String getPsuVersion (List <AruPatch > patches ) {
180
+ for (AruPatch patch : patches ) {
181
+ if (patch .isPsu ()) {
182
+ // expected pattern "Oracle WebLogic Server 12.2.1.x.xxxxxx"
183
+ String [] strings = patch .psuBundle ().split (" " );
184
+ return strings [strings .length - 1 ];
185
+ }
186
+ }
187
+ return null ;
188
+ }
189
+
168
190
/**
169
191
* Validate patches conflicts by passing a list of patches.
170
192
*
0 commit comments