mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

Previously this had its own implementation of splitting a list of packages with optional version e.g. "libncurses-dev (>= 5.9)"; switch to using the already existing bitbake function which does this as it is much better tested. (From OE-Core rev: de21a483063d9803c4ce1d62b03913ccad2931bd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1.9 KiB
Executable File
1.9 KiB
Executable File
#!/usr/bin/env python
Report significant differences in the buildhistory repository since a specific revision
Copyright (C) 2012 Intel Corporation
Author: Paul Eggleton paul.eggleton@linux.intel.com
import sys import os
Ensure PythonGit is installed (buildhistory_analysis needs it)
try: import git except ImportError: print("Please install PythonGit 0.3.1 or later in order to use this script") sys.exit(1)
def main(): if (len(sys.argv) < 3): print("Report significant differences in the buildhistory repository") print("Syntax: %s [to-revision]" % os.path.basename(sys.argv[0])) print("If to-revision is not specified, it defaults to HEAD") sys.exit(1)
# Set path to OE lib dir so we can import the buildhistory_analysis module
basepath = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])) + '/..')
newpath = basepath + '/meta/lib'
# Set path to bitbake lib dir so the buildhistory_analysis module can load bb.utils
if os.path.exists(basepath + '/bitbake/lib/bb'):
bitbakepath = basepath + '/bitbake'
else:
# look for bitbake/bin dir in PATH
bitbakepath = None
for pth in os.environ['PATH'].split(':'):
if os.path.exists(os.path.join(pth, '../lib/bb')):
bitbakepath = os.path.abspath(os.path.join(pth, '..'))
break
if not bitbakepath:
print("Unable to find bitbake by searching parent directory of this script or PATH")
sys.exit(1)
sys.path.extend([newpath, bitbakepath + '/lib'])
import oe.buildhistory_analysis
if len(sys.argv) > 3:
torev = sys.argv[3]
else:
torev = 'HEAD'
changes = oe.buildhistory_analysis.process_changes(sys.argv[1], sys.argv[2], torev)
for chg in changes:
print('%s' % chg)
sys.exit(0)
if name == "main": main()