Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Dec 2005 16:35:17 +0000
From:      Daniel Bye <freebsd-questions@slightlystrange.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: pkgtools-to-portmanager.rb
Message-ID:  <20051203163517.GE35163@catflap.slightlystrange.org>
In-Reply-To: <20051203160319.GD35163@catflap.slightlystrange.org>
References:  <20051203152503.GC35163@catflap.slightlystrange.org> <200512030749.11241.ringworm01@gmail.com> <20051203160319.GD35163@catflap.slightlystrange.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051203163517.GE35163>