summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 54e7e85396..2fc9e0aa4e 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -480,7 +480,6 @@ def create_recipe(args):
480 if tag: 480 if tag:
481 # Keep a copy of tag and append nobranch=1 then remove tag from URL. 481 # Keep a copy of tag and append nobranch=1 then remove tag from URL.
482 # Bitbake fetcher unable to fetch when {AUTOREV} and tag is set at the same time. 482 # Bitbake fetcher unable to fetch when {AUTOREV} and tag is set at the same time.
483 # We will re-introduce tag argument after bitbake fetcher process is complete.
484 storeTagName = params['tag'] 483 storeTagName = params['tag']
485 params['nobranch'] = '1' 484 params['nobranch'] = '1'
486 del params['tag'] 485 del params['tag']
@@ -552,13 +551,11 @@ def create_recipe(args):
552 551
553 # Since we might have a value in srcbranch, we need to 552 # Since we might have a value in srcbranch, we need to
554 # recontruct the srcuri to include 'branch' in params. 553 # recontruct the srcuri to include 'branch' in params.
554 scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(srcuri)
555 if srcbranch: 555 if srcbranch:
556 scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(srcuri)
557 params['branch'] = srcbranch 556 params['branch'] = srcbranch
558 srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
559 557
560 if storeTagName and scheme in ['git', 'gitsm']: 558 if storeTagName and scheme in ['git', 'gitsm']:
561 # Re-introduced tag variable from storeTagName
562 # Check srcrev using tag and check validity of the tag 559 # Check srcrev using tag and check validity of the tag
563 cmd = ('git rev-parse --verify %s' % (storeTagName)) 560 cmd = ('git rev-parse --verify %s' % (storeTagName))
564 try: 561 try:
@@ -568,6 +565,9 @@ def create_recipe(args):
568 logger.error(str(err)) 565 logger.error(str(err))
569 logger.error("Possibly wrong tag name is provided") 566 logger.error("Possibly wrong tag name is provided")
570 sys.exit(1) 567 sys.exit(1)
568 # Drop tag from srcuri as it will have conflicts with SRCREV during recipe parse.
569 del params['tag']
570 srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
571 571
572 if os.path.exists(os.path.join(srctree, '.gitmodules')) and srcuri.startswith('git://'): 572 if os.path.exists(os.path.join(srctree, '.gitmodules')) and srcuri.startswith('git://'):
573 srcuri = 'gitsm://' + srcuri[6:] 573 srcuri = 'gitsm://' + srcuri[6:]