diff options
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r-- | scripts/lib/recipetool/create.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 293198d1c8..f5d541eb6c 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -873,8 +873,10 @@ def create_recipe(args): | |||
873 | outlines.append('') | 873 | outlines.append('') |
874 | outlines.extend(lines_after) | 874 | outlines.extend(lines_after) |
875 | 875 | ||
876 | outlines = [ line.rstrip('\n') +"\n" for line in outlines] | ||
877 | |||
876 | if extravalues: | 878 | if extravalues: |
877 | _, outlines = oe.recipeutils.patch_recipe_lines(outlines, extravalues, trailing_newline=False) | 879 | _, outlines = oe.recipeutils.patch_recipe_lines(outlines, extravalues, trailing_newline=True) |
878 | 880 | ||
879 | if args.extract_to: | 881 | if args.extract_to: |
880 | scriptutils.git_convert_standalone_clone(srctree) | 882 | scriptutils.git_convert_standalone_clone(srctree) |
@@ -890,7 +892,7 @@ def create_recipe(args): | |||
890 | log_info_cond('Source extracted to %s' % args.extract_to, args.devtool) | 892 | log_info_cond('Source extracted to %s' % args.extract_to, args.devtool) |
891 | 893 | ||
892 | if outfile == '-': | 894 | if outfile == '-': |
893 | sys.stdout.write('\n'.join(outlines) + '\n') | 895 | sys.stdout.write(''.join(outlines) + '\n') |
894 | else: | 896 | else: |
895 | with open(outfile, 'w') as f: | 897 | with open(outfile, 'w') as f: |
896 | lastline = None | 898 | lastline = None |
@@ -898,7 +900,7 @@ def create_recipe(args): | |||
898 | if not lastline and not line: | 900 | if not lastline and not line: |
899 | # Skip extra blank lines | 901 | # Skip extra blank lines |
900 | continue | 902 | continue |
901 | f.write('%s\n' % line) | 903 | f.write('%s' % line) |
902 | lastline = line | 904 | lastline = line |
903 | log_info_cond('Recipe %s has been created; further editing may be required to make it fully functional' % outfile, args.devtool) | 905 | log_info_cond('Recipe %s has been created; further editing may be required to make it fully functional' % outfile, args.devtool) |
904 | tinfoil.modified_files() | 906 | tinfoil.modified_files() |