From nobody@FreeBSD.org  Fri Apr 18 15:46:18 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id A4382ACC
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Apr 2014 15:46:18 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 90BD91DB0
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Apr 2014 15:46:18 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3IFkISl027335
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Apr 2014 15:46:18 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3IFkIRG027334;
	Fri, 18 Apr 2014 15:46:18 GMT
	(envelope-from nobody)
Message-Id: <201404181546.s3IFkIRG027334@cgiserv.freebsd.org>
Date: Fri, 18 Apr 2014 15:46:18 GMT
From: Pawel Pekala <pawel@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] bsd.port.mk makepatch don't create empty patches
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         188764
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk makepatch don't create empty patches
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 18 15:50:00 UTC 2014
>Closed-Date:    Fri Apr 18 17:31:40 UTC 2014
>Last-Modified:  Fri Apr 18 17:40:00 UTC 2014
>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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Apr 18 15:50:03 UTC 2014 
Responsible-Changed-Why:  
bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188764 
Responsible-Changed-From-To: portmgr->pawel 
Responsible-Changed-By: bdrewery 
Responsible-Changed-When: Fri Apr 18 10:56:58 CDT 2014 
Responsible-Changed-Why:  
Approved by: portmgr (bdrewery) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188764 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Fri Apr 18 17:31:40 UTC 2014 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188764 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/188764: commit references a PR
Date: Fri, 18 Apr 2014 17:31:16 +0000 (UTC)

 Author: pawel
 Date: Fri Apr 18 17:31:12 2014
 New Revision: 351554
 URL: http://svnweb.freebsd.org/changeset/ports/351554
 QAT: https://qat.redports.org/buildarchive/r351554/
 
 Log:
   makepatch: don't create empty patches
   
   PR:		ports/188764
   Submitted by:	myself
   Approved by:	portmgr (bdrewery)
 
 Modified:
   head/Mk/bsd.port.mk
 
 Modified: head/Mk/bsd.port.mk
 ==============================================================================
 --- head/Mk/bsd.port.mk	Fri Apr 18 17:28:40 2014	(r351553)
 +++ head/Mk/bsd.port.mk	Fri Apr 18 17:31:12 2014	(r351554)
 @@ -1194,6 +1194,7 @@ makepatch:
  		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-|'`; \
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
