From owner-freebsd-stable@FreeBSD.ORG Fri Nov 11 16:25:14 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D7B716A421 for ; Fri, 11 Nov 2005 16:25:14 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EF6043D45 for ; Fri, 11 Nov 2005 16:25:14 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so582971wxc for ; Fri, 11 Nov 2005 08:25:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=N+f4QMA5GLWZJ91qNz8/wSIOENAWzu3+ZlqKiZh3XE1WOOdEqomS+/7itz5wLjKJ5edqCfmHkqsFFCV3me5XjorSgtRVBNB+qx76SR+ckBDJX2xn+0fFfebdS7ufsorIauMfKmMB4DzaGP8z5kKs8CNVO5Iyppdq/V9xP66SDDc= Received: by 10.70.44.7 with SMTP id r7mr2287067wxr; Fri, 11 Nov 2005 08:25:13 -0800 (PST) Received: from ?192.168.1.10? ( [71.102.14.129]) by mx.gmail.com with ESMTP id i17sm771328wxd.2005.11.11.08.25.12; Fri, 11 Nov 2005 08:25:13 -0800 (PST) From: "Michael C. Shultz" To: Jan Grant Date: Fri, 11 Nov 2005 08:15:47 -0800 User-Agent: KMail/1.8.3 References: <43726E40.3090701@iaces.com> <200511110729.36677.ringworm01@gmail.com> In-Reply-To: <200511110729.36677.ringworm01@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511110815.48118.ringworm01@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: gnome-upgrade.sh X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2005 16:25:14 -0000 On Friday 11 November 2005 07:29, Michael C. Shultz wrote: > On Friday 11 November 2005 07:23, Jan Grant wrote: > > On Fri, 11 Nov 2005, Michael C. Shultz wrote: > > > > > One last thing, if you make a script that does the conversion, > > > > > might I have a copy? Here is how I'll set up pm-020.conf to work: > > > > > > > > Surely. pkgtools.conf is actually a ruby script: I've no idea how > > > > dynamically the rules are evaluated but something that works ona > > > > prettystock bunch of settings should be close to trivial. > > > > > > Thank you. If it works well I might use it to have portmanager pick up > > > settings from portupgrade "on the fly", or at least provide some sort > > > of conversion command. Thanks :) > > > > Attached uses ruby to parse the pkgtools.conf (it relies on the > > portupgrade ruby package) - it'll spit out the appropriate sections > > (HOLD_PKGS, BEFOREBUILD, AFTERINSTALL and MAKE_ARGS) in what I think the > > portmanager format is (although the script is trivial, as you can see). > > Note that the MAKE_ARGS etc go through a hash/dictionary and > > consequently are unordered. A small snippet of the output I get from > > this: > > > > [[[ > > CATEGORY/PORT|OPTION=| # do not delete this line! > > > > # Ignored packages from HOLD_PKGS > > > > IGNORE|bsdpan-*| > > IGNORE|x11/nvidia-driver| > > IGNORE|editors/openoffice*| > > > > # STOP entries come from BEFOREBUILD > > > > > > # START entries come from AFTERINSTALL > > > > START|/databases/postgresql7 chmod a+x > > /usr/local/share/postgresql/502.pgsql| START|/www/jakarta-tomcat5 chmod > > a-x /usr/local/etc/rc.d/020.jakarta-tomcat*.sh| > > > > # Package options from MAKE_ARGS > > # Note: pkgtools.conf will use the UNION of all matching lines > > > > security/gnupg|WITH_SUID_GPG=yes| > > devel/subversion|WITH_PYTHON=yes WITH_MOD_DAV_SVN=yes WITHOUT_BDB=yes| > > x11/kde3|| > > deskutils/kdepim3|WITH_KPILOT=yes| > > www/gallery|| > > www/rt*|WITH_FASTCGI=yes WITH_APACHE2=yes DB_TYPE=Pg DB_HOST=localhost > > DB_DATABASE=rt3 DB_USER=rt3| www/apache2|WITH_PROXY_MODULES=yes| > > multimedia/kdemultimedia*|WITH_LAME=yes WITH_XINE=yes WITH_MPEGLIB=yes| > > */*|BATCH=yes| > > java/jdk14|NATIVE_BOOTSTRAP=yes JAVA_HOME=| > > */kde*|WITH_KDE_DEBUG=yes| > > mail/exim|WITH_EXIMON=yes WITH_EXISCAN_ACL=yes WITH_TCP_WRAPPERS=yes > > WITH_PGSQL=yes WITHOUT_PERL=yes | ]]] > > ^^^^^^^^^^^ little glitch? > > Works good, just one thing, portmanager has no dependencies, like to keep > it that way. How are you at awk? I use this awk script to do initial > parsing of the config file: > > #!/bin/sh > # > # $1 = pm-020.conf $2 = output file name > # > echo "keyzzNULLzzvaluezzNULLzz" > $2;awk 'BEGIN{ FS = "|" } NF == 3 && > $1 !~ /#/ && $1 !~ /CATEGORY\/PORT/ && $2 !~ /#/ {print $1 "zzNULLz > > I'm no scripter so getting the above to work was painful ;) > > -Mike Sorry I was being dumb. The ruby script is no problem, it will only run if portupgrade is installed so a dependency won't have to be put on ruby. -Mike