pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/33870: obfuscated code in bsd.prefs.mk regarding X11_TYPE



>Number:         33870
>Category:       pkg
>Synopsis:       obfuscated code in bsd.prefs.mk regarding X11_TYPE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 30 00:25:00 +0000 2006
>Originator:     Christoph Badura
>Release:        NetBSD 3.0_STABLE
>Organization:
        
>Environment:
pkgsrc as of 2006-06-26
        
        
System: NetBSD limiting-factor 3.0_STABLE NetBSD 3.0_STABLE (GENERIC_LAPTOP) 
#7: Tue Jun 27 22:50:21 MEST 2006 
bad@limiting-factor:/home/bad/c/GENERIC_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
.if ((defined(X11_TYPE) && !empty(X11_TYPE:MXFree86) || \
     defined(X11_TYPE) && !empty(X11_TYPE:Mxorg)) && \
     defined(X11_TYPE) && empty(X11_TYPE:Mnative))
X11BASE?=               ${LOCALBASE}/${X11ROOT_PREFIX}
.endif

Due to the repeated checks for X11_TYPE being defined and the indentiation
not reflecting the nesting level this is near unreadble.

Does the author really expect the value of X11_TYPE to change while evaluating
the expression? Or does he need to be told three times?
        
>How-To-Repeat:
        
>Fix:
Simplify the expression.
        

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index