@@ -419,7 +419,7 @@ def create_recipe(args):
tempsrc = ''
source = args.source
srcsubdir = ''
- srcrev = '${AUTOREV}'
+ srcrev = ''
srcbranch = ''
scheme = ''
storeTagName = ''
@@ -470,6 +470,11 @@ def create_recipe(args):
# so we need to extract to a subdirectory
fetchuri += ';subdir=${BPN}'
srcuri = fetchuri
+
+ # Define AUTOREV as default value only if the source URI supports SRCREV
+ if srcuri and srcuri.startswith(('gitsm://', 'git://', 'hg://', 'svn://')):
+ srcrev = '${AUTOREV}'
+
rev_re = re.compile(';rev=([^;]+)')
res = rev_re.search(srcuri)
if res:
AUTOREV shoud only be used for SCM URIs (Git, SVN...). However, the default revision is set to AUTOREV regardless of the URI scheme. To fix this, set AUTOREV as the default value only if the source URI supports SRCREV. Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr> --- scripts/lib/recipetool/create.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)