From: Marek Vasut Date: Sun, 2 Mar 2025 18:30:28 +0000 (+0100) Subject: scripts/setlocalversion: Reinstate .scmversion support X-Git-Tag: v2025.07-rc4~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93905ab6e7564089f5d7b703b660464d675e5ab0;p=pandora-u-boot.git scripts/setlocalversion: Reinstate .scmversion support The .scmversion is used by oe-core to append U-Boot version string. LOCALVERSION is not fully compatible replacement as it adds trailing "-dirty" string at the end of version string in case the U-Boot git tree contains uncommitted changes. This behavior itself is correct. However, OE builds do clone U-Boot sources from git and may apply additional patches on top, which are not tracked in U-Boot git tree, but rather in the OE metalayer git tree, which leads to the addition of "-dirty" string as well. The .scmversion used by oe-core used to replace the version string suffix fully, including the "-dirty" string. Reinstate support for the .scmversion to let OE core do exactly that as it used to do it. Fixes: 5c02350fa03d ("scripts/setlocalversion: sync with linux v6.9") Signed-off-by: Marek Vasut --- diff --git a/scripts/setlocalversion b/scripts/setlocalversion index dbe048210d6..26d121816dd 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -48,6 +48,10 @@ scm_version() done cd "$srctree" + if test -e .scmversion; then + cat .scmversion + return + fi if test -n "$(git rev-parse --show-cdup 2>/dev/null)"; then return