| Message ID | 20260304104342.869457-5-corentin.guillevic@smile.fr |
|---|---|
| State | New |
| Headers | show |
| Series | Clean AUTOREV usage, add revision check for every SCM URI | expand |
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 8930fde5d6..34e23c2c45 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -157,7 +157,12 @@ def _get_uri(rd): break if not srcuri: raise DevtoolError('Unable to find non-local entry in SRC_URI') - srcrev = '${AUTOREV}' + + if srcuri and srcuri.startswith(('gitsm://', 'git://', 'hg://', 'svn://')): + srcrev = '${AUTOREV}' + else: + srcrev = None + if '://' in srcuri: # Fetch a URL rev_re = re.compile(';rev=([^;]+)')
Same than recipetool, the default revision is set to AUTOREV regardless of the URI scheme. AUTOREV is now the default value only if the source URI supports SRCREV. Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr> --- scripts/lib/devtool/upgrade.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)