summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-31 11:54:12 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 23:30:02 +0100
commit9c6a125462dcdff1ffd7c937c99efa38d57ef32c (patch)
treebe51a358fbd8740ffef3b78aaec80dac14086e2f /scripts/lib
parente97cd0017bcbaa9ccb065ba5af9ed437d45db079 (diff)
downloadpoky-9c6a125462dcdff1ffd7c937c99efa38d57ef32c.tar.gz
recipetool: create: make recently added branch/tag handling git specific
The branch and tag handling code that was recently added in OE-Core revs ecca596b75cfda2f798a0bdde75f4f774e23a95b and 3afdcbdc9a3e65bc925ec61717784ffec67d529d is specific to git, so only apply it when we're fetching from a git URL. (From OE-Core rev: 5d4bfe6cf788ce971a2e9419bc13492153023681) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/recipetool/create.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 834633610a..4da745b732 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -518,7 +518,7 @@ def create_recipe(args):
518 # We need this checking mechanism to improve the recipe created by recipetool and devtool 518 # We need this checking mechanism to improve the recipe created by recipetool and devtool
519 # is able to parse and build by bitbake. 519 # is able to parse and build by bitbake.
520 # If there is no input for branch name, then check for branch name with SRCREV provided. 520 # If there is no input for branch name, then check for branch name with SRCREV provided.
521 if not srcbranch and not nobranch and srcrev and (srcrev != '${AUTOREV}'): 521 if not srcbranch and not nobranch and srcrev and (srcrev != '${AUTOREV}') and scheme in ['git', 'gitsm']:
522 try: 522 try:
523 cmd = 'git branch -r --contains' 523 cmd = 'git branch -r --contains'
524 check_branch, check_branch_err = bb.process.run('%s %s' % (cmd, srcrev), cwd=srctree) 524 check_branch, check_branch_err = bb.process.run('%s %s' % (cmd, srcrev), cwd=srctree)
@@ -549,7 +549,7 @@ def create_recipe(args):
549 params['branch'] = srcbranch 549 params['branch'] = srcbranch
550 srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params)) 550 srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
551 551
552 if storeTagName: 552 if storeTagName and scheme in ['git', 'gitsm']:
553 # Re-introduced tag variable from storeTagName 553 # Re-introduced tag variable from storeTagName
554 # Check srcrev using tag and check validity of the tag 554 # Check srcrev using tag and check validity of the tag
555 cmd = ('git rev-parse --verify %s' % (storeTagName)) 555 cmd = ('git rev-parse --verify %s' % (storeTagName))