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