From 12c51b58cb273e5104aca84996ef0474465efc6d Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 6 Jul 2016 15:47:40 +1200 Subject: 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". Signed-off-by: Paul Eggleton --- meta/lib/oe/recipeutils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta/lib/oe/recipeutils.py') 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): # Copy local files to target directory and gather any remote files bb_dir = os.path.dirname(d.getVar('FILE', True)) + os.sep remotes = [] + copied = [] includes = [path for path in d.getVar('BBINCLUDED', True).split() if path.startswith(bb_dir) and os.path.exists(path)] for path in fetch.localpaths() + includes: @@ -376,13 +377,14 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True): if not os.path.exists(subdir): os.makedirs(subdir) shutil.copy2(path, os.path.join(tgt_dir, relpath)) + copied.append(relpath) else: remotes.append(path) # Simply copy whole meta dir, if requested if whole_dir: shutil.copytree(bb_dir, tgt_dir) - return remotes + return copied, remotes def get_recipe_local_files(d, patches=False): -- cgit 1.2.3-korg