Skip to contentSkip to conversation

devtool: add support of submodules

PATCH In review Julien Stephan 2 participants 9 messages Nov 22, 2023 – Nov 23, 2023

lore
Share & tools
lore
#0 lore raw

cover devtool: add support of submodules

This series adds the support of git submodules, so we can use devtool modify with gitsm recipes to create modify and export patches using devtool finish.

This series also adds support of git submodules defined inside SRC_URI (i.e extracting a secondary git tree inside S)

My dev branch is available here : [1].

It passed full recipetool/devtool oeselftest locally

Cheers
Julien

[1]: https://git.yoctoproject.org/poky-contrib/log/?h=jstephan/devtool-submodule-fix

Julien Stephan (6):
devtool: fix update-recipe dry-run mode
devtool: finish/update-recipe: restrict mode srcrev to recipes fetched
from SCM
devtool: tag all submodules
devtool: add support for git submodules oeqa/selftest/devtool: add test for git submodules lib/oe/recipeutils.py: remove trailing white-spaces

 meta/classes/devtool-source.bbclass     |   3 +
 meta/lib/oe/patch.py                    |  64 +++---
 meta/lib/oe/recipeutils.py              |  29 ++-
 meta/lib/oeqa/selftest/cases/devtool.py |  47 ++++
 scripts/lib/devtool/__init__.py         |  24 ++
 scripts/lib/devtool/standard.py         | 284 +++++++++++++++---------
 scripts/lib/devtool/upgrade.py          |  51 +++--
 scripts/lib/recipetool/append.py        |   4 +-
 8 files changed, 333 insertions(+), 173 deletions(-)

--
2.42.0

#1 lore raw

PATCH 1/6 devtool: fix update-recipe dry-run mode

When running devtool update-recipe with --mode=srcrev AND --append switch in dry-run, we get the following error:

Traceback (most recent call last):
[...]
Exception: destpath should be set here

Fix this by removing a misplaced else statement in _update_recipe_srcrev

---
 scripts/lib/devtool/standard.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
scripts/lib/devtool/standard.py +4 -5
index d53fb810071..cd79c7802cb 100644
@@ -1576,11 +1576,10 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
                 patchfields['SRC_URI'] = '\\\n    '.join(srcuri)
             if dry_run_outdir:
                 logger.info('Creating bbappend (dry-run)')
-            else:
-                appendfile, destpath = oe.recipeutils.bbappend_recipe(
-                        rd, appendlayerdir, files, wildcardver=wildcard_version,
-                        extralines=patchfields, removevalues=removevalues,
-                        redirect_output=dry_run_outdir)
+            appendfile, destpath = oe.recipeutils.bbappend_recipe(
+                    rd, appendlayerdir, files, wildcardver=wildcard_version,
+                    extralines=patchfields, removevalues=removevalues,
+                    redirect_output=dry_run_outdir)
         else:
             files_dir = _determine_files_dir(rd)
             for basepath, path in upd_f.items():
Signature · 1 line
2.42.0
#2 lore raw

PATCH 2/6 devtool: finish/update-recipe: restrict mode srcrev to recipes fetched from SCM

In reply to Julien Stephan

When specifying --mode / -m srcrev with devtool finish/update-recipe on recipes that are not fetched from a SCM repository we get the following error:

Traceback (most recent call last):
[..]
File "<...>/poky/meta/lib/oe/patch.py", line 49, in runcmd
raise CmdError(cmd, exitstatus >> 8, "stdout: %s\nstderr: %s" % (stdout, stderr))
oe.patch.CmdError: Command Error: 'sh -c 'git format-patch --no-signature --no-numbered INVALID -o /tmp/oepatchbj7pfmzj -- .'' exited with 0 Output:
stdout:
stderr: fatal: bad revision 'INVALID'

Fix this by adding a check and abort with a proper error message.

---
 scripts/lib/devtool/standard.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/lib/devtool/standard.py +5 -1
index cd79c7802cb..55fa38ccfb8 100644
@@ -1530,6 +1530,11 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
     recipedir = os.path.basename(recipefile)
     logger.info('Updating SRCREV in recipe %s%s' % (recipedir, dry_run_suffix))
 
