Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 May 2006 14:24:46 +0200 (CEST)
From:      Pav Lucistnik <pav@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/97133: always print options with make showconfig
Message-ID:  <200605111224.k4BCOkcT037055@pav.hide.vol.cz>
Resent-Message-ID: <200605111230.k4BCUJhX025337@freefall.freebsd.org>

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

>Number:         97133
>Category:       ports
>Synopsis:       always print options with make showconfig
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 11 12:30:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Pav Lucistnik
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD pav.hide.vol.cz 6.1-STABLE FreeBSD 6.1-STABLE #0: Thu May 11 02:57:52 CEST 2006 root@pav.hide.vol.cz:/usr/obj/usr/src/sys/GENERIC i386

>Description:
I propose to change the behaviour of 'make showconfig' when user have not yet
set his settings using 'make config'.  At the moment, the user is told there is
nothing saved.  It would be much more useful to print the existing options and
their default values.

This is a first step for useful 'make showconfig-recursive'.

>How-To-Repeat:
Before --

$ make showconfig
===> No configuration options are set for this port
        Use 'make config' to set default values

After --

$ make showconfig
===> The following configuration options are available for liferea-1.0.12:
     DBUS=on (default) "Enable dbus support"
     XPI=off (default) "Firefox extension to subscribe feeds (req. dbus)"
     MOZILLA=off (default) "Use Mozilla for rendering"
     XULRUNNER=off (default) "Use Xulrunner for rendering"
===> Use 'make config' to modify these settings

>Fix:

--- options-showconfig-always begins here ---
--- bsd.port.mk.orig	Thu May 11 14:15:04 2006
+++ bsd.port.mk	Thu May 11 14:17:57 2006
@@ -5306,8 +5306,8 @@
 
 .if !target(showconfig)
 showconfig:
-.if defined(OPTIONS) && exists(${_OPTIONSFILE})
-	@${ECHO_MSG} "===> The following configuration options are set for ${PKGNAME}:"
+.if defined(OPTIONS)
+	@${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}:"
 	-@if [ -e ${_OPTIONSFILE} ]; then \
 		. ${_OPTIONSFILE}; \
 	fi; \
@@ -5328,11 +5328,7 @@
 		${ECHO_MSG} "     $$1=$${val} \"$$2\""; \
 		shift 3; \
 	done
-.else
-	@${ECHO_MSG} "===> No configuration options are set for this port"
-.if defined(OPTIONS)
-	@${ECHO_MSG} "	Use 'make config' to set default values"
-.endif
+	@${ECHO_MSG} "===> Use 'make config' to modify these settings"
 .endif
 .endif
 
--- options-showconfig-always ends here ---


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



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