diff options
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r-- | scripts/lib/devtool/standard.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index d0d8cb85a2..bd009f44b1 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -1463,8 +1463,10 @@ def _export_local_files(srctree, rd, destdir, srctreebase): | |||
1463 | 1. updated - files that already exist in SRCURI | 1463 | 1. updated - files that already exist in SRCURI |
1464 | 2. added - new files files that don't exist in SRCURI | 1464 | 2. added - new files files that don't exist in SRCURI |
1465 | 3 removed - files that exist in SRCURI but not in exported files | 1465 | 3 removed - files that exist in SRCURI but not in exported files |
1466 | In each dict the key is the 'basepath' of the URI and value is the | 1466 | In each dict the key is the 'basepath' of the URI and value is: |
1467 | absolute path to the existing file in recipe space (if any). | 1467 | - for updated and added dicts, a dict with 1 optionnal key: |
1468 | - 'path': the absolute path to the existing file in recipe space (if any) | ||
1469 | - for removed dict, the absolute path to the existing file in recipe space | ||
1468 | """ | 1470 | """ |
1469 | import oe.recipeutils | 1471 | import oe.recipeutils |
1470 | 1472 | ||
@@ -1546,9 +1548,9 @@ def _export_local_files(srctree, rd, destdir, srctreebase): | |||
1546 | origpath = existing_files.pop(fname) | 1548 | origpath = existing_files.pop(fname) |
1547 | workpath = os.path.join(local_files_dir, fname) | 1549 | workpath = os.path.join(local_files_dir, fname) |
1548 | if not filecmp.cmp(origpath, workpath): | 1550 | if not filecmp.cmp(origpath, workpath): |
1549 | updated[fname] = origpath | 1551 | updated[fname] = {'path' : origpath} |
1550 | elif fname != '.gitignore': | 1552 | elif fname != '.gitignore': |
1551 | added[fname] = None | 1553 | added[fname] = {} |
1552 | 1554 | ||
1553 | workdir = rd.getVar('WORKDIR') | 1555 | workdir = rd.getVar('WORKDIR') |
1554 | s = rd.getVar('S') | 1556 | s = rd.getVar('S') |
@@ -1565,7 +1567,7 @@ def _export_local_files(srctree, rd, destdir, srctreebase): | |||
1565 | if os.path.exists(fpath): | 1567 | if os.path.exists(fpath): |
1566 | origpath = existing_files.pop(fname) | 1568 | origpath = existing_files.pop(fname) |
1567 | if not filecmp.cmp(origpath, fpath): | 1569 | if not filecmp.cmp(origpath, fpath): |
1568 | updated[fpath] = origpath | 1570 | updated[fpath] = {'path' : origpath} |
1569 | 1571 | ||
1570 | removed = existing_files | 1572 | removed = existing_files |
1571 | return (updated, added, removed) | 1573 | return (updated, added, removed) |
@@ -1651,7 +1653,8 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi | |||
1651 | redirect_output=dry_run_outdir) | 1653 | redirect_output=dry_run_outdir) |
1652 | else: | 1654 | else: |
1653 | files_dir = _determine_files_dir(rd) | 1655 | files_dir = _determine_files_dir(rd) |
1654 | for basepath, path in upd_f.items(): | 1656 | for basepath, param in upd_f.items(): |
1657 | path = param['path'] | ||
1655 | logger.info('Updating file %s%s' % (basepath, dry_run_suffix)) | 1658 | logger.info('Updating file %s%s' % (basepath, dry_run_suffix)) |
1656 | if os.path.isabs(basepath): | 1659 | if os.path.isabs(basepath): |
1657 | # Original file (probably with subdir pointing inside source tree) | 1660 | # Original file (probably with subdir pointing inside source tree) |
@@ -1661,7 +1664,8 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi | |||
1661 | _move_file(os.path.join(local_files_dir, basepath), path, | 1664 | _move_file(os.path.join(local_files_dir, basepath), path, |
1662 | dry_run_outdir=dry_run_outdir, base_outdir=recipedir) | 1665 | dry_run_outdir=dry_run_outdir, base_outdir=recipedir) |
1663 | update_srcuri= True | 1666 | update_srcuri= True |
1664 | for basepath, path in new_f.items(): | 1667 | for basepath, param in new_f.items(): |
1668 | path = param['path'] | ||
1665 | logger.info('Adding new file %s%s' % (basepath, dry_run_suffix)) | 1669 | logger.info('Adding new file %s%s' % (basepath, dry_run_suffix)) |
1666 | _move_file(os.path.join(local_files_dir, basepath), | 1670 | _move_file(os.path.join(local_files_dir, basepath), |
1667 | os.path.join(files_dir, basepath), | 1671 | os.path.join(files_dir, basepath), |
@@ -1783,7 +1787,8 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil | |||
1783 | else: | 1787 | else: |
1784 | # Update existing files | 1788 | # Update existing files |
1785 | files_dir = _determine_files_dir(rd) | 1789 | files_dir = _determine_files_dir(rd) |
1786 | for basepath, path in upd_f.items(): | 1790 | for basepath, param in upd_f.items(): |
1791 | path = param['path'] | ||
1787 | logger.info('Updating file %s' % basepath) | 1792 | logger.info('Updating file %s' % basepath) |
1788 | if os.path.isabs(basepath): | 1793 | if os.path.isabs(basepath): |
1789 | # Original file (probably with subdir pointing inside source tree) | 1794 | # Original file (probably with subdir pointing inside source tree) |
@@ -1817,7 +1822,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil | |||
1817 | dry_run_outdir=dry_run_outdir, base_outdir=recipedir) | 1822 | dry_run_outdir=dry_run_outdir, base_outdir=recipedir) |
1818 | updatefiles = True | 1823 | updatefiles = True |
1819 | # Add any new files | 1824 | # Add any new files |
1820 | for basepath, path in new_f.items(): | 1825 | for basepath, param in new_f.items(): |
1821 | logger.info('Adding new file %s%s' % (basepath, dry_run_suffix)) | 1826 | logger.info('Adding new file %s%s' % (basepath, dry_run_suffix)) |
1822 | _move_file(os.path.join(local_files_dir, basepath), | 1827 | _move_file(os.path.join(local_files_dir, basepath), |
1823 | os.path.join(files_dir, basepath), | 1828 | os.path.join(files_dir, basepath), |