Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  5 Apr 2002 15:57:45 -0800 (PST)
From:      Patrick Li <pat@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        lioux@FreeBSD.org, pat@FreeBSD.org
Subject:   ports/36806: bsd.port.mk MASTER_SITES:n group protection fix
Message-ID:  <20020405235745.0FBA737B405@hub.freebsd.org>

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

>Number:         36806
>Category:       ports
>Synopsis:       bsd.port.mk MASTER_SITES:n group protection fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 05 16:00:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Li
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
The FreeBSD Project
>Environment:

System: FreeBSD pitchfork 4.5-STABLE FreeBSD 4.5-STABLE #0: Fri Mar 29 02:37:56 EST 2002 root@pitchfork:/usr/src/sys/compile/PITCHFORK i386

>Description:

Fix MASTER_SITES:n reserved groups checking

Reviewed by:	lioux

>How-To-Repeat:

Try to use the groups all, ALL, or default. Desired behavior is stopping make and ask for
them to choose an alternative name for a group, but that is not happening.

>Fix:

Index: ports/Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.409
diff -u -r1.409 bsd.port.mk
--- ports/Mk/bsd.port.mk	4 Apr 2002 10:06:00 -0000	1.409
+++ ports/Mk/bsd.port.mk	5 Apr 2002 23:17:55 -0000
@@ -1278,13 +1278,14 @@
 _S_TEMP=	${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://}
 .	if !empty(_S_TEMP)
 .		for _group in ${_S_TEMP:S/,/ /g}
-.			if ${_group}==all || ${_group}==ALL || ${_group}==default
-.			BEGIN:
-				@${ECHO} "The words all, ALL and default are reserved and cannot be used"
-				@${ECHO} "in group definitions."
-				@${ECHO} "Please fix your MASTER_SITES"
+_T_GROUP=	${_group}
+.			if ${_T_GROUP} == all || ${_T_GROUP} == ALL || ${_T_GROUP} == default
+.BEGIN:
+				@${ECHO} "The words all, ALL and default are reserved and cannot be"
+				@${ECHO} "used in group definitions. Please fix your MASTER_SITES"
 				@${FALSE}
 .			endif
+.undef _T_GROUP
 _MASTER_SITES_${_group}+=	${_S:C@^(.*/):[^/:]+$@\1@}
 .		endfor
 .	else
@@ -1295,13 +1296,14 @@
 _S_TEMP=	${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://}
 .	if !empty(_S_TEMP)
 .		for _group in ${_S_TEMP:S/,/ /g}
-.			if ${_group}==all || ${_group}==ALL || ${_group}==default
-.			BEGIN:
-				@${ECHO} "The words all, ALL and default are reserved and cannot be used"
-				@${ECHO} "in group definitions."
-				@${ECHO} "Please fix your MASTER_SITES"
+_T_GROUP=	${_group}
+.			if ${_T_GROUP} == all || ${_T_GROUP} == ALL || ${_T_GROUP} == default
+.BEGIN:
+				@${ECHO} "The words all, ALL and default are reserved and cannot be"
+				@${ECHO} "used in group definitions. Please fix your PATCH_SITES"
 				@${FALSE}
 .			endif
+.undef _T_GROUP
 _PATCH_SITES_${_group}+=	${_S:C@^(.*/):[^/:]+$@\1@}
 .		endfor
 .	else
@@ -1317,13 +1319,14 @@
 _S_TEMP=	${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://}
 .	if !empty(_S_TEMP)
 .		for _group in ${_S_TEMP:S/,/ /g}
-.			if ${_group}==all || ${_group}==ALL || ${_group}==default
-.			BEGIN:
-				@${ECHO} "The words all, ALL and default are reserved and cannot be used"
-				@${ECHO} "in group definitions."
-				@${ECHO} "Please fix your MASTER_SITE_SUBDIR"
+_T_GROUP=	${_group}
+.			if ${_T_GROUP} == all || ${_T_GROUP} == ALL || ${_T_GROUP} == default
+.BEGIN:
+				@${ECHO} "The words all, ALL and default are reserved and cannot be"
+				@${ECHO} "used in group definitions. Please fix your MASTER_SITE_SUBDIR"
 				@${FALSE}
 .			endif
+.undef _T_GROUP
 .			if defined(_MASTER_SITES_${_group})
 _MASTER_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@}
 .			endif
@@ -1338,13 +1341,14 @@
 _S_TEMP=	${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://}
 .	if !empty(_S_TEMP)
 .		for _group in ${_S_TEMP:S/,/ /g}
-.			if ${_group}==all || ${_group}==ALL || ${_group}==default
-.			BEGIN:
-				@${ECHO} "The words all, ALL and default are reserved and cannot be used"
-				@${ECHO} "in group definitions."
-				@${ECHO} "Please fix your PATCH_SITE_SUBDIR"
+_T_GROUP=	${_group}
+.			if ${_T_GROUP} == all || ${_T_GROUP} == ALL || ${_T_GROUP} == default
+.BEGIN:
+				@${ECHO} "The words all, ALL and default are reserved and cannot be"
+				@${ECHO} "used in group definitions. Please fix your PATCH_SITE_SUBDIR"
 				@${FALSE}
 .			endif
+.undef _T_GROUP
 .			if defined(_PATCH_SITES_${_group})
 _PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@}
 .			endif
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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