From lchen@zen.lhaven.homeip.net  Wed Feb 19 22:52:11 2014
Return-Path: <lchen@zen.lhaven.homeip.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 4CE4498E
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 2014 22:52:06 +0000 (UTC)
Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 198FA1D15
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 2014 22:52:05 +0000 (UTC)
Received: from ip70-179-144-228.fv.ks.cox.net ([70.179.144.228] helo=zen.lhaven.homeip.net)
	by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.72)
	(envelope-from <lchen@zen.lhaven.homeip.net>)
	id 1WGFzo-000MAf-9O
	for FreeBSD-gnats-submit@freebsd.org; Wed, 19 Feb 2014 22:52:04 +0000
Received: from zen.lhaven.homeip.net (localhost [127.0.0.1])
	by zen.lhaven.homeip.net (8.14.8/8.14.7) with ESMTP id s1JMq2vq046390;
	Wed, 19 Feb 2014 16:52:02 -0600 (CST)
	(envelope-from lchen@zen.lhaven.homeip.net)
Received: (from lchen@localhost)
	by zen.lhaven.homeip.net (8.14.8/8.14.7/Submit) id s1JMpvnB046389;
	Wed, 19 Feb 2014 16:51:57 -0600 (CST)
	(envelope-from lchen)
Message-Id: <201402192251.s1JMpvnB046389@zen.lhaven.homeip.net>
Date: Wed, 19 Feb 2014 16:51:57 -0600 (CST)
From: Lawrence Chen <lchen@zen.lhaven.homeip.net>
Reply-To: Lawrence Chen <beastie@tardisi.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: beastie_t@zen.lhaven.homeip.net
Subject: ports-mgmt/pkg_rmleaves: always says to resize terminal to at least 80x24
X-Send-Pr-Version: 3.114
X-GNATS-Notify: alexander@wittig.name

>Number:         186904
>Category:       ports
>Synopsis:       ports-mgmt/pkg_rmleaves: always says to resize terminal to at least 80x24
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 19 23:00:00 UTC 2014
>Closed-Date:    Sun Feb 23 01:53:32 UTC 2014
>Last-Modified:  Sun Feb 23 02:00:01 UTC 2014
>Originator:     Lawrence Chen
>Release:        FreeBSD 9.2-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD zen.lhaven.homeip.net 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0: Sat Jan 11 03:25:02 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	No matter what terminal I use, or what size, it always fails with:

	Dialog Error, try to resize your terminal to at least 80x24.

	
>How-To-Repeat:
	
>Fix:

	

	Turns out this is a fixed message for any Exit status of 255 (-1) from
	dialog, which is the Exit status for any errors occuring inside dialog
	or dialog is exited by pressing the ESC key.

	After a deeper investigation, the problem is due to ports that use
	quotation marks in the package comment.

	Ugly kluge below is what I did to make it work for me.  I have
	converted all my FreeBSD systems to pkgng, so don't know if the
	non-pkgng way is right.

