summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-06-13 16:12:18 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-23 11:44:12 +0100
commitd72227fd2ba8eca6dbe7ba3af7b1edc19608cb7b (patch)
tree861a8a66082b69f5454835126ef56b6d3504c26f /scripts
parent43ceb87454f49707750833b3130c15290b12ccfd (diff)
downloadpoky-d72227fd2ba8eca6dbe7ba3af7b1edc19608cb7b.tar.gz
buildhistory-diff: exclude paths from the output
Implemented -e/--exclude-path command line option to exclude paths from buildhistory-diff output. [YOCTO #11459] (From OE-Core rev: 86393230e0ce33bf7d6d69d3019113e704081d30) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/buildhistory-diff12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index dd9745e80c..1b2e0d1f4e 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -39,6 +39,8 @@ def main():
39 parser.add_option("-S", "--signatures-with-diff", 39 parser.add_option("-S", "--signatures-with-diff",
40 help = "Report on actual signature differences instead of output (requires signature data to have been generated, either by running the actual tasks or using bitbake -S)", 40 help = "Report on actual signature differences instead of output (requires signature data to have been generated, either by running the actual tasks or using bitbake -S)",
41 action="store_true", dest="sigsdiff", default=False) 41 action="store_true", dest="sigsdiff", default=False)
42 parser.add_option("-e", "--exclude-path", action="append",
43 help = "exclude path from the output")
42 44
43 options, args = parser.parse_args(sys.argv) 45 options, args = parser.parse_args(sys.argv)
44 46
@@ -75,7 +77,7 @@ def main():
75 sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n") 77 sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n")
76 sys.exit(1) 78 sys.exit(1)
77 79
78 import oe.buildhistory_analysis 80 from oe.buildhistory_analysis import process_changes
79 81
80 fromrev = 'build-minus-1' 82 fromrev = 'build-minus-1'
81 torev = 'HEAD' 83 torev = 'HEAD'
@@ -92,7 +94,9 @@ def main():
92 94
93 import gitdb 95 import gitdb
94 try: 96 try:
95 changes = oe.buildhistory_analysis.process_changes(options.buildhistory_dir, fromrev, torev, options.report_all, options.report_ver, options.sigs, options.sigsdiff) 97 changes = process_changes(options.buildhistory_dir, fromrev, torev,
98 options.report_all, options.report_ver, options.sigs,
99 options.sigsdiff, options.exclude_path)
96 except gitdb.exc.BadObject as e: 100 except gitdb.exc.BadObject as e:
97 if len(args) == 1: 101 if len(args) == 1:
98 sys.stderr.write("Unable to find previous build revision in buildhistory repository\n\n") 102 sys.stderr.write("Unable to find previous build revision in buildhistory repository\n\n")
@@ -102,7 +106,9 @@ def main():
102 sys.exit(1) 106 sys.exit(1)
103 107
104 for chg in changes: 108 for chg in changes:
105 print('%s' % chg) 109 out = str(chg)
110 if out:
111 print(out)
106 112
107 sys.exit(0) 113 sys.exit(0)
108 114