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 <[email protected]> --- scripts/lib/recipetool/create.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index ef0ba974a9..d785f042ee 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -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: -- 2.51.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#232372): https://lists.openembedded.org/g/openembedded-core/message/232372 Mute This Topic: https://lists.openembedded.org/mt/118130044/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
