Bug 158750 - [bsd.port.mk] [patch] INDEXFILE breaks with major version >9
Summary: [bsd.port.mk] [patch] INDEXFILE breaks with major version >9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Linimon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-09 13:10 UTC by Chris Rees
Modified: 2011-07-21 06:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees freebsd_committer freebsd_triage 2011-07-09 13:10:10 UTC
	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@zeus]~/workspace/ports/pcvs/fairymax% make OSVERSION=1044040 -V INDEXFILE
INDEX-1
[crees@zeus]~/workspace/ports/pcvs/fairymax%

....

With my fix:

[crees@zeus]~/<1>ports/pcvs/ports/Mk% make -f bsd.port.mk OSVERSION=1044040 -V INDEXFILE
INDEX-10
[crees@zeus]~/<1>ports/pcvs/ports/Mk%

Fix: XXX Not __thoroughly__ tested, but this should be the right lines.

There WILL be others! I got these two with:

[crees@zeus]~/<1>ports/pcvs/ports/Mk% grep OSVERSION: *

so it should get all the Mk instances.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--q9dL09hyrIbH4bJ6HpOBsZ7ZKvH6fPoCTFIZa5m3PthtiMk0
Content-Type: text/plain; name="ten-release-mk-fix.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ten-release-mk-fix.diff"

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)
Comment 1 Chris Rees freebsd_committer freebsd_triage 2011-07-09 13:13:42 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

FAO portmgr
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2011-07-17 04:39:58 UTC
State Changed
From-To: open->analyzed

take for -exp run. 


Comment 3 Mark Linimon freebsd_committer freebsd_triage 2011-07-17 04:39:58 UTC
Responsible Changed
From-To: portmgr->linimon
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2011-07-21 06:03:47 UTC
State Changed
From-To: analyzed->closed

Committed, thanks.
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-07-21 06:04:53 UTC
linimon     2011-07-21 05:04:39 UTC

  FreeBSD ports repository

  Modified files:
    Mk                   bsd.port.mk bsd.port.subdir.mk 
  Log:
  Fix INDEXFILE for upcoming 10.0 branch.
  
  PR:             ports/158750
  Submitted by:   crees
  Tested on:      pointyhat-west
  
  Revision  Changes    Path
  1.689     +5 -5      ports/Mk/bsd.port.mk
  1.79      +4 -4      ports/Mk/bsd.port.subdir.mk
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"