diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-07-14 09:04:20 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-20 10:28:49 +0100 |
commit | c4297f3e2220ec71f1745a70c603541c6a24ee76 (patch) | |
tree | b11f72fb82621e6c5a156d3d38d90261ffbc7aaa /scripts/lib/devtool | |
parent | 8be2077a38a0af3dc2b3ccd5e813e5bde840b8f0 (diff) | |
download | poky-c4297f3e2220ec71f1745a70c603541c6a24ee76.tar.gz |
devtool: update-recipe: don't copy local files that haven't changed
If there are files in the oe-local-files directory which are identical
to the original version, then we shouldn't be copying them to the
destination layer. This is particularly important when using the -a
option to create a bbappend.
(From OE-Core rev: 9230bfcc839eb35630949f0a8ed058ca1fa944b1)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r-- | scripts/lib/devtool/standard.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 1ec31bcafe..e19812092e 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -28,6 +28,7 @@ import argparse_oe | |||
28 | import scriptutils | 28 | import scriptutils |
29 | import errno | 29 | import errno |
30 | import glob | 30 | import glob |
31 | import filecmp | ||
31 | from collections import OrderedDict | 32 | from collections import OrderedDict |
32 | from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, DevtoolError | 33 | from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, DevtoolError |
33 | from devtool import parse_recipe | 34 | from devtool import parse_recipe |
@@ -1031,7 +1032,10 @@ def _export_local_files(srctree, rd, destdir): | |||
1031 | if new_set is not None: | 1032 | if new_set is not None: |
1032 | for fname in new_set: | 1033 | for fname in new_set: |
1033 | if fname in existing_files: | 1034 | if fname in existing_files: |
1034 | updated[fname] = existing_files.pop(fname) | 1035 | origpath = existing_files.pop(fname) |
1036 | workpath = os.path.join(local_files_dir, fname) | ||
1037 | if not filecmp.cmp(origpath, workpath): | ||
1038 | updated[fname] = origpath | ||
1035 | elif fname != '.gitignore': | 1039 | elif fname != '.gitignore': |
1036 | added[fname] = None | 1040 | added[fname] = None |
1037 | 1041 | ||