summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-06-01 13:42:25 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-03 23:46:05 +0100
commit04292b815cb1fdad777e83bfcb65712609c946df (patch)
tree6435a7a5dee46c7f3b15fd8c40553f5d2699b167 /meta
parent1a4494b2e6953bf30fcb03045874f5ed8bd62c81 (diff)
downloadpoky-04292b815cb1fdad777e83bfcb65712609c946df.tar.gz
classes/buildhistory: make a single commit per build
Way back in OE-Core commit fba198ac7efe476a25c5761878ef2fcee97bf9f1 in 2012 we split committing to the repository, making a commit per top-level directory. However, as we add more information it becomes harder to see which commits belong to which build. Switch back to a single commit per build to keep the history tidier. To address the original concern, if you do want to see just the changes for a particular subdirectory, git can filter that for you - just specify that subdirectory as the last parameter on the git show / git diff command line and that's all you will see. (From OE-Core rev: b49a4a47783609fe9161fbc11cc7c7ff3ff4b6bb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/buildhistory.bbclass12
1 files changed, 5 insertions, 7 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index f543bb73d6..3e907fc3f9 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -706,10 +706,10 @@ def buildhistory_get_cmdline(d):
706buildhistory_single_commit() { 706buildhistory_single_commit() {
707 if [ "$3" = "" ] ; then 707 if [ "$3" = "" ] ; then
708 commitopts="${BUILDHISTORY_DIR}/ --allow-empty" 708 commitopts="${BUILDHISTORY_DIR}/ --allow-empty"
709 item="No changes" 709 shortlogprefix="No changes: "
710 else 710 else
711 commitopts="$3 metadata-revs" 711 commitopts=""
712 item="$3" 712 shortlogprefix=""
713 fi 713 fi
714 if [ "${BUILDHISTORY_BUILD_FAILURES}" = "0" ] ; then 714 if [ "${BUILDHISTORY_BUILD_FAILURES}" = "0" ] ; then
715 result="succeeded" 715 result="succeeded"
@@ -726,7 +726,7 @@ buildhistory_single_commit() {
726 esac 726 esac
727 commitmsgfile=`mktemp` 727 commitmsgfile=`mktemp`
728 cat > $commitmsgfile << END 728 cat > $commitmsgfile << END
729$item: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $2 729${shortlogprefix}Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $2
730 730
731cmd: $1 731cmd: $1
732 732
@@ -770,9 +770,7 @@ END
770 git add -A . 770 git add -A .
771 # porcelain output looks like "?? packages/foo/bar" 771 # porcelain output looks like "?? packages/foo/bar"
772 # Ensure we commit metadata-revs with the first commit 772 # Ensure we commit metadata-revs with the first commit
773 for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do 773 buildhistory_single_commit "$CMDLINE" "$HOSTNAME" dummy
774 buildhistory_single_commit "$CMDLINE" "$HOSTNAME" "$entry"
775 done
776 git gc --auto --quiet 774 git gc --auto --quiet
777 else 775 else
778 buildhistory_single_commit "$CMDLINE" "$HOSTNAME" 776 buildhistory_single_commit "$CMDLINE" "$HOSTNAME"