]> code.ossystems Code Review - openembedded-core.git/commitdiff
buildhistory.bbclass: Fix hostname print for 'No changes' case
authorOtavio Salvador <otavio@ossystems.com.br>
Thu, 11 Oct 2012 21:46:41 +0000 (21:46 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Oct 2012 11:03:28 +0000 (12:03 +0100)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index 49f2ea5b7c18a4676b525885ff6cfb8cc7096d87..0a5753f7dcb00b15984b60caa2c9f2d6c88c943d 100644 (file)
@@ -403,9 +403,9 @@ END
                fi
                # Check if there are new/changed files to commit (other than metadata-revs)
                repostatus=`git status --porcelain | grep -v " metadata-revs$"`
+               HOSTNAME=`hostname 2>/dev/null || echo unknown`
                if [ "$repostatus" != "" ] ; then
                        git add .
-                       HOSTNAME=`hostname 2>/dev/null || echo unknown`
                        # porcelain output looks like "?? packages/foo/bar"
                        # Ensure we commit metadata-revs with the first commit
                        for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do