summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-02-14 10:55:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-21 17:48:38 +0000
commitcb939b753c9e7648a38e22e0349c279da785e69d (patch)
treec2306d2e2c79e0c26c8793f9535f8455cf4094f7
parent2e9981000a211a89f88d7728393cc231e466581a (diff)
downloadopenembedded-core-cb939b753c9e7648a38e22e0349c279da785e69d.tar.gz
openembedded-core-cb939b753c9e7648a38e22e0349c279da785e69d.tar.bz2
openembedded-core-cb939b753c9e7648a38e22e0349c279da785e69d.zip
classes/buildhistory: use hostname instead of reading /etc/hostname
For the purposes of querying the hostname to include it in the commit message, it seems "cat /etc/hostname" does not work on the Yocto Project autobuilder machines, and it's likely that the hostname command will be more generally reliable, so use that instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--meta/classes/buildhistory.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3fbe3a8576..dfc9b73919 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -383,7 +383,7 @@ buildhistory_commit() {
repostatus=`git status --porcelain`
if [ "$repostatus" != "" ] ; then
git add ${BUILDHISTORY_DIR}/*
- HOSTNAME=`cat /etc/hostname 2>/dev/null || echo unknown`
+ 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
if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
git push -q ${BUILDHISTORY_PUSH_REPO}