diff options
| author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2024-02-19 02:28:30 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-19 16:03:22 +0000 |
| commit | 85b5e87c7de6d77cf93e424e9d5c4e5311d6992f (patch) | |
| tree | 1a44974cea0304fe8370e76b67246462bf0625b6 /scripts/lib | |
| parent | ff63bc403dd8e7201e8408dd8cedbf26280e9640 (diff) | |
| download | poky-85b5e87c7de6d77cf93e424e9d5c4e5311d6992f.tar.gz | |
devtool: Make use of oe.patch.GitApplyTree.commitIgnored()
This makes use of the oe.patch.GitApplyTree.commitIgnored() function to
create commits that shall be ignored by `devtool finish`.
(From OE-Core rev: 4e1b9289450b5e7946bd5999c95a3ee214aab8a5)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/devtool/__init__.py | 4 | ||||
| -rw-r--r-- | scripts/lib/devtool/standard.py | 6 |
2 files changed, 2 insertions, 8 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index c7fc3cfc41..6133c1c5b4 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py | |||
| @@ -253,9 +253,7 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None): | |||
| 253 | bb.process.run('git submodule add %s %s' % (remote_url, os.path.relpath(root, os.path.join(root, ".."))), cwd=os.path.join(root, "..")) | 253 | bb.process.run('git submodule add %s %s' % (remote_url, os.path.relpath(root, os.path.join(root, ".."))), cwd=os.path.join(root, "..")) |
| 254 | found = True | 254 | found = True |
| 255 | if found: | 255 | if found: |
| 256 | useroptions = [] | 256 | oe.patch.GitApplyTree.commitIgnored("Add additional submodule from SRC_URI", dir=os.path.join(root, ".."), d=d) |
| 257 | oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d) | ||
| 258 | 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, "..")) | ||
| 259 | found = False | 257 | found = False |
| 260 | if os.path.exists(os.path.join(repodir, '.gitmodules')): | 258 | if os.path.exists(os.path.join(repodir, '.gitmodules')): |
| 261 | bb.process.run('git submodule foreach --recursive "git tag -f %s"' % basetag, cwd=repodir) | 259 | bb.process.run('git submodule foreach --recursive "git tag -f %s"' % basetag, cwd=repodir) |
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index ccb7ea851b..6d7fd17fbd 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -484,11 +484,7 @@ def symlink_oelocal_files_srctree(rd, srctree): | |||
| 484 | os.symlink('oe-local-files/%s' % fn, destpth) | 484 | os.symlink('oe-local-files/%s' % fn, destpth) |
| 485 | addfiles.append(os.path.join(relpth, fn)) | 485 | addfiles.append(os.path.join(relpth, fn)) |
| 486 | if addfiles: | 486 | if addfiles: |
| 487 | bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree) | 487 | oe.patch.GitApplyTree.commitIgnored("Add local file symlinks", dir=srctree, files=addfiles, d=rd) |
| 488 | useroptions = [] | ||
| 489 | oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd) | ||
| 490 | bb.process.run('git %s commit -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree) | ||
| 491 | |||
| 492 | 488 | ||
| 493 | def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False): | 489 | def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False): |
| 494 | """Extract sources of a recipe""" | 490 | """Extract sources of a recipe""" |
