diff mbox series

[07/15] fetch2: gitsm: use rev URL parameter instead of SRCREV variable

Message ID 20250902064515.30879-8-stefan.herbrechtsmeier-oss@weidmueller.com
State New
Headers show
Series fetch2: gitsm: rework and simplify | expand

Commit Message

Stefan Herbrechtsmeier Sept. 2, 2025, 6:45 a.m. UTC
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
---

 lib/bb/fetch2/gitsm.py | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index bda9864ee..497661bd6 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -123,6 +123,7 @@  class GitSM(Git):
             url += ";subpath=%s" % module
             url += ";nobranch=1"
             url += ";lfs=%s" % ("1" if self._need_lfs(ud) else "0")
+            url += ";rev=%s" % subrevision[module]
             # Note that adding "user=" here to give credentials to the
             # submodule is not supported. Since using SRC_URI to give git://
             # URL a password is not supported, one have to use one of the
@@ -130,13 +131,7 @@  class GitSM(Git):
             # the user (See comment in git.py).
             # So, we will not take patches adding "user=" support here.
 
-            ld = d.createCopy()
-            # Not necessary to set SRC_URI, since we're passing the URI to
-            # Fetch.
-            #ld.setVar('SRC_URI', url)
-            ld.setVar('SRCREV_%s' % module, subrevision[module])
-
-            function(ud, url, module, paths[module], workdir, ld)
+            function(ud, url, module, paths[module], workdir, d)
 
         return submodules != []