From: Peter Kjellerstedt Date: Mon, 19 Feb 2024 01:28:29 +0000 (+0100) Subject: lib/oe/patch: Add GitApplyTree.commitIgnored() X-Git-Tag: uninative-4.4~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94f0838b9223b7ece7affaa707e54a5d784da25e;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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 Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 70cdb1d9c01..3ded5f36016 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -460,6 +460,16 @@ class GitApplyTree(PatchTree): cmd.append('--date="%s"' % date) 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