diff --git a/lib/bb/fetch2/crate.py b/lib/bb/fetch2/crate.py
index 2d3078899..4ac71946d 100644
--- a/lib/bb/fetch2/crate.py
+++ b/lib/bb/fetch2/crate.py
@@ -144,10 +144,16 @@ class Crate(Wget):
             with open(mdpath, "w") as f:
                 json.dump(metadata, f)
 
-    def latest_versionstring(self, ud, d):
+    def latest_versionstring(self, ud, d, major_version=None):
         from functools import cmp_to_key
         json_data = json.loads(self._fetch_index(ud.versionsurl, ud, d))
         versions = [(0, i["num"], "") for i in json_data["versions"]]
+        if major_version:
+            filtered_versions = []
+            for v in versions:
+                if v[1].startswith(major_version+'.'):
+                    filtered_versions.append(v)
+            versions = filtered_versions
         versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp))
 
         return (versions[-1][1], "")
