From owner-freebsd-ports Thu May 30 06:36:07 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA24963 for ports-outgoing; Thu, 30 May 1996 06:36:07 -0700 (PDT) Received: from epprod.elsevier.co.uk (epprod.elsevier.co.uk [193.131.222.35]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id GAA24888; Thu, 30 May 1996 06:35:56 -0700 (PDT) Received: from snowdon.elsevier.co.uk (snowdon.elsevier.co.uk [193.131.197.164]) by epprod.elsevier.co.uk (8.6.13/8.6.12) with ESMTP id OAA25278; Thu, 30 May 1996 14:34:43 +0100 Received: from cadair.elsevier.co.uk (actually host cadair) by snowdon with SMTP (PP); Thu, 30 May 1996 14:34:45 +0100 Received: (from dpr@localhost) by cadair.elsevier.co.uk (8.6.12/8.6.12) id OAA00366; Thu, 30 May 1996 14:34:14 +0100 From: Paul Richards Message-Id: <199605301334.OAA00366@cadair.elsevier.co.uk> Subject: Re: Request for feedback: REQUIRES_OS_VERSION feature. To: jkh@time.cdrom.com (Jordan K. Hubbard) Date: Thu, 30 May 1996 14:34:14 +0100 (BST) Cc: asami@freebsd.org, ports@freebsd.org In-Reply-To: <16316.833412688@time.cdrom.com> from "Jordan K. Hubbard" at May 29, 96 04:31:28 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In reply to Jordan K. Hubbard who said > > The changes add the abstraction of a "check" target which, if it > "breaks the link" between build an configure process, essentially > short-circuits the fetch/extract/build cycle of the port. The default > check target can get as clever as we like as time goes on, but for now > it does no more than check for a variable called REQUIRES_OS_VERSION. > > If this variable is set in a Makefile, the output of `uname -r' will > be compared against it and, if no match occurs, refuse to build > the port. For example, the top port could have: > > REQUIRES_OS_VERSION= 2.2 > > For all variants and 2.1 users could make from the -current tree with > impugnity, any ports like top simply getting skipped. > > Anyway, let me know what you think.. > > Jordan Hmmm, the basic idea of stamping ports is good but I can see a lot of problems with this implementation. How can you mark a port as working with *many* OS versions rather than just the one. If you stamp something as requiring 2.2 then it will probably work with 2.3 and later but will never work with 2.1, which people may still have around for some time (as our releases get more stable and featureful people will tend to leave stable boxes alone). You'd have to change the string at each release to ensure it worked in -current and that would then break older releases. Hmm, I think "feature tags" are the only way to deal with this. Instead of a REQUIRES_OS_VERSION string you have REQUIRES_2_2_VM etc and then somewhere in the system you'd need a file that held these tags if they apply to that version of the OS. i.e. a /usr/share/features file in 2.2 will have a HAS_2_2_VM tag in it. When we move to 2.3, that feature would still be present so you wouldn't have to change anything. It needs some extra work to implement a script to check the tags but it's more flexible and would be less work in the long run since you wouldn't have to change all the ports configuration's at each release. You could really snazzy and assosciate a string with each tag so if the tags missing you get a sensible error message explaining what feature the port requires. It would be trivial to do in perl. -- Paul Richards. Originative Solutions Ltd. (Netcraft Ltd. contractor) Elsevier Science TIS online journal project. Email: p.richards@elsevier.co.uk Phone: 0370 462071 (Mobile), +44 (0)1865 843155