Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2008 08:44:40 GMT
From:      Stan Behrens <lists.freebsd.org@sbeh.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/128028: Ports-Script do not recognize dialog-return-value
Message-ID:  <200810120844.m9C8iec9018003@www.freebsd.org>
Resent-Message-ID: <200810120850.m9C8o2lS063335@freefall.freebsd.org>

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

>Number:         128028
>Category:       ports
>Synopsis:       Ports-Script do not recognize dialog-return-value
>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:   Sun Oct 12 08:50:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Stan Behrens
>Release:        7.1 Beta
>Organization:
>Environment:
FreeBSD  7.1-BETA FreeBSD 7.1-BETA #0: Sun Sep  7 13:49:18 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Hi,

a recently portsnap'ed ports-tree does not recognize a -1 return (failure) of dialog, so if your terminal is to small, dialog will die and return 255 (-1) which should then let return make config something other than zero.

Bye.
>How-To-Repeat:
run your favorite terminal-emulator, smaller it and type:
cd /usr/ports/ports-mgmt/portupgrade && make config-recursive; echo $?

and it will give you:
===> Setting user-specified options for portupgrade-2.4.6,2 and dependencies
cd /usr/ports/ports-mgmt/portupgrade && make config;
===> Options unchanged
cd /usr/ports/lang/ruby18 && make config;
===> Options unchanged
0

>Fix:
THIS IS A BAD PATCH: Because the return-value this ignored too! (Block starts with -@if), unfortunately my make-skill are limited.

Patch attached with submission follows:

--- /usr/ports/Mk/bsd.port.mk.orig	2008-10-12 10:25:34.000000000 +0000
+++ /usr/ports/Mk/bsd.port.mk	2008-10-12 10:39:20.000000000 +0000
@@ -5891,9 +5891,15 @@
 	${SH} -c "${DIALOG} --checklist \"Options for ${PKGNAME:C/-([^-]+)$/ \1/}\" 21 70 15 $${DEFOPTIONS} 2> $${TMPOPTIONSFILE}"; \
 	status=$$?; \
 	if [ $${status} -ne 0 ] ; then \
+		if [ $${status} -eq 255 ] ; then \
+			${ECHO_MSG} "===> Failed to set Options: "; \
+			${CAT} $${TMPOPTIONSFILE}; \
+			exit 1; \
+		else \
+			${ECHO_MSG} "===> Options unchanged"; \
+			exit 0; \
+		fi; \
 		${RM} -f $${TMPOPTIONSFILE}; \
-		${ECHO_MSG} "===> Options unchanged"; \
-		exit 0; \
 	fi; \
 	if [ ! -e ${TMPOPTIONSFILE} ]; then \
 		${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \


>Release-Note:
>Audit-Trail:
>Unformatted:



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