Description
When investigating an issue with the latest Folly cbdep build, it was observed that changing manifest.cmake to a different folly version did not cause CBDownloadDeps et al to extract the newer version - it left the previous contents present.
For example, starting with a manifest.cmake containing VERSION v2022.05.23.00-couchbase-cb6:
DECLARE_DEP (folly VERSION v2022.05.23.00-couchbase-cb6 PLATFORMS amzn2 centos7 debian9 debian10 macosx suse12 suse15 ubuntu18.04 ubuntu20.04 windows)
|
Then changing back to VERSION v2022.05.23.00-couchbase-cb4, and re-running cmake shows the following output:
$ cmake ..
|
-- Checking exploded folly version v2022.05.23.00-couchbase against v2022.05.23.00-couchbase
|
-- Dependency 'folly (v2022.05.23.00-couchbase)' already downloaded
|
... and the contents of build/tlm/deps/folly.exploded is unchanged.
Poking into CBDownloadDeps, it appears that the function DECLARE_DEP assumes that only one hyphen will be present in the version string when extracting the build number. However this is not the case with folly (and prometheus-cpp), and hence the actual build number ends up getting ignored:
# for V1, version is conventionally version-bld_num, so split it apart.
|
# Occasionally there may be a version with no -, in which case the
|
# bld_num is the empty string.
|
STRING (REPLACE "-" ";" _dep_bits "${dep_VERSION}")
|
LIST (POP_FRONT _dep_bits _dep_version _dep_bld_num)
|
Build couchbase-server-7.5.0-3164 contains tlm commit fb5a1a1 with commit message:
MB-54275: Fix detection of updated cbdeps VERSIONs containing '-'