From 953dffd8937a261b448dcf9f5a034aac83874b63 Mon Sep 17 00:00:00 2001 From: Gabi Beyer Date: Wed, 15 Nov 2017 10:25:49 -0800 Subject: [PATCH] Move license to update sooner Add the license from the recipe file to the spec licenses prior to the specfile creation, so that tarball analysis that does not find a license file will get one from the bitbake file. Signed-off-by: Gabi Beyer --- autospec/autospec.py | 3 +++ autospec/infile_bb_parser.py | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autospec/autospec.py b/autospec/autospec.py index 3bfe0c6..cd572d2 100644 --- a/autospec/autospec.py +++ b/autospec/autospec.py @@ -213,6 +213,9 @@ def main(): infile_dict = infile_handler.infile_reader(args.infile, name) if not url: url = infile_dict.get('URL') + print("Tar url from infile: {}".format(url)) + if infile_dict.get("LICENSE"): + license.add_license(infile_dict.get("LICENSE")) if not url: parser.error(argparse.ArgumentTypeError( diff --git a/autospec/infile_bb_parser.py b/autospec/infile_bb_parser.py index e5da475..9dd341e 100644 --- a/autospec/infile_bb_parser.py +++ b/autospec/infile_bb_parser.py @@ -254,7 +254,4 @@ def bb_scraper(bb_fp, bb_dict): get_src_url(bb_dict) replace_bb_variable_names(bb_dict) - # print(cmd) - # for i, j in bb_dict.items(): - # print(i, j) return bb_dict