@@ -825,13 +825,10 @@ public static String parseMetadataFile() {
825825 throw new CloudRuntimeException (errMsg );
826826 }
827827 Ini .Section defaultSection = ini .get ("default" );
828- boolean updateCustomDownloadRepository = false ;
829828 String defaultDownloadRepository = defaultSection .get (TEMPLATES_DOWNLOAD_REPOSITORY_KEY );
830829 String customDownloadRepository = ServerPropertiesUtil .getProperty (TEMPLATES_CUSTOM_DOWNLOAD_REPOSITORY_KEY );
831- if (StringUtils .isNotBlank (customDownloadRepository ) && StringUtils .isNotBlank (defaultDownloadRepository )) {
832- LOGGER .debug ("Updating custom download repository: {}" , customDownloadRepository );
833- updateCustomDownloadRepository = true ;
834- }
830+ boolean updateCustomDownloadRepository = StringUtils .isNotBlank (customDownloadRepository ) &&
831+ StringUtils .isNotBlank (defaultDownloadRepository );
835832 for (Pair <Hypervisor .HypervisorType , CPU .CPUArch > hypervisorType : hypervisorList ) {
836833 String key = getHypervisorArchKey (hypervisorType .first (), hypervisorType .second ());
837834 Ini .Section section = ini .get (key );
@@ -844,7 +841,7 @@ public static String parseMetadataFile() {
844841 if (StringUtils .isNotBlank (url ) && updateCustomDownloadRepository ) {
845842 url = url .replaceFirst (defaultDownloadRepository .trim (),
846843 customDownloadRepository .trim ());
847- LOGGER .info ("Updated download URL for {} to {}" , key , url );
844+ LOGGER .debug ("Updated download URL for {} using custom repository to {}" , key , url );
848845 }
849846 NewTemplateMap .put (key , new MetadataTemplateDetails (
850847 hypervisorType .first (),
0 commit comments