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 54e7e853960..2fc9e0aa4e0 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -480,7 +480,6 @@ def create_recipe(args): if tag: # Keep a copy of tag and append nobranch=1 then remove tag from URL. # Bitbake fetcher unable to fetch when {AUTOREV} and tag is set at the same time. - # We will re-introduce tag argument after bitbake fetcher process is complete. storeTagName = params['tag'] params['nobranch'] = '1' del params['tag'] @@ -552,13 +551,11 @@ def create_recipe(args): # Since we might have a value in srcbranch, we need to # recontruct the srcuri to include 'branch' in params. + scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(srcuri) if srcbranch: - scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(srcuri) params['branch'] = srcbranch - srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params)) if storeTagName and scheme in ['git', 'gitsm']: - # Re-introduced tag variable from storeTagName # Check srcrev using tag and check validity of the tag cmd = ('git rev-parse --verify %s' % (storeTagName)) try: @@ -568,6 +565,9 @@ def create_recipe(args): logger.error(str(err)) logger.error("Possibly wrong tag name is provided") sys.exit(1) + # Drop tag from srcuri as it will have conflicts with SRCREV during recipe parse. + del params['tag'] + srcuri = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params)) if os.path.exists(os.path.join(srctree, '.gitmodules')) and srcuri.startswith('git://'): srcuri = 'gitsm://' + srcuri[6:] |