diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2015-09-08 11:39:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-09 14:27:51 +0100 |
commit | 8be95c5fbe6ad970943edabe288fd47d1dcac288 (patch) | |
tree | a3a658ff9b01a28d607aa68ea08789fcc666bbed /scripts/lib/devtool/standard.py | |
parent | 7cde0ebd59f12da363e780126ca4284e0930721d (diff) | |
download | poky-8be95c5fbe6ad970943edabe288fd47d1dcac288.tar.gz |
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 <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r-- | scripts/lib/devtool/standard.py | 4 |
1 files changed, 3 insertions, 1 deletions
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): | |||
178 | 178 | ||
179 | srctree = os.path.abspath(args.srctree) | 179 | srctree = os.path.abspath(args.srctree) |
180 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd) | 180 | initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd) |
181 | logger.info('Source tree extracted to %s' % srctree) | ||
182 | |||
181 | if initial_rev: | 183 | if initial_rev: |
182 | return 0 | 184 | return 0 |
183 | else: | 185 | else: |
@@ -351,7 +353,6 @@ def _extract_source(srctree, keep_temp, devbranch, d): | |||
351 | bb.process.run('git checkout patches', cwd=srcsubdir) | 353 | bb.process.run('git checkout patches', cwd=srcsubdir) |
352 | 354 | ||
353 | shutil.move(srcsubdir, srctree) | 355 | shutil.move(srcsubdir, srctree) |
354 | logger.info('Source tree extracted to %s' % srctree) | ||
355 | finally: | 356 | finally: |
356 | bb.logger.setLevel(origlevel) | 357 | bb.logger.setLevel(origlevel) |
357 | 358 | ||
@@ -451,6 +452,7 @@ def modify(args, config, basepath, workspace): | |||
451 | initial_rev = _extract_source(args.srctree, False, args.branch, rd) | 452 | initial_rev = _extract_source(args.srctree, False, args.branch, rd) |
452 | if not initial_rev: | 453 | if not initial_rev: |
453 | return 1 | 454 | return 1 |
455 | logger.info('Source tree extracted to %s' % srctree) | ||
454 | # Get list of commits since this revision | 456 | # Get list of commits since this revision |
455 | (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=args.srctree) | 457 | (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=args.srctree) |
456 | commits = stdout.split() | 458 | commits = stdout.split() |