>Number:         165419
>Category:       misc
>Synopsis:       Mk/bsd.port.mk: "make showconfig" to tell whether option 
>values are same as the default
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 23 12:40:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Hiroto Kagotani
>Release:        FreeBSD 8.1-RELEASE
>Organization:
>Environment:
FreeBSD myhost.mydomain 8.1-RELEASE-p5 FreeBSD 8.1-RELEASE-p5 #0: Tue Sep 27 
16:18:26 UTC 2011     
[email protected]:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
I sometimes want to identify installed packages whose option values are 
different from the default.  Though "make showconfig" and "make config" show 
the current option values, they don't tell which are same as or different from 
the default.  Instead, I need to compare values with the value of OPTION 
variable in Makefile.

My idea is to make "make showconfig" tell whether option values are same as the 
default.  The patch attached implements the idea.

Using this, I can easily find packages with non-default option values like this:
% make showconfig-recursive | grep -v 'same as default'
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- /usr/ports/Mk/bsd.port.mk.orig      2012-02-02 17:36:41.000000000 +0900
+++ /usr/ports/Mk/bsd.port.mk   2012-02-23 21:21:43.000000000 +0900
@@ -6093,8 +6093,10 @@
                withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \
                if [ ! -z "$${withval}" ]; then \
                        val=on; \
+                       case "$${defaultval}" in on|ON|On) val="$${val} (same 
as default)";; esac; \
                elif [ ! -z "$${withoutval}" ]; then \
                        val=off; \
+                       case "$${defaultval}" in off|OFF|Off) val="$${val} 
(same as default)";; esac; \
                else \
                        val="$${defaultval} (default)"; \
                fi; \


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to