From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jan 24 17:10:18 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D413E16A4CE for ; Sat, 24 Jan 2004 17:10:18 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4017043D48 for ; Sat, 24 Jan 2004 17:10:16 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i0P1AGFR069670 for ; Sat, 24 Jan 2004 17:10:16 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i0P1AGsw069669; Sat, 24 Jan 2004 17:10:16 -0800 (PST) (envelope-from gnats) Resent-Date: Sat, 24 Jan 2004 17:10:16 -0800 (PST) Resent-Message-Id: <200401250110.i0P1AGsw069669@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dag-Erling Smørgrav Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43F2E16A4CE for ; Sat, 24 Jan 2004 17:08:46 -0800 (PST) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDE9443D1D for ; Sat, 24 Jan 2004 17:08:44 -0800 (PST) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id B1BB0530A; Sun, 25 Jan 2004 02:08:43 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 8F9C05309 for ; Sun, 25 Jan 2004 02:08:33 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id 2689E33C9A; Sun, 25 Jan 2004 02:08:33 +0100 (CET) Message-Id: <20040125010833.2689E33C9A@dwp.des.no> Date: Sun, 25 Jan 2004 02:08:33 +0100 (CET) From: Dag-Erling Smørgrav To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/61856: [PATCH] stop relying on port.mkversion X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dag-Erling Smørgrav List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2004 01:10:19 -0000 >Number: 61856 >Category: ports >Synopsis: [PATCH] stop relying on port.mkversion >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: Sat Jan 24 17:10:15 PST 2004 >Closed-Date: >Last-Modified: >Originator: Dag-Erling Smørgrav >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD dwp.des.no 5.2-CURRENT FreeBSD 5.2-CURRENT #22: Sat Jan 24 20:11:54 CET 2004 des@dwp.des.no:/usr/obj/usr/src/sys/dwp_smp i386 ports-current >Description: /var/db/port.mkversion serves no purpose, and never did. it is intended to prevent the use of an up-to-date ports tree on FreeBSD versions older than approx. 4.2, but the value it contains is simply the date of the last system upgrade and bears no relation to the actual FreeBSD version used. furthermore, the threshold date (20001103) is so far in the past it has become completely meaningless, and I'd be surprised if the current ports tree still works on a system built from 20001104 sources. >How-To-Repeat: try to use the ports tree on a system that lacks /var/db/port.mkversion (e.g. a diskless system with a memory-based /var) and watch it tell you that your system is too old. >Fix: apply the attached patch, which replaces the port.mkversion test with an equivalent but far more reliable and relevant ${OSVERSION} test. --- ports-mkversion.diff begins here --- Index: Mk/bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.483 diff -u -r1.483 bsd.port.mk --- Mk/bsd.port.mk 24 Jan 2004 01:26:30 -0000 1.483 +++ Mk/bsd.port.mk 25 Jan 2004 00:49:57 -0000 @@ -2725,24 +2725,9 @@ # Don't build a port if the system is too old. ################################################################ -.if ${OSVERSION} >= 300000 +.if ${OSVERSION} < 420000 # You need an upgrade kit or make world newer than this -BSDPORTMKVERSION= 20001103 -.if exists(/var/db/port.mkversion) -VERSIONFILE= /var/db/port.mkversion -.else -VERSIONFILE= ${PKG_DBDIR}/.mkversion -.endif -.if exists(${VERSIONFILE}) -.if !defined(SYSTEMVERSION) -SYSTEMVERSION!= ${CAT} ${VERSIONFILE} -.endif -.else -SYSTEMVERSION= 0 -.endif -.if ${BSDPORTMKVERSION} > ${SYSTEMVERSION} IGNORE= ": Your system is too old to use this bsd.port.mk. You need a fresh make world or an upgrade kit. Please go to http://www.FreeBSD.org/ports/ or a mirror site and follow the instructions" -.endif .endif .if defined(ONLY_FOR_ARCHS) --- ports-mkversion.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: