From owner-freebsd-ports Tue May 29 12:52:17 2001 Delivered-To: freebsd-ports@freebsd.org Received: from idiom.com (idiom.com [216.240.32.1]) by hub.freebsd.org (Postfix) with ESMTP id 4046137B42C for ; Tue, 29 May 2001 12:52:11 -0700 (PDT) (envelope-from rdm@cfcl.com) Received: from cfcl.com (cpe-24-221-169-54.ca.sprintbbd.net [24.221.169.54]) by idiom.com (8.9.3/8.9.3) with ESMTP id MAA96000 for ; Tue, 29 May 2001 12:52:07 -0700 (PDT) Received: from [192.168.168.205] (cerberus [192.168.168.205]) by cfcl.com (8.11.1/8.11.1) with ESMTP id f4TJrL992655 for ; Tue, 29 May 2001 12:53:27 -0700 (PDT) (envelope-from rdm@cfcl.com) Mime-Version: 1.0 Message-Id: In-Reply-To: <20010528105709.A9284@c187104187.telekabel.chello.nl> References: <20010528105709.A9284@c187104187.telekabel.chello.nl> Date: Tue, 29 May 2001 12:46:06 -0700 To: ports@FreeBSD.ORG From: Rich Morin Subject: Re: XML-based ports system ? Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I would be very happy to see the Ports Collection switch to an abstract, declarative infrastructure. I like the idea of using XML for this, mostly because of the number of tools that it has. In line with this, I will take on some of Doug Barton's comments: DB>what are the advantages to the declarative approach? One of the big wins of the Ports Collection is that it is flexible; if I want to change how it behaves, I can edit the base-level Make- files (as Dr. Love has done in porting the collection to Mac OS X). The flexibility is limited, however, by the encoding of imperative notions (let alone explicit code) in the package-specific Makefiles. A declarative format would allow greater flexibility in processing; if I wanted to cross-reference the documents (or source code) in a package, I could use the same "build" files with a different "make" engine. More to the point, I recently found myself having to do a cursory parse of system Makefiles, in order to determine where the source code was actually stored for common commands (e.g., vi). I would have been MUCH happier to have the information in XML format! DB>Most of the new users we have lately have a hard enough time DB>understanding simple instructions in plain english. Further DB>obfuscating things with XML is unlikely to help. It isn't the explanations that are being put into "plain english" [sic]; it is the Makefiles. The syntax of Makefiles is arcane and even rather silly in spots (why should tabs be treated differently than spaces?). Worse, Makefile writers commonly embed code from other languages (e.g., awk, sed, sh), creating something that only a script wizard can parse. Finally, by putting the information in XML, there is a reasonable chance that the information can be used to drive automated analysis, forms-based interfaces, etc. DB>There are many more tools for manipulating text files. Yes and no. Unix has lots of tools for manipulating text files, but they don't do much for analyzing Makefiles, shell scripts, or even many control files (try parsing /etc/printcap in awk :-). In contrast, I can use XMLin to import any well-formed piece of XML, then walk through it as a Perl data structure. I have used both Boulder I/O and XML as a way to encode control files, serialize data structures, etc. The ability to create human-readable (and -editable, if need be) data files is quite useful, even when there isn't a DTD within miles... BTW, I was pleased to hear Jordan Hubbard say (at Apple's WWDC 2001) that he was considering the idea of replacing the Ports Collection's Makefile infrastructure with XML... -r P.S. For a more extended discussion of these and related issues, see the Meta Project (http://www.cfcl.com/Meta). -- http://www.cfcl.com/rdm - home page, resume, etc. http://www.cfcl.com/Meta/md_fb.html - The FreeBSD Browser email: rdm@cfcl.com; phone: +1 650-873-7841 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message