summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2024-02-19 02:28:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-19 16:02:20 +0000
commit94f0838b9223b7ece7affaa707e54a5d784da25e (patch)
tree93b0c0a67b75695ee87aae5d84cd0ec12c7f9ec5 /meta/lib
parentc3d43de7e54189bf09fbe8e87ddb976e42ebf531 (diff)
downloadopenembedded-core-94f0838b9223b7ece7affaa707e54a5d784da25e.tar.gz
lib/oe/patch: Add GitApplyTree.commitIgnored()
This function can be used to create a commit that devtool will ignore when creating/updating the patches. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/patch.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 70cdb1d9c0..3ded5f3601 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -461,6 +461,16 @@ class GitApplyTree(PatchTree):
return (tmpfile, cmd)
@staticmethod
+ def commitIgnored(subject, dir=None, files=None, d=None):
+ if files:
+ runcmd(['git', 'add'] + files, dir)
+ message = "%s\n\n%s" % (subject, GitApplyTree.ignore_commit_prefix)
+ cmd = ["git"]
+ GitApplyTree.gitCommandUserOptions(cmd, d=d)
+ cmd += ["commit", "-m", message, "--no-verify"]
+ runcmd(cmd, dir)
+
+ @staticmethod
def extractPatches(tree, startcommits, outdir, paths=None):
import tempfile
import shutil