Re: [PATCH v2] Makefile: Fix unnecessary re-patching with coreutils-9.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for the update, Kazu.

On Mon, Aug 22, 2022 at 10:59 AM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@xxxxxxx> wrote:
"sum" command in coreutils-9.0 (e.g. Fedora 36) started to output a file
name. As a result, "make" always detects a change of gdb-10.2.patch
wrongly and re-applies it unnecessarily.

Use standard input to fix it and "md5sum" to improve detection.

Signed-off-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>
---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 162c2ba..79aef17 100644
--- a/Makefile
+++ b/Makefile
@@ -272,7 +272,7 @@ rebuild:
        @if [ ! -f ${GDB}/${GDB}.patch ]; then \
          touch ${GDB}/${GDB}.patch; fi
        @if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ] && \
-         [ "`sum ${GDB}.patch`" != "`sum ${GDB}/${GDB}.patch`" ]; then \
+         [ "`md5sum < ${GDB}.patch`" != "`md5sum < ${GDB}/${GDB}.patch`" ]; then \

Ack for the V2. 
 
          (sh -x ${GDB}.patch ${TARGET}; patch -N -p0 -r- --fuzz=0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; cd ${GDB}; \
          $(MAKE) CRASH_TARGET=${TARGET}) \
        else (cd ${GDB}/gdb; $(MAKE) CRASH_TARGET=${TARGET}); fi
--
2.37.1
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux