From danny@ricin.com  Tue Jan 25 00:50:33 2005
Return-Path: <danny@ricin.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 59A5516A4D1; Tue, 25 Jan 2005 00:50:33 +0000 (GMT)
Received: from smtpq1.home.nl (smtpq1.home.nl [213.51.128.196])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 0263543D2D; Tue, 25 Jan 2005 00:50:32 +0000 (GMT)
	(envelope-from danny@ricin.com)
Received: from [213.51.128.136] (port=41476 helo=smtp5.home.nl)
	by smtpq1.home.nl with esmtp (Exim 4.30)
	id 1CtEuc-0006N2-St; Tue, 25 Jan 2005 01:50:30 +0100
Received: from cp464173-a.dbsch1.nb.home.nl ([84.27.215.228]:64624)
	by smtp5.home.nl with smtp (Exim 4.30)
	id 1CtEub-0001Yc-LY; Tue, 25 Jan 2005 01:50:29 +0100
Received: by cp464173-a.dbsch1.nb.home.nl (sSMTP sendmail emulation); Tue, 25 Jan 2005 01:50:19 +0100
Message-Id: <20050125005032.0263543D2D@mx1.FreeBSD.org>
Date: Tue, 25 Jan 2005 01:50:19 +0100
From: Danny Pansters <danny@ricin.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sergei@FreeBSD.org, danny@ricin.com
Subject: [PATCH] devel/porttools: "port submit" has problems with py-*
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         76638
>Category:       ports
>Synopsis:       [PATCH] devel/porttools: "port submit" has problems with py-*
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sergei
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 25 01:00:43 GMT 2005
>Closed-Date:    Fri Jul 15 18:41:06 GMT 2005
>Last-Modified:  Fri Jul 15 18:41:06 GMT 2005
>Originator:     Danny Pansters
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD workstation.homenet 5.3-STABLE FreeBSD 5.3-STABLE #2: Fri Jan 21 19:51:02 CET 2005
>Description:
Many ports with python bindings and the like use a version-numbered PKGNAMEPREFIX,
e.g. py24-foo, while the ports origin is and remains py-foo. So if I go into
/usr/ports/<cat>/py-foo.new where my updated port is I run "port submit" and
it can't find the original /usr/ports/<cat>/py24-foo, which should be just
/usr/ports/<cat>/py-foo. The attached patch is really just partial because it
makes sending a PR work but doesn't change what's printed in the the synopsis
line and at the start of the quoted diff (both cosmetics though). It would be
nice if the numbered naming prefix as used with python ports would be taken
into account in porttools.

Added file(s):
- files/patch-util_diff.in

Port maintainer (sergei@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
Just one way to do it...

--- porttools-0.63_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/porttools/files/patch-util_diff.in /usr/ports/devel/porttools.new/files/patch-util_diff.in
--- /usr/ports/devel/porttools/files/patch-util_diff.in	Thu Jan  1 01:00:00 1970
+++ /usr/ports/devel/porttools.new/files/patch-util_diff.in	Tue Jan 25 00:36:25 2005
@@ -0,0 +1,14 @@
+--- util_diff.in.orig	Tue Jan 25 00:21:19 2005
++++ util_diff.in	Tue Jan 25 00:23:07 2005
+@@ -71,6 +71,11 @@
+ 			# it should be Ports tree location
+ 			CATEGORY="`make -V CATEGORIES | sed -E 's/^([^ ]+).*$/\1/'`"
+ 			PKGNAMEPREFIX="`make -V PKGNAMEPREFIX`"
++			# Python ports, e.g. py24-foo pkg vs py-foo origin
++			if [ "`echo ${PKGNAMEPREFIX} | sed -E 's/[0-9]//g'`" = "py-" ]
++			then
++				PKGNAMEPREFIX="py-"
++			fi
+ 			PKGNAMESUFFIX="`make -V PKGNAMESUFFIX`"
+ 			PORTNAME="`make -V PORTNAME`"
+ 			ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}"
--- porttools-0.63_1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sergei 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Jan 25 18:08:35 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76638 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Jul 15 18:40:52 GMT 2005 
State-Changed-Why:  
This is already solved by patch in ports/70156, which I'll commit shortly. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76638 
>Unformatted:
 ports
