summaryrefslogtreecommitdiff
path: root/buildscripts/blackduck_hub.py
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2020-11-09 12:14:24 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-09 19:53:09 +0000
commitd91df4640a760be7f3d07cfc34e2ca340b13671f (patch)
treeaa88329264ca7ea78fdd70f414ae7bca0c4fe35b /buildscripts/blackduck_hub.py
parent79d55de66de24baeb9563f041eb7259f3cb3b9e7 (diff)
downloadmongo-d91df4640a760be7f3d07cfc34e2ca340b13671f.tar.gz
SERVER-52672 Update blackduck_hub.py rules for filtering beta versions
Diffstat (limited to 'buildscripts/blackduck_hub.py')
-rw-r--r--buildscripts/blackduck_hub.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/buildscripts/blackduck_hub.py b/buildscripts/blackduck_hub.py
index 124a2c92eb2..6f3e41d4a4f 100644
--- a/buildscripts/blackduck_hub.py
+++ b/buildscripts/blackduck_hub.py
@@ -8,6 +8,7 @@ import io
import json
import logging
import os
+import re
import subprocess
import sys
import tempfile
@@ -85,6 +86,8 @@ THIRD_PARTY_COMPONENTS_FILE = "etc/third_party_components.yml"
############################################################################
+RE_LETTERS = re.compile("[A-Za-z]{2,}")
+
def default_if_none(value, default):
"""Set default if value is 'None'."""
@@ -293,19 +296,8 @@ class VersionInfo:
self.ver_array = [2, 0]
return
- # "git" is an abseil version
- # "unknown_version" comes from this script when components do not have versions
- # icu has cldr, release, snv, milestone, latest
- # zlib has alt and task
- # boost has ubuntu, fc, old-boost, start, ....
# BlackDuck thinks boost 1.70.0 was released on 2007 which means we have to check hundreds of versions
- bad_keywords = [
- "unknown_version", "rc", "alpha", "beta", "git", "release", "cldr", "svn", "cvs",
- "milestone", "latest", "alt", "task", "ubuntu", "fc", "old-boost", "start", "split",
- "unofficial", "(", "ctp", "before", "review", "develop", "master", "filesystem",
- "geometry", "icl", "intrusive", "old", "optional", "super", "docs", "+b", "-b",
- "b1", ".0a", "system", "html", "interprocess"
- ]
+ bad_keywords = ["(", "+b", "-b", "b1", ".0a"]
if [bad for bad in bad_keywords if bad in self.ver_str]:
self.production_version = False
return
@@ -337,6 +329,11 @@ class VersionInfo:
if self.ver_str.endswith('-'):
self.ver_str = self.ver_str[0:-1]
+ # Boost keeps varying the version strings so filter for anything with 2 or more ascii charaters
+ if RE_LETTERS.search(self.ver_str):
+ self.production_version = False
+ return
+
# Some versions end with "-\d", change the "-" since it just means a patch release from a debian/rpm package
# yaml-cpp has this problem where Black Duck sourced the wrong version information
self.ver_str = self.ver_str.replace("-", ".")