]> code.ossystems Code Review - openembedded-core.git/commitdiff
buildhistory: Allow customising buildhistory tags
authorDaniel McGregor <daniel.mcgregor@vecima.com>
Thu, 23 Jan 2020 21:44:43 +0000 (15:44 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Feb 2020 15:56:24 +0000 (15:56 +0000)
Allow setting custom buildhistory tag prefixes. This allows multiple
build directories to share one buildhistory git repository with multiple
worktrees.

Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index affdf272d7d6175c01dabad795c65edbfc084f4d..eb7295570dbdedc03a7ce04a24f36dd13605303c 100644 (file)
@@ -40,6 +40,7 @@ BUILDHISTORY_SDK_FILES ?= "conf/local.conf conf/bblayers.conf conf/auto.conf con
 BUILDHISTORY_COMMIT ?= "1"
 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
 BUILDHISTORY_PUSH_REPO ?= ""
+BUILDHISTORY_TAG ?= "build"
 
 SSTATEPOSTINSTFUNCS_append = " buildhistory_emit_pkghistory"
 # We want to avoid influencing the signatures of sstate tasks - first the function itself:
@@ -824,9 +825,9 @@ END
                if [ ! -e .git ] ; then
                        git init -q
                else
-                       git tag -f build-minus-3 build-minus-2 > /dev/null 2>&1 || true
-                       git tag -f build-minus-2 build-minus-1 > /dev/null 2>&1 || true
-                       git tag -f build-minus-1 > /dev/null 2>&1 || true
+                       git tag -f ${BUILDHISTORY_TAG}-minus-3 ${BUILDHISTORY_TAG}-minus-2 > /dev/null 2>&1 || true
+                       git tag -f ${BUILDHISTORY_TAG}-minus-2 ${BUILDHISTORY_TAG}-minus-1 > /dev/null 2>&1 || true
+                       git tag -f ${BUILDHISTORY_TAG}-minus-1 > /dev/null 2>&1 || true
                fi
 
                check_git_config