Date: Thu, 08 Jun 2006 21:20:39 +0100 From: James O'Gorman <james@netinertia.co.uk> To: Alex Dupre <ale@FreeBSD.org> Cc: freebsd-ports@freebsd.org Subject: Re: portmaster Message-ID: <44888697.3000701@netinertia.co.uk> In-Reply-To: <448881D2.1030001@FreeBSD.org> References: <4485DBF5.3070705@FreeBSD.org> <20060606211113.GA7845@xor.obsecurity.org> <c21e92e20606061845g65e840eh1d64553d119e1b30@mail.gmail.com> <20060607021330.GA11189@xor.obsecurity.org> <c21e92e20606061919g6cf0bb6ct101c47be3af19dd5@mail.gmail.com> <20060607022741.GA11522@xor.obsecurity.org> <c21e92e20606061939x3d8796dahaf6df2ed73ef4164@mail.gmail.com> <44866E48.4000601@FreeBSD.org> <1149672527.851.2.camel@mayday.esat.net> <4486F811.3080207@FreeBSD.org> <448851C0.10902@netinertia.co.uk> <448881D2.1030001@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------010005080501000904050707 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Alex Dupre wrote: > James O'Gorman ha scritto: >> Would it perhaps be possible for this to spam /etc/make.conf to add the >> relevant entries, like the perl port does? > > Possible yes, easy no. Adding rows on install is simple, removing them > on deinstall less (perl set only a couple of variables). If you have a > working patch I'll be glad ti commit it. How's this? It's a technique I use in my Apache vhosts.conf maintainance script. James --------------010005080501000904050707 Content-Type: text/plain; name="portsconf.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="portsconf.diff" diff -urN portsconf.orig/pkg-deinstall portsconf/pkg-deinstall --- portsconf.orig/pkg-deinstall Thu Jan 1 01:00:00 1970 +++ portsconf/pkg-deinstall Thu Jun 8 20:22:13 2006 @@ -0,0 +1,6 @@ +#!/bin/sh + +echo -n "Cleaning up /etc/make.conf..." +sed -e "/# Begin portsconf configuration/,/# End portsconf configuration/ d" \ + -i.bak /etc/make.conf +echo " Done." diff -urN portsconf.orig/pkg-install portsconf/pkg-install --- portsconf.orig/pkg-install Thu Jan 1 01:00:00 1970 +++ portsconf/pkg-install Thu Jun 8 20:21:35 2006 @@ -0,0 +1,14 @@ +#!/bin/sh + +echo -n "Spamming /etc/make.conf..." +echo >> /etc/make.conf <<EOF +# Begin portsconf configuration +.if !empty(.CURDIR:M/usr/ports*) +_PORTCONF!=%%PREFIX%%/sbin/portconf +.for i in ${_PORTCONF:S/|/ /g} +${i:S/%/ /g} +.endfor +.endif +# End portsconf configuration +EOF +echo " Done." --------------010005080501000904050707--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44888697.3000701>