Date: Sat, 3 Dec 2005 07:49:10 -0800 From: "Michael C. Shultz" <ringworm01@gmail.com> To: freebsd-questions@freebsd.org, Daniel Bye <freebsd-questions@slightlystrange.org> Subject: Re: pkgtools-to-portmanager.rb Message-ID: <200512030749.11241.ringworm01@gmail.com> In-Reply-To: <20051203152503.GC35163@catflap.slightlystrange.org> References: <20051203152503.GC35163@catflap.slightlystrange.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 03 December 2005 07:25, Daniel Bye wrote: > Hi, > > Anyone else seen something like this using portmanager lately? > > ---># portmanager -s | grep OLD > /usr/local/share/portmanager/pkgtools-to-portmanager.rb:72:in `+': > cannot convert Array into String (TypeError) > from /usr/local/share/portmanager/pkgtools-to-portmanager.rb:72 > from > /usr/local/share/portmanager/pkgtools-to-portmanager.rb:70:in `each' > from /usr/local/share/portmanager/pkgtools-to-portmanager.rb:70 > /usr/local/share/portmanager/pkgtools-to-portmanager.rb:72:in `+': > cannot convert Array into String (TypeError) > from /usr/local/share/portmanager/pkgtools-to-portmanager.rb:72 > from > /usr/local/share/portmanager/pkgtools-to-portmanager.rb:70:in `each' > from /usr/local/share/portmanager/pkgtools-to-portmanager.rb:70 > > > I checked the archives and no-one seems to have mentioned it, but heh, I > can't be the only one, can I..? ;-) > > The following patch seems to fix it, anyways. > > +---- patch starts > > --- pkgtools-to-portmanager.rb Sat Dec 3 14:49:24 2005 > +++ pkgtools-to-portmanager_fixed.rb Sat Dec 3 14:51:09 2005 > @@ -57,7 +57,7 @@ > > config_value(:BEFOREBUILD).each do |pkg| > > - puts "STOP|/" + pkg[0] + " " + pkg[1] + "|" > + puts "STOP|/" + pkg[0] + " " + "#{pkg[1]}" + "|" > > end > > @@ -69,7 +69,7 @@ > > config_value(:AFTERINSTALL).each do |pkg| > > - puts "START|/" + pkg[0] + " " + pkg[1] + "|" > + puts "START|/" + pkg[0] + " " + "#{pkg[1]}" + "|" > > end > > @@ -86,6 +86,6 @@ > ##mcs mod## > # puts pkg[0] + "|" + pkg[1] + "|" > # > - puts pkg[0] + "|" + pkg[1] + " " + "|" > + puts pkg[0] + "|" + "#{pkg[1]}" + " " + "|" > > end > > +---- patch ends > > Cheers, > > Dan The ruby script doesn't convert pkgtools.conf if it's entries are in array format, but if they are like this: 'editors/openoffice*' => 'LOCALIZED_LANG=en-US WITH_KDE=1', 'emulators/qemu' => 'WITH_KQEMU=1', 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 still tied up for most of today so testing it myself might not happen until tonight or tomorrow. For your information, the converted output goes to: /usr/local/etc/portmanager/pm-039-pkg-tools.conf see if your patch keeps it in the same format as: /usr/local/etc/portmanager/pm-020.conf if so I'll apply it to the ruby script, and be very thankful for your help with this :) -Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512030749.11241.ringworm01>