@@ -82,29 +82,31 @@ public CommandResponse call() throws Exception {
82
82
String opatchVersion = baseImageProperties .getProperty ("OPATCH_VERSION" );
83
83
84
84
// We need to find out the actual version number of the opatchBugNumber - what if useCache=always ?
85
- String opatchBugNumberVersion ;
85
+ String lsinventoryText = null ;
86
+
87
+ if (applyingPatches ()) {
88
+
89
+ String opatchBugNumberVersion ;
86
90
87
- if (userId == null && password == null ) {
88
- String opatchFile = cacheStore .getValueFromCache (opatchBugNumber + "_opatch" );
89
- if (opatchFile != null ) {
90
- opatchBugNumberVersion = Utils .getOpatchVersionFromZip (opatchFile );
91
- logger .info ("IMG-0008" , opatchBugNumber , opatchFile , opatchBugNumberVersion );
91
+ if (userId == null && password == null ) {
92
+ String opatchFile = cacheStore .getValueFromCache (opatchBugNumber + "_opatch" );
93
+ if (opatchFile != null ) {
94
+ opatchBugNumberVersion = Utils .getOpatchVersionFromZip (opatchFile );
95
+ logger .info ("IMG-0008" , opatchBugNumber , opatchFile , opatchBugNumberVersion );
96
+ } else {
97
+ String msg = String .format ("OPatch patch number --opatchBugNumber %s cannot be found in cache. "
98
+ + "Please download it manually and add it to the cache." , opatchBugNumber );
99
+ logger .severe (msg );
100
+ throw new IOException (msg );
101
+ }
92
102
} else {
93
- String msg = String .format ("OPatch patch number --opatchBugNumber %s cannot be found in cache" ,
94
- opatchBugNumber );
95
- logger .severe (msg );
96
- throw new IOException (msg );
103
+ opatchBugNumberVersion = ARUUtil .getOPatchVersionByBugNumber (opatchBugNumber , userId , password );
97
104
}
98
- } else {
99
- opatchBugNumberVersion = ARUUtil .getOPatchVersionByBugNumber (opatchBugNumber , userId , password );
100
- }
101
105
102
- if ( applyingPatches () && Utils .compareVersions (opatchVersion , opatchBugNumberVersion ) < 0 ) {
103
- addOPatch1394ToImage (tmpDir , opatchBugNumber );
104
- }
106
+ if ( Utils .compareVersions (opatchVersion , opatchBugNumberVersion ) < 0 ) {
107
+ addOPatch1394ToImage (tmpDir , opatchBugNumber );
108
+ }
105
109
106
- String lsinventoryText = null ;
107
- if (latestPSU || !patches .isEmpty ()) {
108
110
logger .finer ("Verifying Patches to WLS " );
109
111
if (userId == null ) {
110
112
logger .warning ("IMG-0009" );
0 commit comments