From owner-freebsd-questions@FreeBSD.ORG Sat Dec 3 15:49:15 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 CD93216A41F for ; Sat, 3 Dec 2005 15:49:15 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA20143D60 for ; Sat, 3 Dec 2005 15:49:14 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so285346wxc for ; Sat, 03 Dec 2005 07:49:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=SQyI8qvfAIXCIA9GMf4bEtINLq8R+hu4efayWGQQcwyKkiZ9QL3FCK1okGg3YQzx7EC9aKIndTQ3RZY/DUcwBKEomFJz3spMNOYxsSEye8/7U0LkzhzxccZ12dBDjnvMe5ftOOqgCqnieuKiRgCMuCJM0YBJpZo/fKyih0Z1ShY= Received: by 10.70.74.13 with SMTP id w13mr5062510wxa; Sat, 03 Dec 2005 07:49:14 -0800 (PST) Received: from ringworm.mechee.com ( [71.102.14.129]) by mx.gmail.com with ESMTP id i39sm3395466wxd.2005.12.03.07.49.13; Sat, 03 Dec 2005 07:49:14 -0800 (PST) From: "Michael C. Shultz" To: freebsd-questions@freebsd.org, Daniel Bye Date: Sat, 3 Dec 2005 07:49:10 -0800 User-Agent: KMail/1.8.3 References: <20051203152503.GC35163@catflap.slightlystrange.org> In-Reply-To: <20051203152503.GC35163@catflap.slightlystrange.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512030749.11241.ringworm01@gmail.com> Cc: Subject: Re: pkgtools-to-portmanager.rb X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2005 15:49:16 -0000 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