From owner-freebsd-questions@FreeBSD.ORG Sat Dec 3 16:35:20 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D57E16A41F for ; Sat, 3 Dec 2005 16:35:20 +0000 (GMT) (envelope-from danielby@slightlystrange.org) Received: from catflap.slightlystrange.org (cpc1-cmbg1-3-0-cust61.cmbg.cable.ntl.com [62.253.132.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 625AD43D69 for ; Sat, 3 Dec 2005 16:35:19 +0000 (GMT) (envelope-from danielby@slightlystrange.org) Received: from danielby by catflap.slightlystrange.org with local (Exim 4.60 #0) id 1EiaM1-000H9k-Iw by authid for ; Sat, 03 Dec 2005 16:35:17 +0000 Date: Sat, 3 Dec 2005 16:35:17 +0000 From: Daniel Bye To: freebsd-questions@freebsd.org Message-ID: <20051203163517.GE35163@catflap.slightlystrange.org> Mail-Followup-To: freebsd-questions@freebsd.org References: <20051203152503.GC35163@catflap.slightlystrange.org> <200512030749.11241.ringworm01@gmail.com> <20051203160319.GD35163@catflap.slightlystrange.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Oiv9uiLrevHtW1RS" Content-Disposition: inline In-Reply-To: <20051203160319.GD35163@catflap.slightlystrange.org> User-Agent: Mutt/1.4.2.1i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: danielby@slightlystrange.org X-SA-Exim-Scanned: No (on catflap.slightlystrange.org); SAEximRunCond expanded to false Subject: Re: pkgtools-to-portmanager.rb X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Bye List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2005 16:35:20 -0000 --Oiv9uiLrevHtW1RS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 03, 2005 at 04:03:20PM +0000, Daniel Bye wrote: > On Sat, Dec 03, 2005 at 07:49:10AM -0800, Michael C. Shultz wrote: > > The ruby script doesn't convert pkgtools.conf if > > it's entries are in array format, but if they are like this: > >=20 > > 'editors/openoffice*' =3D> 'LOCALIZED_LANG=3Den-US WITH_K= DE=3D1', > > 'emulators/qemu' =3D> 'WITH_KQEMU=3D1', > >=20 > > then it works fine. That script was donated and I haven't had the time > > to fix it, if your patch solves the problem that would be great! I'm s= till=20 > > tied up for most of today so testing it myself might not happen until t= onight=20 > > or tomorrow. > >=20 > > For your information, the converted output goes to: > >=20 > > /usr/local/etc/portmanager/pm-039-pkg-tools.conf > >=20 > > see if your patch keeps it in the same format as: > >=20 > > /usr/local/etc/portmanager/pm-020.conf=20 > >=20 > > if so I'll apply it to the ruby script, and be very thankful for your h= elp=20 > > with this :) > >=20 > > -Mike > >=20 >=20 > Rats! Don't anybody use the patch! It doesn't work. I'll try to > figure out how to do it right (damn, should be writing my assignments > for college!) Right - I think this one is correct - the format in /usr/local/etc/portmanager/pm-039-pkg-tools.conf is the same as that in /usr/local/etc/portmanager/pm-020.conf, which is a promising sign... +---- patch starts --- pkgtools-to-portmanager.rb Sat Dec 3 16:23:49 2005 +++ pkgtools-to-portmanager_fixed.rb Sat Dec 3 16:26:58 2005 @@ -57,7 +57,10 @@ =20 config_value(:BEFOREBUILD).each do |pkg| =20 - puts "STOP|/" + pkg[0] + " " + pkg[1] + "|" + if pkg[1].instance_of?(Array) + pkg[1] =3D pkg[1].join(" ") + end + puts "STOP|/" + pkg[0] + " " + "#{pkg[1]}" + "|" =20 end =20 @@ -69,7 +72,10 @@ =20 config_value(:AFTERINSTALL).each do |pkg| =20 - puts "START|/" + pkg[0] + " " + pkg[1] + "|" + if pkg[1].instance_of?(Array) + pkg[1] =3D pkg[1].join(" ") + end + puts "START|/" + pkg[0] + " " + "#{pkg[1]}" + "|" =20 end =20 @@ -86,6 +92,10 @@ ##mcs mod## # puts pkg[0] + "|" + pkg[1] + "|" # - puts pkg[0] + "|" + pkg[1] + " " + "|" + + if pkg[1].instance_of?(Array) + pkg[1] =3D pkg[1].join(" ") + end + puts pkg[0] + "|" + "#{pkg[1]}" + " " + "|" =20 end +---- patch ends Cheers, Dan --=20 Daniel Bye PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ --Oiv9uiLrevHtW1RS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDkclFhvzwOpChvo8RAvx/AJ474dkRtrSZXdNeLdWTM8ikFsh9ZgCfUm1w HamJ3+fKdFqHSAuoEEpGNi4= =PuvJ -----END PGP SIGNATURE----- --Oiv9uiLrevHtW1RS--