buildhistory: make seperate commits for every changed top level entry in the buildhis...
authorKoen Kooi <koen@dominion.thruhere.net>
Sat, 31 Mar 2012 22:06:44 +0000 (00:06 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Apr 2012 03:31:47 +0000 (04:31 +0100)
This seperates out image changes from package changes making the image diffs a lot easier to read.

(From OE-Core rev: fba198ac7efe476a25c5761878ef2fcee97bf9f1)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index 2224340..8d5b096 100644 (file)
@@ -401,7 +401,10 @@ buildhistory_commit() {
                if [ "$repostatus" != "" ] ; then
                        git add ${BUILDHISTORY_DIR}/*
                        HOSTNAME=`hostname 2>/dev/null || echo unknown`
-                       git commit ${BUILDHISTORY_DIR}/ -m "Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
+                       # porcelain output looks like "?? packages/foo/bar"
+                       for entry in `echo $repostatus | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
+                               git commit ${BUILDHISTORY_DIR}/$entry -m "$entry: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
+                       done
                        if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
                                git push -q ${BUILDHISTORY_PUSH_REPO}
                        fi