]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: get proper version string
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Wed, 18 Feb 2015 18:28:18 +0000 (18:28 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Feb 2015 12:58:19 +0000 (12:58 +0000)
This patch brings in the toaster tree commit ID in
the version string to allow users properly report their
toaster version when submitting issues.

(Bitbake rev: 5cc87ee0ac3b2bd399e7f009dda9d6de87209a27)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/toastermain/settings.py

index b6a42c062685a92e61f28611e3880bf75bbbcbe9..a7304fa167f867e2b36fbf389b681002f334277b 100644 (file)
@@ -232,7 +232,8 @@ from os.path import dirname as DN
 SITE_ROOT=DN(DN(os.path.abspath(__file__)))
 
 import subprocess
-TOASTER_VERSION = subprocess.Popen('cd %s; git branch | grep "^* " | tr -d "* "' % SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
+TOASTER_VERSION = subprocess.Popen('git branch | grep "^* " | tr -d "* "', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
+TOASTER_VERSION += " " + subprocess.Popen('git rev-parse HEAD ', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
 
 ROOT_URLCONF = 'toastermain.urls'