From nobody@FreeBSD.org  Sun Oct 23 23:20:26 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E1D61065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Oct 2011 23:20:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E5828FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Oct 2011 23:20:26 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NNKPCl017795
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Oct 2011 23:20:25 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p9NNKO56017794;
	Sun, 23 Oct 2011 23:20:24 GMT
	(envelope-from nobody)
Message-Id: <201110232320.p9NNKO56017794@red.freebsd.org>
Date: Sun, 23 Oct 2011 23:20:24 GMT
From: Grzegorz Blach <magik@roorback.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ports-mgmt/bpkg: Fixed syntax error on 9.x in shell script
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: akosela@andykosela.com

>Number:         161948
>Category:       ports
>Synopsis:       ports-mgmt/bpkg: Fixed syntax error on 9.x in shell script
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 23 23:30:02 UTC 2011
>Closed-Date:    Sat Oct 29 22:11:46 UTC 2011
>Last-Modified:  Sat Oct 29 22:11:46 UTC 2011
>Originator:     Grzegorz Blach
>Release:        9.0-RC1
>Organization:
>Environment:
FreeBSD silver.nine 9.0-RC1 FreeBSD 9.0-RC1 #1: Sat Oct 22 17:56:19 CEST 2011     root@silver.nine:/usr/obj/usr/src/sys/SILVER  amd64

>Description:
On 9.x bpkg display error message on startup
: bpkg: 407: Syntax error: Bad function name

Reason is '-' at the end of pkg_which-() function name.

>How-To-Repeat:
Try run bpkg on 9.x

>Fix:
Remove '-' from pkg_which-() function name on lines: 407 and 814


Patch attached with submission follows:

diff -ruN ports-mgmt/bpkg/Makefile ports-mgmt/bpkg/Makefile
--- ports-mgmt/bpkg/Makefile	2010-09-29 18:02:01.000000000 +0200
+++ ports-mgmt/bpkg/Makefile	2011-10-24 00:59:32.171594133 +0200
@@ -9,6 +9,7 @@
 
 PORTNAME=	bpkg
 PORTVERSION=	2.1.3
+PORTREVISION=	1
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none
diff -ruN ports-mgmt/bpkg/files/bpkg.sh.in ports-mgmt/bpkg/files/bpkg.sh.in
--- ports-mgmt/bpkg/files/bpkg.sh.in	2010-09-29 18:02:01.000000000 +0200
+++ ports-mgmt/bpkg/files/bpkg.sh.in	2011-10-24 00:59:32.171594133 +0200
@@ -404,7 +404,7 @@
 	exit 0
 }
 
-pkg_which-()
+pkg_which()
 {
 	grep "$pkg"$ /var/db/pkg/*/+CONTENTS |
 	    awk -F 'pkg/' '{ print $2 }' |
@@ -811,7 +811,7 @@
 		s) pkg=$OPTARG
 		   pkg_info-xs ;;
 		w) pkg=$OPTARG
-		   pkg_which- ;;
+		   pkg_which ;;
 		z) pkg=$OPTARG
 		   make_ldd ;;
 		B) pkg_backup_all ;;


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: maintainer-update->change-request 
Class-Changed-By: edwin 
Class-Changed-When: Sun Oct 23 23:30:14 UTC 2011 
Class-Changed-Why:  
Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161948 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Oct 23 23:30:23 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: akosela@andykosela.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/161948: ports-mgmt/bpkg: Fixed syntax error on 9.x in shell script
Date: Sun, 23 Oct 2011 23:30:19 UT

 Maintainer of ports-mgmt/bpkg,
 
 Please note that PR ports/161948 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/161948
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Andy Kosela <akosela@andykosela.com>
To: bug-followup@freebsd.org
Cc: magik@roorback.net
Subject: Re: ports/161948: ports-mgmt/bpkg: Fixed syntax error on 9.x in shell script
Date: Tue, 25 Oct 2011 14:24:51 +0200

 On Mon, Oct 24, 2011 at 1:30 AM, Edwin Groothuis <edwin@freebsd.org> wrote:
 > Maintainer of ports-mgmt/bpkg,
 >
 > Please note that PR ports/161948 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 > =A0 =A0http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/161948
 
 This patch can potentially conflict with pkg_which(1) from
 portupgrade(1).  Instead of '-' I propose adding a digit, so that the
 function name will be pkg_which2().
 
 Please commit it with this updated fix.
 
 Thanks,
 
 --Andy
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Tue Oct 25 13:12:19 UTC 2011 
State-Changed-Why:  
Maintainer has replied with suggestion for updated patch. 

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

From: Andy Kosela <akosela@andykosela.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/161948: ports-mgmt/bpkg: Fixed syntax error on 9.x in shell script
Date: Sun, 30 Oct 2011 00:00:08 +0200

 On Tue, Oct 25, 2011 at 3:12 PM,  <linimon@freebsd.org> wrote:
 > Synopsis: ports-mgmt/bpkg: Fixed syntax error on 9.x in shell script
 >
 > State-Changed-From-To: feedback->open
 > State-Changed-By: linimon
 > State-Changed-When: Tue Oct 25 13:12:19 UTC 2011
 > State-Changed-Why:
 > Maintainer has replied with suggestion for updated patch.
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=161948
 
 Please close this PR due to ports/162158.
 
 --Andy
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Oct 29 22:11:30 UTC 2011 
State-Changed-Why:  
See ports/162158. 

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