@@ -101,6 +101,14 @@ ourbranch = None
bitbakeversion = None
docconfver = None
+# Test that we are building from a Git repository
+try:
+ subprocess.run(["git", "rev-parse", "--is-inside-work-tree"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
+except subprocess.CalledProcessError:
+ sys.exit("Building yocto-docs must be done from its Git repository.\n"
+ "Clone the documentation repository with the following command:\n"
+ "git clone https://git.yoctoproject.org/yocto-docs ")
+
# Test tags exist and inform the user to fetch if not
try:
subprocess.run(["git", "show", "yocto-%s" % release_series[activereleases[0]]], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
Check that we are building from a Git clone of yocto-docs, not a bare directory, which is not supported as we need to tags to be fetched. Inform the user how to clone the documentation too. Fixes [YOCTO #15834] Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/set_versions.py | 8 ++++++++ 1 file changed, 8 insertions(+) --- base-commit: b8a56b8b2e8c0417b2f7204f80c79b05d95e9ce4 change-id: 20260106-building-from-tarballs-70b35c8b4736