diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/buildhistory-diff | 12 |
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 | ||
