Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 2014 16:51:57 -0600 (CST)
From:      Lawrence Chen <lchen@lhaven.homeip.net>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        beastie_t@lhaven.homeip.net
Subject:   ports/186904: ports-mgmt/pkg_rmleaves: always says to resize terminal to at least 80x24
Message-ID:  <201402192251.s1JMpvnB046389@zen.lhaven.homeip.net>
Resent-Message-ID: <201402192300.s1JN01CJ037845@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 19 23:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402192251.s1JMpvnB046389>