summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2024-02-16 19:59:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-18 07:34:42 +0000
commit890446392b201a124888f6441b23f6c08a4336da (patch)
treebd9149de7c7d46077a2b0a5a423c6d480be4fcf6 /scripts
parent539c8801265d116e264342635886cf336ddcd42c (diff)
downloadpoky-890446392b201a124888f6441b23f6c08a4336da.tar.gz
devtool: standard: Add some missing whitespace
Makes it a little bit easier when reading the code. (From OE-Core rev: 6a757f9648685448fd18507f6aaf4eed0a57579f) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 0243e3bc75..dd9232da1c 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -460,7 +460,7 @@ def sync(args, config, basepath, workspace):
460 finally: 460 finally:
461 tinfoil.shutdown() 461 tinfoil.shutdown()
462 462
463def symlink_oelocal_files_srctree(rd,srctree): 463def symlink_oelocal_files_srctree(rd, srctree):
464 import oe.patch 464 import oe.patch
465 if os.path.abspath(rd.getVar('S')) == os.path.abspath(rd.getVar('WORKDIR')): 465 if os.path.abspath(rd.getVar('S')) == os.path.abspath(rd.getVar('WORKDIR')):
466 # If recipe extracts to ${WORKDIR}, symlink the files into the srctree 466 # If recipe extracts to ${WORKDIR}, symlink the files into the srctree
@@ -657,9 +657,9 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
657 657
658 if os.path.exists(workshareddir) and (not os.listdir(workshareddir) or kernelVersion != staging_kerVer): 658 if os.path.exists(workshareddir) and (not os.listdir(workshareddir) or kernelVersion != staging_kerVer):
659 shutil.rmtree(workshareddir) 659 shutil.rmtree(workshareddir)
660 oe.path.copyhardlinktree(srcsubdir,workshareddir) 660 oe.path.copyhardlinktree(srcsubdir, workshareddir)
661 elif not os.path.exists(workshareddir): 661 elif not os.path.exists(workshareddir):
662 oe.path.copyhardlinktree(srcsubdir,workshareddir) 662 oe.path.copyhardlinktree(srcsubdir, workshareddir)
663 663
664 tempdir_localdir = os.path.join(tempdir, 'oe-local-files') 664 tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
665 srctree_localdir = os.path.join(srctree, 'oe-local-files') 665 srctree_localdir = os.path.join(srctree, 'oe-local-files')
@@ -689,7 +689,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
689 shutil.move(tempdir_localdir, srcsubdir) 689 shutil.move(tempdir_localdir, srcsubdir)
690 690
691 shutil.move(srcsubdir, srctree) 691 shutil.move(srcsubdir, srctree)
692 symlink_oelocal_files_srctree(d,srctree) 692 symlink_oelocal_files_srctree(d, srctree)
693 693
694 if is_kernel_yocto: 694 if is_kernel_yocto:
695 logger.info('Copying kernel config to srctree') 695 logger.info('Copying kernel config to srctree')
@@ -762,7 +762,7 @@ def get_staging_kver(srcdir):
762 kerver = [] 762 kerver = []
763 staging_kerVer="" 763 staging_kerVer=""
764 if os.path.exists(srcdir) and os.listdir(srcdir): 764 if os.path.exists(srcdir) and os.listdir(srcdir):
765 with open(os.path.join(srcdir,"Makefile")) as f: 765 with open(os.path.join(srcdir, "Makefile")) as f:
766 version = [next(f) for x in range(5)][1:4] 766 version = [next(f) for x in range(5)][1:4]
767 for word in version: 767 for word in version:
768 kerver.append(word.split('= ')[1].split('\n')[0]) 768 kerver.append(word.split('= ')[1].split('\n')[0])
@@ -843,10 +843,10 @@ def modify(args, config, basepath, workspace):
843 staging_kerVer = get_staging_kver(srcdir) 843 staging_kerVer = get_staging_kver(srcdir)
844 staging_kbranch = get_staging_kbranch(srcdir) 844 staging_kbranch = get_staging_kbranch(srcdir)
845 if (os.path.exists(srcdir) and os.listdir(srcdir)) and (kernelVersion in staging_kerVer and staging_kbranch == kbranch): 845 if (os.path.exists(srcdir) and os.listdir(srcdir)) and (kernelVersion in staging_kerVer and staging_kbranch == kbranch):
846 oe.path.copyhardlinktree(srcdir,srctree) 846 oe.path.copyhardlinktree(srcdir, srctree)
847 workdir = rd.getVar('WORKDIR') 847 workdir = rd.getVar('WORKDIR')
848 srcsubdir = rd.getVar('S') 848 srcsubdir = rd.getVar('S')
849 localfilesdir = os.path.join(srctree,'oe-local-files') 849 localfilesdir = os.path.join(srctree, 'oe-local-files')
850 # Move local source files into separate subdir 850 # Move local source files into separate subdir
851 recipe_patches = [os.path.basename(patch) for patch in oe.recipeutils.get_recipe_patches(rd)] 851 recipe_patches = [os.path.basename(patch) for patch in oe.recipeutils.get_recipe_patches(rd)]
852 local_files = oe.recipeutils.get_recipe_local_files(rd) 852 local_files = oe.recipeutils.get_recipe_local_files(rd)
@@ -870,9 +870,9 @@ def modify(args, config, basepath, workspace):
870 for fname in local_files: 870 for fname in local_files:
871 _move_file(os.path.join(workdir, fname), os.path.join(srctree, 'oe-local-files', fname)) 871 _move_file(os.path.join(workdir, fname), os.path.join(srctree, 'oe-local-files', fname))
872 with open(os.path.join(srctree, 'oe-local-files', '.gitignore'), 'w') as f: 872 with open(os.path.join(srctree, 'oe-local-files', '.gitignore'), 'w') as f:
873 f.write('# Ignore local files, by default. Remove this file ''if you want to commit the directory to Git\n*\n') 873 f.write('# Ignore local files, by default. Remove this file if you want to commit the directory to Git\n*\n')
874 874
875 symlink_oelocal_files_srctree(rd,srctree) 875 symlink_oelocal_files_srctree(rd, srctree)
876 876
877 task = 'do_configure' 877 task = 'do_configure'
878 res = tinfoil.build_targets(pn, task, handle_events=True) 878 res = tinfoil.build_targets(pn, task, handle_events=True)
@@ -880,7 +880,7 @@ def modify(args, config, basepath, workspace):
880 # Copy .config to workspace 880 # Copy .config to workspace
881 kconfpath = rd.getVar('B') 881 kconfpath = rd.getVar('B')
882 logger.info('Copying kernel config to workspace') 882 logger.info('Copying kernel config to workspace')
883 shutil.copy2(os.path.join(kconfpath, '.config'),srctree) 883 shutil.copy2(os.path.join(kconfpath, '.config'), srctree)
884 884
885 # Set this to true, we still need to get initial_rev 885 # Set this to true, we still need to get initial_rev
886 # by parsing the git repo 886 # by parsing the git repo
@@ -1004,7 +1004,7 @@ def modify(args, config, basepath, workspace):
1004 ' mv ${S}/.config ${S}/.config.old\n' 1004 ' mv ${S}/.config ${S}/.config.old\n'
1005 ' fi\n' 1005 ' fi\n'
1006 '}\n') 1006 '}\n')
1007 if rd.getVarFlag('do_menuconfig','task'): 1007 if rd.getVarFlag('do_menuconfig', 'task'):
1008 f.write('\ndo_configure:append() {\n' 1008 f.write('\ndo_configure:append() {\n'
1009 ' if [ ${@oe.types.boolean(d.getVar("KCONFIG_CONFIG_ENABLE_MENUCONFIG"))} = True ]; then\n' 1009 ' if [ ${@oe.types.boolean(d.getVar("KCONFIG_CONFIG_ENABLE_MENUCONFIG"))} = True ]; then\n'
1010 ' cp ${KCONFIG_CONFIG_ROOTDIR}/.config ${S}/.config.baseline\n' 1010 ' cp ${KCONFIG_CONFIG_ROOTDIR}/.config ${S}/.config.baseline\n'
@@ -2081,7 +2081,7 @@ def _reset(recipes, no_clean, remove_work, config, basepath, workspace):
2081 # We don't want to risk wiping out any work in progress 2081 # We don't want to risk wiping out any work in progress
2082 if srctreebase.startswith(os.path.join(config.workspace_path, 'sources')): 2082 if srctreebase.startswith(os.path.join(config.workspace_path, 'sources')):
2083 from datetime import datetime 2083 from datetime import datetime
2084 preservesrc = os.path.join(config.workspace_path, 'attic', 'sources', "{}.{}".format(pn,datetime.now().strftime("%Y%m%d%H%M%S"))) 2084 preservesrc = os.path.join(config.workspace_path, 'attic', 'sources', "{}.{}".format(pn, datetime.now().strftime("%Y%m%d%H%M%S")))
2085 logger.info('Preserving source tree in %s\nIf you no ' 2085 logger.info('Preserving source tree in %s\nIf you no '
2086 'longer need it then please delete it manually.\n' 2086 'longer need it then please delete it manually.\n'
2087 'It is also possible to reuse it via devtool source tree argument.' 2087 'It is also possible to reuse it via devtool source tree argument.'