ports/158203: Fix of failure in make fetch-urlall-list for ports with DIST_SUBDIR

Mamoru Sakaue
Thu Jun 23 13:40:16 UTC 2011


>Number:         158203
>Category:       ports
>Synopsis:       Fix of failure in make fetch-urlall-list for ports with DIST_SUBDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 23 13:40:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Mamoru Sakaue
>Release:        FreeBSD 8.1-RELEASE
>Organization:
MwGhennndo
>Environment:
FreeBSD Tariff.EmpireNmw 8.1-RELEASE-p3 FreeBSD 8.1-RELEASE-p3 #0: Sat Apr 23 17:31:02 JST 2011     root at Grubstake.EmpireNmw:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
After the update reflecting [ports/157273: [PATCH] some cleanup on bsd.port.mk], make fetch-urlall-list for ports with DIST_SUBDIR enabled became unsuccessful.
I created a patch to fix it.
>How-To-Repeat:
For example:

cd /usr/ports/x11-fonts/font-jis-misc && make fetch-urlall-list

cd /usr/ports/devel/glib20 && make fetch-urlall-list

cd /usr/ports/devel/gconf && make fetch-urlall-list
>Fix:
The code creating the SIZE line of (temporal?) distinfo had been changed from grep-based to awk-based in the concerned previous patch.
The relative file path from ${PORTSDIR}/${DISTDIR}, namely, ${DIST_SUBDIR}/${filename}, is substituted into the pattern of regular expression where a slash character "/" is recognized as a delimiter.
The problem was caused by the raw substitution of the path without escaping the slash character.
This might have affected the other make targets, but I have not observed any other related problems yet.

Patch attached with submission follows:

--- /usr/ports/Mk/bsd.port.mk	2011-06-09 17:22:45.000000000 +0900
+++ /usr/ports/Mk/bsd.port.mk	2011-06-23 21:38:07.000000000 +0900
@@ -4857,8 +4857,8 @@
 				SORTED_MASTER_SITES_CMD_TMP="${SORTED_MASTER_SITES_DEFAULT_CMD}" ; \
 			fi ; \
 			for site in `eval $$SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \
-				DIR=${DIST_SUBDIR}; \
-				CKSIZE=`${AWK} "/^SIZE \($${DIR:+$$DIR/}$$file\)/"'{print $$4}' ${DISTINFO_FILE}`; \
+				DIR=${DIST_SUBDIR:S/\//\\\\\//}; \
+				CKSIZE=`${AWK} "/^SIZE \($${DIR:+$$DIR\/}$$file\)/"'{print $$4}' ${DISTINFO_FILE}`; \
 				case $${file} in \
 				*/*)	args="-o $${file} $${site}$${file}";; \
 				*)		args=$${site}$${file};; \
@@ -4888,8 +4888,8 @@
 				SORTED_PATCH_SITES_CMD_TMP="${SORTED_PATCH_SITES_DEFAULT_CMD}" ; \
 			fi ; \
 			for site in `eval $$SORTED_PATCH_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \
-				DIR=${DIST_SUBDIR}; \
-				CKSIZE=`${AWK} "/^SIZE \($${DIR:+$$DIR/}$$file\)/"'{print $$4}' ${DISTINFO_FILE}`; \
+				DIR=${DIST_SUBDIR:S/\//\\\\\//}; \
+				CKSIZE=`${AWK} "/^SIZE \($${DIR:+$$DIR\/}$$file\)/"'{print $$4}' ${DISTINFO_FILE}`; \
 				case $${file} in \
 				*/*)	args="-o $${file} $${site}$${file}";; \
 				*)		args=$${site}$${file};; \


>Release-Note:
>Audit-Trail:
>Unformatted:
 sakaue.mamoru-cmfho5lt at samurai.mwghennn.net>
 Subject: Fix of failure in make fetch-urlall-list for ports with DIST_SUBDIR
 X-REMOTE_ADDR-Is-Open-Proxy: Maybe
 X-Send-Pr-Version: www-3.1
 X-GNATS-Notify: 
 



More information about the freebsd-ports-bugs mailing list