ports/188764: [PATCH] bsd.port.mk makepatch don't create empty patches

Pawel Pekala pawel at FreeBSD.org
Fri Apr 18 15:50:00 UTC 2014


>Number:         188764
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk makepatch don't create empty patches
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 18 15:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Pawel Pekala
>Release:        10.0
>Organization:
>Environment:
FreeBSD caprica.slowicza.org 10.0-STABLE FreeBSD 10.0-STABLE #2 r262297: Fri Feb 21 17:42:25 CET 2014     root at caprica.slowicza.org:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
make makepatch creates empty patch files if file and file.orig are identical

When porting sometimes one creates .orig file, does not modify file and forgets about it. When doing make makepatch later empty file is created in files/.
Attached patch check if files are identical and aborts patch creation if so.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: bsd.port.mk
===================================================================
--- bsd.port.mk	(wersja 350505)
+++ bsd.port.mk	(kopia robocza)
@@ -1187,6 +1187,7 @@
 		for i in `find . -type f -name '*.orig'`; do \
 			ORG=$$i; \
 			NEW=$${i%.orig}; \
+			cmp -s $${ORG} $${NEW} && continue; \
 			OUT=${FILESDIR}`${ECHO} $${NEW} | \
 				${SED} -e 's|/|__|g' \
 					-e 's|^\.__|/patch-|'`; \


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list