+    # Get original SRCREV
+    old_srcrev = rd.getVar('SRCREV') or ''
+    if old_srcrev == "INVALID":
+            raise DevtoolError('Update mode srcrev is only valid for recipe fetched from an SCM repository')
+
     # Get HEAD revision
     try:
         stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree)
@@ -1556,7 +1561,6 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
         if not no_remove:
             # Find list of existing patches in recipe file
             patches_dir = tempfile.mkdtemp(dir=tempdir)
-            old_srcrev = rd.getVar('SRCREV') or ''
             upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev,
                                                   patches_dir)
             logger.debug('Patches: update %s, new %s, delete %s' % (dict(upd_p), dict(new_p), dict(del_p)))
Signature · 1 line
2.42.0
#3 lore raw

PATCH 3/6 devtool: tag all submodules

In reply to Julien Stephan

In the case of a repository with submodules, we need to add the "devtool-base" and "devtool-patched" tag on all submodules in order to properly detect the added/removed/modified patches

---
 meta/classes/devtool-source.bbclass | 3 +++
 scripts/lib/devtool/__init__.py     | 3 +++
 2 files changed, 6 insertions(+)
meta/classes/devtool-source.bbclass +3 -0
index a02b1e9b0ec..4158c20c7e8 100644
@@ -232,6 +232,9 @@ python devtool_post_patch() {
                 bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir)
         bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir)
     bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
