pkgtools-to-portmanager.rb
Michael C. Shultz
ringworm01 at gmail.com
Sat Dec 3 07:49:16 PST 2005
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
More information about the freebsd-questions
mailing list