From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH] bitbake: Check if bitbake versions match
Date: Tue, 28 Apr 2015 15:15:57 +0300 [thread overview]
Message-ID: <1430223357-9986-1-git-send-email-ed.bartosh@linux.intel.com> (raw)
Bitbake program and core versions must match.
Moved __version__ from main.py back to bin/bitbake.
Implemented check for version match in bin/bitbake.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
tbs
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
bitbake/bin/bitbake | 4 ++++
bitbake/lib/bb/main.py | 3 +--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 3e1ca62..88ac8c3 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -35,7 +35,11 @@ except RuntimeError as exc:
from bb import cookerdata
from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
+__version__ = "1.27.0"
+
if __name__ == "__main__":
+ if __version__ != bb.__version__:
+ sys.exit("Bitbake core version and program version mismatch!")
try:
ret = bitbake_main(BitBakeConfigParameters(sys.argv),
cookerdata.CookerConfiguration())
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 2019d50..49dc8d5 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -36,7 +36,6 @@ from bb import ui
from bb import server
from bb import cookerdata
-__version__ = "1.27.0"
logger = logging.getLogger("BitBake")
class BBMainException(Exception):
@@ -83,7 +82,7 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
def parseCommandLine(self, argv=sys.argv):
parser = optparse.OptionParser(
- version = "BitBake Build Tool Core version %s, %%prog version %s" % (bb.__version__, __version__),
+ version = "BitBake Build Tool Core version %s" % bb.__version__,
usage = """%prog [options] [recipename/target ...]
Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
--
2.1.4
reply other threads:[~2015-04-28 12:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430223357-9986-1-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.