doc: Stop recording if building from source/release in plugin cache
authorThibault Saunier <tsaunier@igalia.com>
Fri, 19 Jun 2020 15:19:43 +0000 (11:19 -0400)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 19 Jun 2020 18:13:13 +0000 (19:13 +0100)
Closes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/537
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/537>

docs/gst-plugins-doc-cache-generator.py
docs/plugins/gst_plugins_cache.json

index 596fcad89060ade3af84c30b1ab83abf248d839b..29dfe9433d06b420fcb171710058a38c5828f651 100755 (executable)
@@ -20,6 +20,7 @@ import argparse
 import json
 import os
 import sys
+import re
 import subprocess
 import tempfile
 
@@ -38,6 +39,7 @@ except ImportError:  # python <3.3
 UNSTABLE_VALUE = "unstable-values"
 
 
+
 def dict_recursive_update(d, u):
     modified = False
     unstable_values = d.get(UNSTABLE_VALUE, [])
@@ -49,8 +51,11 @@ def dict_recursive_update(d, u):
             modified |= dict_recursive_update(r, v)
             d[k] = r
         elif k not in unstable_values:
-            d[k] = u[k]
             modified = True
+            if k == "package":
+                d[k] = re.sub(" git$| source release$| prerelease$", "", v)
+            else:
+                d[k] = u[k]
     return modified
 
 
index d45eb896ebbd4575e5fa3397a0d9bfbe01bc5cd5..a69605de9472bcf2e403b69488fe9e86aa75862c 100644 (file)
                 ]
             }
         },
-        "package": "GStreamer git",
+        "package": "GStreamer",
         "source": "gstreamer",
         "tracers": {},
         "url": "Unknown package origin"
         "filename": "gstcoretracers",
         "license": "LGPL",
         "other-types": {},
-        "package": "GStreamer git",
+        "package": "GStreamer",
         "source": "gstreamer",
         "tracers": {
             "latency": {},