ports/158750: INDEXFILE breaks with major version >9
Chris Rees
crees at FreeBSD.org
Sat Jul 9 12:10:11 UTC 2011
>Number: 158750
>Category: ports
>Synopsis: INDEXFILE breaks with major version >9
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jul 09 12:10:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Chris Rees
>Release: FreeBSD 8.2-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Sat Apr 30 15:09:06 BST 2011 root at zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386
>Description:
After the release of FreeBSD-9, CURRENT becomes version 10.
This plays havoc with anything that fiddles OSVERSION to get the major version; here INDEXFILE:
[crees at zeus]~/workspace/ports/pcvs/fairymax% make OSVERSION=1044040 -V INDEXFILE
INDEX-1
[crees at zeus]~/workspace/ports/pcvs/fairymax%
....
With my fix:
[crees at zeus]~/<1>ports/pcvs/ports/Mk% make -f bsd.port.mk OSVERSION=1044040 -V INDEXFILE
INDEX-10
[crees at zeus]~/<1>ports/pcvs/ports/Mk%
>How-To-Repeat:
>Fix:
XXX Not __thoroughly__ tested, but this should be the right lines.
There WILL be others! I got these two with:
[crees at zeus]~/<1>ports/pcvs/ports/Mk% grep OSVERSION: *
so it should get all the Mk instances.
--- ten-release-mk-fix.diff begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.687
diff -u -r1.687 bsd.port.mk
--- bsd.port.mk 3 Jul 2011 15:51:18 -0000 1.687
+++ bsd.port.mk 9 Jul 2011 11:59:21 -0000
@@ -1381,7 +1381,7 @@
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
-INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/}
+INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}
DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME}
EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME}
Index: bsd.port.subdir.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.subdir.mk,v
retrieving revision 1.78
diff -u -r1.78 bsd.port.subdir.mk
--- bsd.port.subdir.mk 4 May 2011 22:33:13 -0000 1.78
+++ bsd.port.subdir.mk 9 Jul 2011 11:59:21 -0000
@@ -144,7 +144,7 @@
.endif
INDEXDIR?= ${PORTSDIR}
-INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/}
+INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}
# local customization of the ports tree
.if exists(${.CURDIR}/Makefile.local)
--- ten-release-mk-fix.diff ends here ---
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list