Skip to content

Commit

Permalink
fix: Update qapt version check.
Browse files Browse the repository at this point in the history
更新 libqapt 的版本判断方式,
使用 cmake VERSION_LESS 而不是字符比较

Log: 修复部分问题
  • Loading branch information
rb-union committed Dec 6, 2023
1 parent 4b51fe5 commit 9b8b99f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/deb-installer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ execute_process(COMMAND dpkg -s libqapt-dev
string(REPLACE "Version: " "" QAPT_VERSION_STR ${QAPT_VERSION_STR})
message(STATUS "BUILD QAPT VERSION ${QAPT_VERSION_STR}")

if(${QAPT_VERSION_STR} STRLESS "3.0.5-1")
if(${QAPT_VERSION_STR} STRLESS "3.0.4.8-1+deepin2")
if(${QAPT_VERSION_STR} VERSION_LESS "3.0.5-1")
if(${QAPT_VERSION_STR} VERSION_LESS "3.0.4.8-1+deepin2")
message(STATUS "disable virtual package enhance")
else()
message(STATUS "enable virtual package enhance")
add_definitions(-DENABLE_VIRTUAL_PACKAGE_ENHANCE)
endif()
else()
if(${QAPT_VERSION_STR} STREQUAL "3.0.5.1-1-deepin1")
# 部分包名后可能添加后缀,后续更新的deepin分支libqapt包应包含虚包处理
if(${QAPT_VERSION_STR} VERSION_GREATER_EQUAL "3.0.5.1-1-deepin1" AND ${QAPT_VERSION_STR} MATCHES ".*deepin.*")
message(STATUS "enable virtual package enhance")
add_definitions(-DENABLE_VIRTUAL_PACKAGE_ENHANCE)
else()
Expand Down

0 comments on commit 9b8b99f

Please sign in to comment.