catchunks: add --no-version-discovery option

Refs: #5021
Change-Id: I37bb1f86c1a6d63ab28fbe116e75d1047c110217
diff --git a/tools/chunks/catchunks/discover-version.cpp b/tools/chunks/catchunks/discover-version.cpp
index 6bedd05..1efe3b2 100644
--- a/tools/chunks/catchunks/discover-version.cpp
+++ b/tools/chunks/catchunks/discover-version.cpp
@@ -44,7 +44,7 @@
 void
 DiscoverVersion::run()
 {
-  if (!m_prefix.empty() && m_prefix[-1].isVersion()) {
+  if (m_options.disableVersionDiscovery || (!m_prefix.empty() && m_prefix[-1].isVersion())) {
     onDiscoverySuccess(m_prefix);
     return;
   }