pkgtools-to-portmanager.rb
Daniel Bye
freebsd-questions at slightlystrange.org
Sat Dec 3 08:35:20 PST 2005
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:
> >
> > '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
> >
>
> 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 @@
config_value(:BEFOREBUILD).each do |pkg|
- puts "STOP|/" + pkg[0] + " " + pkg[1] + "|"
+ if pkg[1].instance_of?(Array)
+ pkg[1] = pkg[1].join(" ")
+ end
+ puts "STOP|/" + pkg[0] + " " + "#{pkg[1]}" + "|"
end
@@ -69,7 +72,10 @@
config_value(:AFTERINSTALL).each do |pkg|
- puts "START|/" + pkg[0] + " " + pkg[1] + "|"
+ if pkg[1].instance_of?(Array)
+ pkg[1] = pkg[1].join(" ")
+ end
+ puts "START|/" + pkg[0] + " " + "#{pkg[1]}" + "|"
end
@@ -86,6 +92,10 @@
##mcs mod##
# puts pkg[0] + "|" + pkg[1] + "|"
#
- puts pkg[0] + "|" + pkg[1] + " " + "|"
+
+ if pkg[1].instance_of?(Array)
+ pkg[1] = pkg[1].join(" ")
+ end
+ puts pkg[0] + "|" + "#{pkg[1]}" + " " + "|"
end
+---- patch ends
Cheers,
Dan
--
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 / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20051203/e657a148/attachment.bin
More information about the freebsd-questions
mailing list