Commit 10bba0c0 authored by Igor Kushnir's avatar Igor Kushnir
Browse files

Don't bump KDEV_ITEMREPOSITORY_VERSION in each patch version

Since b8e30215 KDEVELOP_VERSION_PATCH is
greater than 255 (e.g. 220770). The way KDEV_ITEMREPOSITORY_VERSION is
currently calculated assumes that KDEVELOP_VERSION_PATCH is less than or
equal to 255. Otherwise, the values of KDEV_ITEMREPOSITORY_VERSION
calculated for different KDevelop versions may coincide.

This commit resolves the potential issue by making
KDEV_ITEMREPOSITORY_VERSION depend only on the major and the minor
KDevelop versions. This has an extra benefit of clearing data
repositories less often. The item repository format shouldn't change in
patch versions anyway. On the unlikely occasion it does change, the
responsible developer should remember to bump the
KDEV_ITEMREPOSITORY_INCREMENT variable.
parent a86dd37a
Pipeline #184052 passed with stage
in 11 minutes and 46 seconds
......@@ -20,6 +20,10 @@ project(KDevelop VERSION "5.9.${RELEASE_SERVICE_BASED_PATCHLEVEL}")
# E.g. for KDevelop 5.2.0 => SOVERSION 52 (we only promise ABI compatibility between patch version updates)
set(KDEVELOP_SOVERSION "${KDevelop_VERSION_MAJOR}${KDevelop_VERSION_MINOR}")
# On macOS KDevelop_VERSION_MINOR is modified below. But KDEV_ITEMREPOSITORY_VERSION should depend
# on the original minor version on all platforms. So we store the original version in a variable.
set(KDEVELOP_OWN_MINOR_VERSION "${KDevelop_VERSION_MINOR}")
if (APPLE)
###################################################################################
# Kludge for bug #448152: ld: malformed 64-bit a.b.c.d.e version number: 5.7.211201
......
......@@ -3,7 +3,7 @@
set(KDEVPLATFORM_SOVERSION ${KDEVELOP_SOVERSION})
# Increase this to reset incompatible item-repositories.
# Changing KDEVELOP_VERSION automatically resets the itemrepository as well.
# Changing KDevelop's major or minor version automatically resets the itemrepository as well.
set(KDEV_ITEMREPOSITORY_INCREMENT 3)
set(KDevPlatform_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
......
......@@ -4,8 +4,7 @@
#include "kdevelop_version.h"
#define KDEV_ITEMREPOSITORY_VERSION (KDEVELOP_VERSION_MAJOR << 24) \
+ (KDEVELOP_VERSION_MINOR << 16) \
+ (KDEVELOP_VERSION_PATCH << 8) \
+ (@KDEVELOP_OWN_MINOR_VERSION@ << 16) \
+ @KDEV_ITEMREPOSITORY_INCREMENT@
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment