diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-07-14 09:04:24 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-20 10:28:49 +0100 |
commit | 10a5af5eb4f928abe1fe12e63520f656b682d55d (patch) | |
tree | ad1a9258b7b67cf56c6afda20314e3bafdd1f3f5 /meta/lib/oe | |
parent | 7af3295b0b2eb65e8f541f358c3091918db65ab9 (diff) | |
download | poky-10a5af5eb4f928abe1fe12e63520f656b682d55d.tar.gz |
devtool: upgrade: record original recipe files
This provides us with the information we need to remove the original
version recipe and associated files when running "devtool finish" after
"devtool upgrade".
(From OE-Core rev: 92eb42c347af919cd9f8739515fdf806c12b5ba8)
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 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index cb4ed53d0f..b8d481aeb8 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -365,6 +365,7 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True): | |||
365 | # Copy local files to target directory and gather any remote files | 365 | # Copy local files to target directory and gather any remote files |
366 | bb_dir = os.path.dirname(d.getVar('FILE', True)) + os.sep | 366 | bb_dir = os.path.dirname(d.getVar('FILE', True)) + os.sep |
367 | remotes = [] | 367 | remotes = [] |
368 | copied = [] | ||
368 | includes = [path for path in d.getVar('BBINCLUDED', True).split() if | 369 | includes = [path for path in d.getVar('BBINCLUDED', True).split() if |
369 | path.startswith(bb_dir) and os.path.exists(path)] | 370 | path.startswith(bb_dir) and os.path.exists(path)] |
370 | for path in fetch.localpaths() + includes: | 371 | for path in fetch.localpaths() + includes: |
@@ -376,13 +377,14 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True): | |||
376 | if not os.path.exists(subdir): | 377 | if not os.path.exists(subdir): |
377 | os.makedirs(subdir) | 378 | os.makedirs(subdir) |
378 | shutil.copy2(path, os.path.join(tgt_dir, relpath)) | 379 | shutil.copy2(path, os.path.join(tgt_dir, relpath)) |
380 | copied.append(relpath) | ||
379 | else: | 381 | else: |
380 | remotes.append(path) | 382 | remotes.append(path) |
381 | # Simply copy whole meta dir, if requested | 383 | # Simply copy whole meta dir, if requested |
382 | if whole_dir: | 384 | if whole_dir: |
383 | shutil.copytree(bb_dir, tgt_dir) | 385 | shutil.copytree(bb_dir, tgt_dir) |
384 | 386 | ||
385 | return remotes | 387 | return copied, remotes |
386 | 388 | ||
387 | 389 | ||
388 | def get_recipe_local_files(d, patches=False): | 390 | def get_recipe_local_files(d, patches=False): |