diff options
Diffstat (limited to 'scripts')
| -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 cd79c7802c..55fa38ccfb 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -1530,6 +1530,11 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi | |||
| 1530 | recipedir = os.path.basename(recipefile) | 1530 | recipedir = os.path.basename(recipefile) |
| 1531 | logger.info('Updating SRCREV in recipe %s%s' % (recipedir, dry_run_suffix)) | 1531 | logger.info('Updating SRCREV in recipe %s%s' % (recipedir, dry_run_suffix)) |
| 1532 | 1532 | ||
| 1533 | # Get original SRCREV | ||
| 1534 | old_srcrev = rd.getVar('SRCREV') or '' | ||
| 1535 | if old_srcrev == "INVALID": | ||
| 1536 | raise DevtoolError('Update mode srcrev is only valid for recipe fetched from an SCM repository') | ||
| 1537 | |||
| 1533 | # Get HEAD revision | 1538 | # Get HEAD revision |
| 1534 | try: | 1539 | try: |
| 1535 | stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree) | 1540 | stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree) |
| @@ -1556,7 +1561,6 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi | |||
| 1556 | if not no_remove: | 1561 | if not no_remove: |
| 1557 | # Find list of existing patches in recipe file | 1562 | # Find list of existing patches in recipe file |
| 1558 | patches_dir = tempfile.mkdtemp(dir=tempdir) | 1563 | patches_dir = tempfile.mkdtemp(dir=tempdir) |
| 1559 | old_srcrev = rd.getVar('SRCREV') or '' | ||
| 1560 | upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev, | 1564 | upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev, |
| 1561 | patches_dir) | 1565 | patches_dir) |
| 1562 | logger.debug('Patches: update %s, new %s, delete %s' % (dict(upd_p), dict(new_p), dict(del_p))) | 1566 | logger.debug('Patches: update %s, new %s, delete %s' % (dict(upd_p), dict(new_p), dict(del_p))) |
