summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 6674e67267..10d0cd3b7c 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1452,8 +1452,10 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
1452 1. updated - files that already exist in SRCURI 1452 1. updated - files that already exist in SRCURI
1453 2. added - new files files that don't exist in SRCURI 1453 2. added - new files files that don't exist in SRCURI
1454 3 removed - files that exist in SRCURI but not in exported files 1454 3 removed - files that exist in SRCURI but not in exported files
1455 In each dict the key is the 'basepath' of the URI and value is the 1455 In each dict the key is the 'basepath' of the URI and value is:
1456 absolute path to the existing file in recipe space (if any). 1456 - for updated and added dicts, a dict with 1 optionnal key:
1457 - 'path': the absolute path to the existing file in recipe space (if any)
1458 - for removed dict, the absolute path to the existing file in recipe space
1457 """ 1459 """
1458 import oe.recipeutils 1460 import oe.recipeutils
1459 1461
@@ -1535,9 +1537,9 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
1535 origpath = existing_files.pop(fname) 1537 origpath = existing_files.pop(fname)
1536 workpath = os.path.join(local_files_dir, fname) 1538 workpath = os.path.join(local_files_dir, fname)
1537 if not filecmp.cmp(origpath, workpath): 1539 if not filecmp.cmp(origpath, workpath):
1538 updated[fname] = origpath 1540 updated[fname] = {'path' : origpath}
1539 elif fname != '.gitignore': 1541 elif fname != '.gitignore':
1540 added[fname] = None 1542 added[fname] = {}
1541 1543
1542 workdir = rd.getVar('WORKDIR') 1544 workdir = rd.getVar('WORKDIR')
1543 s = rd.getVar('S') 1545 s = rd.getVar('S')
@@ -1554,7 +1556,7 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
1554 if os.path.exists(fpath): 1556 if os.path.exists(fpath):
1555 origpath = existing_files.pop(fname) 1557 origpath = existing_files.pop(fname)
1556 if not filecmp.cmp(origpath, fpath): 1558 if not filecmp.cmp(origpath, fpath):
1557 updated[fpath] = origpath 1559 updated[fpath] = {'path' : origpath}
1558 1560
1559 removed = existing_files 1561 removed = existing_files
1560 return (updated, added, removed) 1562 return (updated, added, removed)
@@ -1640,7 +1642,8 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
1640 redirect_output=dry_run_outdir) 1642 redirect_output=dry_run_outdir)
1641 else: 1643 else:
1642 files_dir = _determine_files_dir(rd) 1644 files_dir = _determine_files_dir(rd)
1643 for basepath, path in upd_f.items(): 1645 for basepath, param in upd_f.items():
1646 path = param['path']
1644 logger.info('Updating file %s%s' % (basepath, dry_run_suffix)) 1647 logger.info('Updating file %s%s' % (basepath, dry_run_suffix))
1645 if os.path.isabs(basepath): 1648 if os.path.isabs(basepath):
1646 # Original file (probably with subdir pointing inside source tree) 1649 # Original file (probably with subdir pointing inside source tree)
@@ -1650,7 +1653,8 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
1650 _move_file(os.path.join(local_files_dir, basepath), path, 1653 _move_file(os.path.join(local_files_dir, basepath), path,
1651 dry_run_outdir=dry_run_outdir, base_outdir=recipedir) 1654 dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
1652 update_srcuri= True 1655 update_srcuri= True
1653 for basepath, path in new_f.items(): 1656 for basepath, param in new_f.items():
1657 path = param['path']
1654 logger.info('Adding new file %s%s' % (basepath, dry_run_suffix)) 1658 logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
1655 _move_file(os.path.join(local_files_dir, basepath), 1659 _move_file(os.path.join(local_files_dir, basepath),
1656 os.path.join(files_dir, basepath), 1660 os.path.join(files_dir, basepath),
@@ -1772,7 +1776,8 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
1772 else: 1776 else:
1773 # Update existing files 1777 # Update existing files
1774 files_dir = _determine_files_dir(rd) 1778 files_dir = _determine_files_dir(rd)
1775 for basepath, path in upd_f.items(): 1779 for basepath, param in upd_f.items():
1780 path = param['path']
1776 logger.info('Updating file %s' % basepath) 1781 logger.info('Updating file %s' % basepath)
1777 if os.path.isabs(basepath): 1782 if os.path.isabs(basepath):
1778 # Original file (probably with subdir pointing inside source tree) 1783 # Original file (probably with subdir pointing inside source tree)
@@ -1806,7 +1811,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
1806 dry_run_outdir=dry_run_outdir, base_outdir=recipedir) 1811 dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
1807 updatefiles = True 1812 updatefiles = True
1808 # Add any new files 1813 # Add any new files
1809 for basepath, path in new_f.items(): 1814 for basepath, param in new_f.items():
1810 logger.info('Adding new file %s%s' % (basepath, dry_run_suffix)) 1815 logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
1811 _move_file(os.path.join(local_files_dir, basepath), 1816 _move_file(os.path.join(local_files_dir, basepath),
1812 os.path.join(files_dir, basepath), 1817 os.path.join(files_dir, basepath),