--- pkg_rmleaves.patch begins here ---
--- pkg_rmleaves.orig	2014-02-19 13:58:20.969015298 -0600
+++ pkg_rmleaves	2014-02-19 13:57:29.478015196 -0600
@@ -61,17 +61,17 @@
 # update leaf files
 checkLeafs() {
 	if [ -n "$USE_PKGNG" ]; then
-		pkg query -e '%#r = 0' '"%n-%v" "%sh" "off" "%c"'
+		pkg query -e '%#r = 0' '#%n-%v# #%sh# #off# #%c#'
 	else
 		for i in "$PKGDIR/"*; do
 			if [ ! -s "$i/+REQUIRED_BY" ]; then 
 				pkg=$(basename "$i")
 				desc=''
 				[ -f "$i/+COMMENT" ] && desc=$(cat "$i/+COMMENT")
-				echo "\"$pkg\" \"\" \"off\" \"$desc\""
+				echo "#$pkg# ## #off# #$desc#"
 			fi
 		done
-	fi | sort > "$PKGFILE"
+	fi | sort | sed -e 's/"/_/g' | sed -e 's/#/"/g' > "$PKGFILE"
 
 	if [ -f "$PREV" ]; then
 		diff --unchanged-line-format='' --old-line-format='' --new-line-format='%L' "$PREV" "$PKGFILE" > "$TMPFILE"
--- pkg_rmleaves.patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Feb 19 23:00:16 UTC 2014 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: alexander@wittig.name
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/186904: ports-mgmt/pkg_rmleaves: always says to resize terminal to at least 80x24
Date: Wed, 19 Feb 2014 23:00:15 UT

 Maintainer of ports-mgmt/pkg_rmleaves,
 
 Please note that PR ports/186904 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/186904
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Alexander Wittig <alexander@wittig.name>
To: bug-followup@FreeBSD.org,
 beastie@tardisi.com,
 Lawrence Chen <lchen@zen.lhaven.homeip.net>
Cc:  
Subject: Re: ports/186904: ports-mgmt/pkg_rmleaves: always says to resize terminal to at least 80x24
Date: Sat, 22 Feb 2014 15:10:28 +0100

 Thanks for bringing the problem to my attention. I was aware of the =
 described deficiency in the quote handling, however, on my test system =
 with FreeBSD 10 everything worked also with e.g. php55-extensions (A =
 =93meta-port=94 to install PHP extensions), despite the quotes in the =
 description.
 I included a modified version of the proposed patch, please try the new =
 version of the script at =
 http://alex.wittig.name/pkg_rmleaves/pkg_rmleaves-20140222.tar.gz
 If it works for you, I=92ll submit an update to the port.=

From: The BSD Dreamer <beastie@tardisi.com>
To: Alexander Wittig <alexander@wittig.name>
Cc: bug-followup@freebsd.org, Lawrence Chen <lchen@zen.lhaven.homeip.net>
Subject: Re: ports/186904: =?UTF-8?Q?ports-mgmt/pkg=5Frmleaves=3A=20always?=
 =?UTF-8?Q?=20says=20to=20resize=20terminal=20to=20at=20least=20=38=30x=32?=
 =?UTF-8?Q?=34?=
Date: Sat, 22 Feb 2014 14:58:34 -0600

 On 2014-02-22 08:10, Alexander Wittig wrote:
 > Thanks for bringing the problem to my attention. I was aware of the
 > described deficiency in the quote handling, however, on my test system with
 > FreeBSD 10 everything worked also with e.g. php55-extensions (A “meta-port”
 > to install PHP extensions), despite the quotes in the description.
 > I included a modified version of the proposed patch, please try the new
 > version of the script at
 > http://alex.wittig.name/pkg_rmleaves/pkg_rmleaves-20140222.tar.gz
 > If it works for you, I’ll submit an update to the port.
 
 Yes, this works for me.
 
 -- 
    Name: Lawrence "The Dreamer" Chen    Call: W0LKC
   Snail: 1530 College Ave, A5          Email: beastie@tardisi.com
          Manhattan, KS 66502-2768       Blog: http://lawrencechen.net
Responsible-Changed-From-To: freebsd-ports-bugs->jhale 
Responsible-Changed-By: jhale 
Responsible-Changed-When: Sun Feb 23 01:39:28 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186904 
State-Changed-From-To: feedback->closed 
State-Changed-By: jhale 
State-Changed-When: Sun Feb 23 01:53:32 UTC 2014 
State-Changed-Why:  
Maintainer submitted ports/186964 to fix the issue.  Committed in 
r345688. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/186904: commit references a PR
Date: Sun, 23 Feb 2014 01:51:31 +0000 (UTC)

 Author: jhale
 Date: Sun Feb 23 01:51:24 2014
 New Revision: 345688
 URL: http://svnweb.freebsd.org/changeset/ports/345688
 QAT: https://qat.redports.org/buildarchive/r345688/
 
 Log:
   - Update to 20140222 [1]
   - This addresses a reported dialog error [2]
   
   PR:		ports/186964 [1], ports/186904 [2]
   Submitted by:	Alexander Wittig <alexander@wittig.name> (maintainer) [1],
   		Lawrence Chen <lchen@zen.lhaven.homeip.net> [2]
 
 Modified:
   head/ports-mgmt/pkg_rmleaves/Makefile
   head/ports-mgmt/pkg_rmleaves/distinfo
 
 Modified: head/ports-mgmt/pkg_rmleaves/Makefile
 ==============================================================================
 --- head/ports-mgmt/pkg_rmleaves/Makefile	Sun Feb 23 01:48:15 2014	(r345687)
 +++ head/ports-mgmt/pkg_rmleaves/Makefile	Sun Feb 23 01:51:24 2014	(r345688)
 @@ -2,7 +2,7 @@
  # $FreeBSD$
  
  PORTNAME=	pkg_rmleaves
 -PORTVERSION=	20140110
 +PORTVERSION=	20140222
  CATEGORIES=	ports-mgmt
  MASTER_SITES=	http://alex.wittig.name/${PORTNAME}/
  
 
 Modified: head/ports-mgmt/pkg_rmleaves/distinfo
 ==============================================================================
 --- head/ports-mgmt/pkg_rmleaves/distinfo	Sun Feb 23 01:48:15 2014	(r345687)
 +++ head/ports-mgmt/pkg_rmleaves/distinfo	Sun Feb 23 01:51:24 2014	(r345688)
 @@ -1,2 +1,2 @@
 -SHA256 (pkg_rmleaves-20140110.tar.gz) = e0ac071a2d774843a597268830000a81c423eb5ade1cb0a5c66fad20e4559382
 -SIZE (pkg_rmleaves-20140110.tar.gz) = 3167
 +SHA256 (pkg_rmleaves-20140222.tar.gz) = 2b2f7e19c96d885dab2c36bf2fdbdd30c9529a40ac3a77bda1d5fb1f7690c4a3
 +SIZE (pkg_rmleaves-20140222.tar.gz) = 3179
 _______________________________________________
 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:
