From 13e9b5ad66a9e489223e840457460743818afe01 Mon Sep 17 00:00:00 2001 From: fanglinxu Date: Wed, 12 Jun 2024 14:17:46 +0800 Subject: [PATCH] patch: avoid inconsistent behavior of try patch * drop --dry-run to try patch, it cause inconsistent behavior of doing patch * this workaround fix: https://gitee.com/openeuler/yocto-poky/issues/IA4OH4 Signed-off-by: fanglinxu --- meta/lib/oe/patch.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 9034fcae034..1116ec91fd1 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -238,7 +238,11 @@ class PatchTree(PatchSet): shellcmd.append('--dry-run') try: - output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) + if not force: + # behavior of 'with --dry-run' diff from without it, as a workaround, drop runing --dry-run first. + output = runcmd(["echo", "oee drop: ", " ".join(shellcmd)], self.dir) + else: + output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) if force: return -- Gitee