Added check for conflicting DEB / RPM versions (#24275)

### Details:
 - Added check for conflicting DEB / RPM versions
This commit is contained in:
Ilya Lavrenov 2024-04-28 01:19:34 +04:00 committed by GitHub
parent 6b3f564fe8
commit d3cb701018
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 0 deletions

View File

@ -122,6 +122,32 @@ function(ov_install_with_name file component)
endif()
endfunction()
#
# checks that current OpenVINO versions has previous version in RPM / DEB conflicts
#
function(ov_check_conflicts_versions var_name)
set(ov_major ${OpenVINO_VERSION_MAJOR})
set(ov_minor ${OpenVINO_VERSION_MINOR})
set(ov_patch ${OpenVINO_VERSION_PATCH})
if(ov_patch EQUAL 0)
if(ov_minor EQUAL 0)
math(EXPR ov_major "${ov_major} - 1")
else()
math(EXPR ov_minor "${ov_minor} - 1")
endif()
else()
math(EXPR ov_patch "${ov_patch} - 1")
endif()
set(ov_prev_version "${ov_major}.${ov_minor}.${ov_patch}")
# perform check
if(NOT ov_prev_version IN_LIST ${var_name})
message(FATAL_ERROR "List ${var_name} (${${var_name}}) does not contain verison ${ov_prev_version}")
endif()
endfunction()
#
# List of public OpenVINO components
#

View File

@ -92,6 +92,8 @@ macro(ov_cpack_settings)
2023.2.0
)
ov_check_conflicts_versions(conflicting_versions)
#
# core: base dependency for each component
#

View File

@ -78,6 +78,8 @@ macro(ov_cpack_settings)
2023.2.0
)
ov_check_conflicts_versions(conflicting_versions)
find_host_program(rpmlint_PROGRAM NAMES rpmlint DOC "Path to rpmlint")
if(rpmlint_PROGRAM)
execute_process(COMMAND "${rpmlint_PROGRAM}" --version