From 8be95c5fbe6ad970943edabe288fd47d1dcac288 Mon Sep 17 00:00:00 2001 From: Leonardo Sandoval Date: Tue, 8 Sep 2015 11:39:09 +0100 Subject: devtool: add upgrade feature Upgrades a recipe to a particular version and downloads the source code into a folder. User can avoid patching the source code. These are the general steps of the upgrade function: - Extract current recipe source code into srctree and create a branch - Extract upgrade recipe source code into srctree and rebase with previous branch. In case the rebase is not correctly applied, source code will not be deleted, so user correct the patches - Creates the new recipe under the workspace [YOCTO #7642] (From OE-Core rev: 4020f5d91b3e4d011150d5081d36215f8eab732e) Signed-off-by: Leonardo Sandoval Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- scripts/lib/devtool/standard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/lib/devtool/standard.py') diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index a5a20e3ae8..4d51a458fe 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -178,6 +178,8 @@ def extract(args, config, basepath, workspace): srctree = os.path.abspath(args.srctree) initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd) + logger.info('Source tree extracted to %s' % srctree) + if initial_rev: return 0 else: @@ -351,7 +353,6 @@ def _extract_source(srctree, keep_temp, devbranch, d): bb.process.run('git checkout patches', cwd=srcsubdir) shutil.move(srcsubdir, srctree) - logger.info('Source tree extracted to %s' % srctree) finally: bb.logger.setLevel(origlevel) @@ -451,6 +452,7 @@ def modify(args, config, basepath, workspace): initial_rev = _extract_source(args.srctree, False, args.branch, rd) if not initial_rev: return 1 + logger.info('Source tree extracted to %s' % srctree) # Get list of commits since this revision (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=args.srctree) commits = stdout.split() -- cgit v1.2.3-54-g00ecf