ports/52706: bsd.port.mk issues warning if a site is explicitly declared :DEFAULT

Alexey Neyman alex.neyman at auriga.ru
Mon May 26 20:00:30 UTC 2003


>Number:         52706
>Category:       ports
>Synopsis:       bsd.port.mk issues warning if a site is explicitly declared :DEFAULT
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 26 13:00:26 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Alexey Neyman
>Release:        FreeBSD 5.1-BETA i386
>Organization:
Auriga, Inc.
>Environment:
System: FreeBSD vagabond.auriga.ru 5.1-BETA FreeBSD 5.1-BETA #0: Mon May 26 09:27:25 MSD 2003 avn at vagabond.auriga.ru:/usr/obj/usr/src/sys/VAGABOND i386

>Description:
	An example from the porter's handbook produces warnings from make.
	The problem occurs if at least one of MASTER_SITES has DEFAULT group
	explicitly listed. See an example below. The warnings are:

"bsd.port.mk", line 2019: warning: duplicate script for target "master-sites-DEFAULT" ignored

>How-To-Repeat:
	Below is a shar archive for Makefile/distinfo for a sample port that
	triggers this warning.


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	Makefile
#	distinfo
#
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
XPORTNAME=Sample
XPORTVERSION=1.0
XCATEGORIES=archivers
X
XMAINTAINER=sample at sample.com
XCOMMENT=Sample
X
XMASTER_SITES=	http://site1/:DEFAULT
XDISTFILES=	file1
X
X.include "bsd.port.mk"
END-of-Makefile
echo x - distinfo
sed 's/^X//' >distinfo << 'END-of-distinfo'
XMD5 (file1) = d41d8cd98f00b204e9800998ecf8427e
END-of-distinfo
exit

>Fix:

The following patch fixes this problem
(by moving master-sites-DEFAULT and patch-sites-DEFAULT higher,
so that targets for port-supplied groups won't get duplicated):


--- bsd.port.mk.orig	Mon May 26 23:23:29 2003
+++ bsd.port.mk	Mon May 26 23:31:11 2003
@@ -1954,6 +1954,12 @@
 SORTED_MASTER_SITES_ALL_CMD=	cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} master-sites-ALL
 SORTED_PATCH_SITES_ALL_CMD=	cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} patch-sites-ALL
 
+# has similar effect to old targets, i.e., access only {MASTER,PATCH}_SITES, not working with the new _n variables
+master-sites-DEFAULT:
+	@echo ${_MASTER_SITE_OVERRIDE} `echo '${_MASTER_SITES_DEFAULT}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
+patch-sites-DEFAULT:
+	@echo ${_MASTER_SITE_OVERRIDE} `echo '${_PATCH_SITES_DEFAULT}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
+
 #
 # Sort the master site list according to the patterns in MASTER_SORT
 # according to grouping rules (:something)
@@ -2014,11 +2020,6 @@
 	@echo ${_MASTER_SITE_OVERRIDE} `echo '${_MASTER_SITES_ALL}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
 patch-sites-ALL:
 	@echo ${_MASTER_SITE_OVERRIDE} `echo '${_PATCH_SITES_ALL}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
-# has similar effect to old targets, i.e., access only {MASTER,PATCH}_SITES, not working with the new _n variables
-master-sites-DEFAULT:
-	@echo ${_MASTER_SITE_OVERRIDE} `echo '${_MASTER_SITES_DEFAULT}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
-patch-sites-DEFAULT:
-	@echo ${_MASTER_SITE_OVERRIDE} `echo '${_PATCH_SITES_DEFAULT}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
 
 # synonyms, mnemonics
 master-sites-all: master-sites-ALL


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



More information about the freebsd-ports-bugs mailing list