+    if os.path.exists(os.path.join(srcsubdir, '.gitmodules')):
+        bb.process.run('git submodule foreach --recursive  "git tag -f devtool-patched"', cwd=srcsubdir)
+
 }
 
 python devtool_post_configure() {
scripts/lib/devtool/__init__.py +3 -0
index 702db669de3..e9e88a55336 100644
@@ -233,6 +233,9 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
     bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
     bb.process.run('git tag -f %s' % basetag, cwd=repodir)
 
+    if os.path.exists(os.path.join(repodir, '.gitmodules')):
+        bb.process.run('git submodule foreach --recursive  "git tag -f %s"' % basetag, cwd=repodir)
+
 def recipe_to_append(recipefile, config, wildcard=False):
     """
     Convert a recipe file to a bbappend file path within the workspace.
Signature · 1 line
2.42.0
#4 lore raw

PATCH 4/6 devtool: add support for git submodules

In reply to Julien Stephan

Adding the support of submodules required a lot of changes on the internal data structures:
* initial_rev/startcommit used as a starting point for looking at new / updated commits was replaced by a dictionary where the keys are the submodule name ("." for main repo) and the values are the initial_rev/startcommit

* the extractPatches function now extracts patch for the main repo and for all submodules and stores them in a hierarchical way describing the submodule path

* store initial_rev/commit also for all submodules inside the recipe bbappend file

* _export_patches now returns dictionaries that contains the 'patchdir' parameter (if any). This parameter is used to add the correct 'patchdir=' parameter on the recipe

Also, recipe can extract a secondary git tree inside the workdir.

By default, at the end of the do_patch function, there is a hook in devtool that commits everything that was modified to have a clean repository. It uses the command: "git add .; git commit ..."

The issue here is that, it adds the secondary git tree as a submodule but in a wrong way. Doing "git add <git dir>" declares a submodule but do not adds a url associated to it, and all following "git submodule foreach" commands will fail.

So detect that a git tree was extracted inside S and correctly add it using "git submodule add <url> <path>", so that it will be considered as a regular git submodule

---
 meta/lib/oe/patch.py             |  64 ++++----
 meta/lib/oe/recipeutils.py       |  27 ++--
 scripts/lib/devtool/__init__.py  |  21 +++
 scripts/lib/devtool/standard.py  | 269 +++++++++++++++++++------------
 scripts/lib/devtool/upgrade.py   |  51 +++---
 scripts/lib/recipetool/append.py |   4 +-
 6 files changed, 270 insertions(+), 166 deletions(-)
meta/lib/oe/patch.py +33 -31
index ff9afc9df9f..36157c72478 100644
@@ -461,41 +461,43 @@ class GitApplyTree(PatchTree):
         return (tmpfile, cmd)
 
     @staticmethod
-    def extractPatches(tree, startcommit, outdir, paths=None):
+    def extractPatches(tree, startcommits, outdir, paths=None):
         import tempfile
         import shutil
         tempdir = tempfile.mkdtemp(prefix='oepatch')
         try:
-            shellcmd = ["git", "format-patch", "--no-signature", "--no-numbered", startcommit, "-o", tempdir]
-            if paths:
-                shellcmd.append('--')
-                shellcmd.extend(paths)
-            out = runcmd(["sh", "-c", " ".join(shellcmd)], tree)
-            if out:
-                for srcfile in out.split():
-                    for encoding in ['utf-8', 'latin-1']:
-                        patchlines = []
-                        outfile = None
-                        try:
-                            with open(srcfile, 'r', encoding=encoding) as f:
-                                for line in f:
-                                    if line.startswith(GitApplyTree.patch_line_prefix):
-                                        outfile = line.split()[-1].strip()
-                                        continue
-                                    if line.startswith(GitApplyTree.ignore_commit_prefix):
-                                        continue
-                                    patchlines.append(line)
-                        except UnicodeDecodeError:
-                            continue
-                        break
-                    else:
-                        raise PatchError('Unable to find a character encoding to decode %s' % srcfile)
-
-                    if not outfile:
-                        outfile = os.path.basename(srcfile)
-                    with open(os.path.join(outdir, outfile), 'w') as of:
-                        for line in patchlines:
-                            of.write(line)
+            for name, rev in startcommits.items():
+                shellcmd = ["git", "format-patch", "--no-signature", "--no-numbered", rev, "-o", tempdir]
+                if paths:
+                    shellcmd.append('--')
+                    shellcmd.extend(paths)
+                out = runcmd(["sh", "-c", " ".join(shellcmd)], os.path.join(tree, name))
+                if out:
+                    for srcfile in out.split():
+                        for encoding in ['utf-8', 'latin-1']:
+                            patchlines = []
+                            outfile = None
+                            try:
+                                with open(srcfile, 'r', encoding=encoding) as f:
+                                    for line in f:
+                                        if line.startswith(GitApplyTree.patch_line_prefix):
+                                            outfile = line.split()[-1].strip()
+                                            continue
+                                        if line.startswith(GitApplyTree.ignore_commit_prefix):
+                                            continue
+                                        patchlines.append(line)
+                            except UnicodeDecodeError:
+                                continue
+                            break
+                        else:
+                            raise PatchError('Unable to find a character encoding to decode %s' % srcfile)
+
+                        if not outfile:
+                            outfile = os.path.basename(srcfile)
+                        bb.utils.mkdirhier(os.path.join(outdir, name))
+                        with open(os.path.join(outdir, name, outfile), 'w') as of:
+                            for line in patchlines:
+                                of.write(line)
         finally:
             shutil.rmtree(tempdir)
 
meta/lib/oe/recipeutils.py +17 -10
index 3336db8ab06..58776f4a9a7 100644
@@ -672,11 +672,11 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
         destlayerdir: base directory of the layer to place the bbappend in
             (subdirectory path from there will be determined automatically)
         srcfiles: dict of source files to add to SRC_URI, where the value
-            is the full path to the file to be added, and the value is the
-            original filename as it would appear in SRC_URI or None if it
-            isn't already present. You may pass None for this parameter if
-            you simply want to specify your own content via the extralines
-            parameter.
+            is the full path to the file to be added, and the value is a
+            dict with 'path' key containing the original filename as it
+            would appear in SRC_URI or None if it isn't already present.
+            You may pass None for this parameter if you simply want to specify
+            your own content via the extralines parameter.
         install: dict mapping entries in srcfiles to a tuple of two elements:
             install path (*without* ${D} prefix) and permission value (as a
             string, e.g. '0644').
@@ -763,10 +763,9 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
     copyfiles = {}
     if srcfiles:
         instfunclines = []
-        for i, (newfile, origsrcfile) in enumerate(srcfiles.items()):
-            srcfile = origsrcfile
+        for i, (newfile, param) in enumerate(srcfiles.items()):
             srcurientry = None
-            if not srcfile:
+            if not 'path' in param or not param['path']:
                 srcfile = os.path.basename(newfile)
                 srcurientry = 'file://%s' % srcfile
                 if params and params[i]:
@@ -778,7 +777,10 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
                         appendline('SRC_URI:append%s' % appendoverride, '=', ' ' + srcurientry)
                     else:
                         appendline('SRC_URI', '+=', srcurientry)
-            copyfiles[newfile] = srcfile
+                param['path'] = srcfile
+            else:
+                srcfile = param['path']
+            copyfiles[newfile] = param
             if install:
                 institem = install.pop(newfile, None)
                 if institem:
@@ -901,7 +903,12 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
             outdir = redirect_output
         else:
             outdir = appenddir
-        for newfile, srcfile in copyfiles.items():
+        for newfile, param in copyfiles.items():
+            srcfile = param['path']
+            patchdir = param.get('patchdir', ".")
+
+            if patchdir != ".":
+                newfile = os.path.join(os.path.split(newfile)[0], patchdir, os.path.split(newfile)[1])
             filedest = os.path.join(outdir, destsubdir, os.path.basename(srcfile))
             if os.path.abspath(newfile) != os.path.abspath(filedest):
                 if newfile.startswith(tempfile.gettempdir()):
scripts/lib/devtool/__init__.py +21 -0
index e9e88a55336..b4f998a5bc4 100644
@@ -233,6 +233,27 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None):
     bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
     bb.process.run('git tag -f %s' % basetag, cwd=repodir)
 
+    # if recipe unpacks another git repo inside S, we need to declare it as a regular git submodule now,
+    # so we will be able to tag branches on it and extract patches when doing finish/update on the recipe
+    stdout, _ = bb.process.run("git status --porcelain", cwd=repodir)
+    found = False
+    for line in stdout.splitlines():
+        if line.endswith("/"):
+            new_dir = line.split()[1]
+            for root, dirs, files in os.walk(os.path.join(repodir, new_dir)):
+                if ".git" in dirs + files:
+                    (stdout, _) = bb.process.run('git remote', cwd=root)
+                    remote = stdout.splitlines()[0]
+                    (stdout, _) = bb.process.run('git remote get-url %s' % remote, cwd=root)
+                    remote_url = stdout.splitlines()[0]
+                    logger.error(os.path.relpath(os.path.join(root, ".."), root))
+                    bb.process.run('git submodule add %s %s' % (remote_url, os.path.relpath(root, os.path.join(root, ".."))), cwd=os.path.join(root, ".."))
+                    found = True
+                if found:
+                    useroptions = []
+                    oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
+                    bb.process.run('git %s commit -m "Adding additionnal submodule from SRC_URI\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=os.path.join(root, ".."))
+                    found = False
     if os.path.exists(os.path.join(repodir, '.gitmodules')):
         bb.process.run('git submodule foreach --recursive  "git tag -f %s"' % basetag, cwd=repodir)
 
scripts/lib/devtool/standard.py +167 -102

433 lines not on this page · raw message

scripts/lib/devtool/upgrade.py +30 -21

91 lines not on this page · raw message

scripts/lib/recipetool/append.py +2 -2
index 9dbb1cc4b5a..4b6a7112c2b 100644
@@ -299,7 +299,7 @@ def appendfile(args):
                 if st.st_mode & stat.S_IXUSR:
                     perms = '0755'
             install = {args.newfile: (args.targetpath, perms)}
-        oe.recipeutils.bbappend_recipe(rd, args.destlayer, {args.newfile: sourcepath}, install, wildcardver=args.wildcard_version, machine=args.machine)
+        oe.recipeutils.bbappend_recipe(rd, args.destlayer, {args.newfile: {'path' : sourcepath}}, install, wildcardver=args.wildcard_version, machine=args.machine)
         tinfoil.modified_files()
         return 0
     else:
@@ -353,7 +353,7 @@ def appendsrc(args, files, rd, extralines=None):
                 logger.warning('{0!r} is already in SRC_URI, not adding'.format(source_uri))
         else:
             extralines.append('SRC_URI += {0}'.format(source_uri))
-        copyfiles[newfile] = srcfile
+        copyfiles[newfile] = {'path' : srcfile}
 
     oe.recipeutils.bbappend_recipe(rd, args.destlayer, copyfiles, None, wildcardver=args.wildcard_version, machine=args.machine, extralines=extralines)
     tinfoil.modified_files()
Signature · 1 line
2.42.0
#5 lore raw

PATCH 5/6 oeqa/selftest/devtool: add test for git submodules

In reply to Julien Stephan

Add a test for gitsm recipes.
This tests that we can do changes on submodules, commit them and properly extract the patches

---
 meta/lib/oeqa/selftest/cases/devtool.py | 47 +++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
meta/lib/oeqa/selftest/cases/devtool.py +47 -0
index ab58971fec7..2a11886e4b5 100644
@@ -1598,6 +1598,53 @@ class DevtoolUpdateTests(DevtoolBase):
         # Try building
         bitbake('%s -c patch' % testrecipe)
 
+    def test_devtool_git_submodules(self):
+        # This tests if we can add a patch in a git submodule and extract it properly using devtool finish
+        # Check preconditions
+        self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+        self.track_for_cleanup(self.workspacedir)
+        recipe = 'vulkan-samples'
+        src_uri = get_bb_var('SRC_URI', recipe)
+        self.assertIn('gitsm://', src_uri, 'This test expects the %s recipe to be a git recipe with submodules' % recipe)
+        oldrecipefile = get_bb_var('FILE', recipe)
+        recipedir = os.path.dirname(oldrecipefile)
+        result = runCmd('git status --porcelain .', cwd=recipedir)
+        if result.output.strip():
+            self.fail('Recipe directory for %s contains uncommitted changes' % recipe)
+        self.assertIn('/meta/', recipedir)
+        tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+        self.track_for_cleanup(tempdir)
+        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+        result = runCmd('devtool modify %s %s' % (recipe, tempdir))
+        self.assertExists(os.path.join(tempdir, 'CMakeLists.txt'), 'Extracted source could not be found')
+        # Test devtool status
+        result = runCmd('devtool status')
+        self.assertIn(recipe, result.output)
+        self.assertIn(tempdir, result.output)
+        # Modify a source file in a submodule, (grab the first one)
+        result = runCmd('git submodule --quiet foreach \'echo $sm_path\'', cwd=tempdir)
+        submodule = result.output.splitlines()[0]
+        submodule_path = os.path.join(tempdir, submodule)
+        runCmd('echo "#This is a first comment" >> testfile', cwd=submodule_path)
+        result = runCmd('git status --porcelain . ', cwd=submodule_path)
+        self.assertIn("testfile", result.output)
+        runCmd('git add testfile; git commit -m "Adding a new file"', cwd=submodule_path)
+
+        # Try finish to the original layer
+        self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+        runCmd('devtool finish -f %s meta' % recipe)
+        result = runCmd('devtool status')
+        self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+        self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish')
+        expected_status = [(' M', '.*/%s$' % os.path.basename(oldrecipefile)),
+                           ('??', '.*/.*-Adding-a-new-file.patch$')]
+        self._check_repo_status(recipedir, expected_status)
+        # Make sure the patch is added to the recipe with the correct "patchdir" option
+        result = runCmd('git diff .', cwd=recipedir)
+        addlines = [
+           'file://0001-Adding-a-new-file.patch;patchdir=%s \\\\' % submodule
+        ]
+        self._check_diff(result.output, addlines, [])
 
 class DevtoolExtractTests(DevtoolBase):
 
Signature · 1 line
2.42.0
#6 lore raw

PATCH 6/6 lib/oe/recipeutils.py: remove trailing white-spaces

In reply to Julien Stephan

Remove useless trailing white-spaces

---
 meta/lib/oe/recipeutils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/recipeutils.py +1 -1
index 58776f4a9a7..25b159bc1bc 100644
@@ -1042,7 +1042,7 @@ def get_recipe_upstream_version(rd):
             revision = ud.method.latest_revision(ud, rd, 'default')
             upversion = pv
             if revision != rd.getVar("SRCREV"):
-                upversion = upversion + "-new-commits-available" 
+                upversion = upversion + "-new-commits-available"
         else:
             pupver = ud.method.latest_versionstring(ud, rd)
             (upversion, revision) = pupver
Signature · 1 line
2.42.0
#7 lore raw
In reply to Julien Stephan

Thanks for working on this. I'm a little worried about the central patch as it's large and changes things all over the place, but if oe-selftest passes, there's no reason to not merge it. If AUH breaks, we'll deal with it :)

Alex

Quoted 49 lines · Julien Stephan

This series adds the support of git submodules, so we can use devtool modify with gitsm recipes to create modify and export patches using devtool finish.

This series also adds support of git submodules defined inside SRC_URI (i.e extracting a secondary git tree inside S)

My dev branch is available here : [1].

It passed full recipetool/devtool oeselftest locally

Cheers
Julien

[1]: https://git.yoctoproject.org/poky-contrib/log/?h=jstephan/devtool-submodule-fix

Julien Stephan (6):
devtool: fix update-recipe dry-run mode
devtool: finish/update-recipe: restrict mode srcrev to recipes fetched
from SCM
devtool: tag all submodules
devtool: add support for git submodules oeqa/selftest/devtool: add test for git submodules lib/oe/recipeutils.py: remove trailing white-spaces

 meta/classes/devtool-source.bbclass     |   3 +
 meta/lib/oe/patch.py                    |  64 +++---
 meta/lib/oe/recipeutils.py              |  29 ++-
 meta/lib/oeqa/selftest/cases/devtool.py |  47 ++++
 scripts/lib/devtool/__init__.py         |  24 ++
 scripts/lib/devtool/standard.py         | 284 +++++++++++++++---------
 scripts/lib/devtool/upgrade.py          |  51 +++--
 scripts/lib/recipetool/append.py        |   4 +-
 8 files changed, 333 insertions(+), 173 deletions(-)

--
2.42.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191061): https://lists.openembedded.org/g/openembedded-core/message/191061
Mute This Topic: https://lists.openembedded.org/mt/102746727/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw
Quoted 6 lines · Alexander Kanavin

Thanks for working on this. I'm a little worried about the central patch as it's large and changes things all over the place, but if oe-selftest passes, there's no reason to not merge it. If AUH breaks, we'll deal with it :)

Hi Alex,

yes I do agree.. but I was not able to split it, because I didn't want to introduce "non working" commits in the middle of the series :/

Let me know if some rework is needed!

Cheers
Julien

Quoted 52 lines

Alex

Quoted 49 lines · Julien Stephan

This series adds the support of git submodules, so we can use devtool modify with gitsm recipes to create modify and export patches using devtool finish.

This series also adds support of git submodules defined inside SRC_URI (i.e extracting a secondary git tree inside S)

My dev branch is available here : [1].

It passed full recipetool/devtool oeselftest locally

Cheers
Julien

[1]: https://git.yoctoproject.org/poky-contrib/log/?h=jstephan/devtool-submodule-fix

Julien Stephan (6):
devtool: fix update-recipe dry-run mode
devtool: finish/update-recipe: restrict mode srcrev to recipes fetched
from SCM
devtool: tag all submodules
devtool: add support for git submodules oeqa/selftest/devtool: add test for git submodules lib/oe/recipeutils.py: remove trailing white-spaces

 meta/classes/devtool-source.bbclass     |   3 +
 meta/lib/oe/patch.py                    |  64 +++---
 meta/lib/oe/recipeutils.py              |  29 ++-
 meta/lib/oeqa/selftest/cases/devtool.py |  47 ++++
 scripts/lib/devtool/__init__.py         |  24 ++
 scripts/lib/devtool/standard.py         | 284 +++++++++++++++---------
 scripts/lib/devtool/upgrade.py          |  51 +++--
 scripts/lib/recipetool/append.py        |   4 +-
 8 files changed, 333 insertions(+), 173 deletions(-)

--
2.42.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191061): https://lists.openembedded.org/g/openembedded-core/message/191061
Mute This Topic: https://lists.openembedded.org/mt/102746727/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-