mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
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>
This commit is contained in:
parent
e97cd0017b
commit
9c6a125462
|
@ -518,7 +518,7 @@ def create_recipe(args):
|
||||||
# We need this checking mechanism to improve the recipe created by recipetool and devtool
|
# We need this checking mechanism to improve the recipe created by recipetool and devtool
|
||||||
# is able to parse and build by bitbake.
|
# is able to parse and build by bitbake.
|
||||||
# If there is no input for branch name, then check for branch name with SRCREV provided.
|
# If there is no input for branch name, then check for branch name with SRCREV provided.
|
||||||
if not srcbranch and not nobranch and srcrev and (srcrev != '${AUTOREV}'):
|
if not srcbranch and not nobranch and srcrev and (srcrev != '${AUTOREV}') and scheme in ['git', 'gitsm']:
|
||||||
try:
|
try:
|
||||||
cmd = 'git branch -r --contains'
|
cmd = 'git branch -r --contains'
|
||||||
check_branch, check_branch_err = bb.process.run('%s %s' % (cmd, srcrev), cwd=srctree)
|
check_branch, check_branch_err = bb.process.run('%s %s' % (cmd, srcrev), cwd=srctree)
|
||||||
|
@ -549,7 +549,7 @@ def create_recipe(args):
|
||||||
params['branch'] = srcbranch
|
params['branch'] = srcbranch
|
||||||
srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
|
srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
|
||||||
|
|
||||||
if storeTagName:
|
if storeTagName and scheme in ['git', 'gitsm']:
|
||||||
# Re-introduced tag variable from storeTagName
|
# Re-introduced tag variable from storeTagName
|
||||||
# Check srcrev using tag and check validity of the tag
|
# Check srcrev using tag and check validity of the tag
|
||||||
cmd = ('git rev-parse --verify %s' % (storeTagName))
|
cmd = ('git rev-parse --verify %s' % (storeTagName))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user