Added check for conflicting DEB / RPM versions (#24275)
### Details: - Added check for conflicting DEB / RPM versions
This commit is contained in:
parent
6b3f564fe8
commit
d3cb701018
|
|
@ -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
|
||||
#
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ macro(ov_cpack_settings)
|
|||
2023.2.0
|
||||
)
|
||||
|
||||
ov_check_conflicts_versions(conflicting_versions)
|
||||
|
||||
#
|
||||
# core: base dependency for each component
|
||||
#
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue