Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Aug 2011 01:21:14 +0200 (CEST)
From:      Barbara <barbara.xxx1975@libero.it>
To:        <ruby@FreeBSD.org>
Subject:   about last portupgrade/ruby version
Message-ID:  <20967509.210331314055274580.JavaMail.defaultUser@defaultHost>

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

I know that nowadays most people are fond of postamaster, anyway I'm still 
using portupgrade because I've done a lot of scripts using its utilities and no 
time/will to rework them using different tools.
Yesterday I upgraded sysutils/libchk, which, I think, pulled in lang/ruby19.
So I decided to rebuild the other ports still depending on ruby18 and removing 
it.
Now, when I run portversion -l "<", I get an error caused by a bad encoding
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22745 port 
entries found .........1000.........2000.........3000........./usr/ports/INDEX-
8:3905:invalid byte sequence in US-ASCII
4000.........5000.........6000.........7000.........8000.........9000.........
10000.........11000.........12000.........13000.........14000.........
15000.........16000.........17000.........18000.........19000.........
20000.........21000.........22000....... ..... done]
which seems to be caused by fr-belote-20061109_3 entry at line #7405.
So probably there is a problem in portversion as ruby19 is more picky about 
encoding.
I think that /usr/local/lib/ruby/site_ruby/1.9/portsdb.rb should be patched as 
follow (if INDEX-n isn't supposed to be an ASCII file):
--- portsdb.rb.orig	2011-08-21 22:57:12.000000000 +0200
+++ portsdb.rb	2011-08-22 22:45:44.000000000 +0200
@@ -564,7 +564,7 @@
       index_files = shelljoin(index_file) + ' '
       index_files.concat(@alt_index_files.join(' '))
 
-      open("| sort #{index_files}") do |f|
+      open("| sort #{index_files}", 'r:utf-8') do |f|
 	f.each_with_index do |line, i|
 	  lineno = i + 1

or maybe using 'rb' instead of 'r:utf-8'


Anyway there is a more worrying (to me) problem: trying to upgrade some ports 
(e.g. devel/apache-ant) I get this:
# portupgrade -Rp devel/apache-ant
[Gathering depends for devel/apache-ant 
................................................. done]
[Exclude up-to-date packages 
................................................................... done]
** No origin recorded: ["icu-4.8.1"]
** Specify one with -o option, or run 'pkgdb -F' to interactively fix it.
/usr/local/lib/ruby/site_ruby/1.9/pkgtools.rb:953:in `initialize': 
ArgumentError (ArgumentError)
	from /usr/local/sbin/portupgrade:1004:in `new'
	from /usr/local/sbin/portupgrade:1004:in `rescue in do_upgrade'
	from /usr/local/sbin/portupgrade:1007:in `do_upgrade'
	from /usr/local/sbin/portupgrade:814:in `block (2 levels) in main'
	from /usr/local/sbin/portupgrade:810:in `each'
	from /usr/local/sbin/portupgrade:810:in `block in main'
	from /usr/local/lib/ruby/1.9/optparse.rb:799:in `initialize'
	from /usr/local/sbin/portupgrade:231:in `new'
	from /usr/local/sbin/portupgrade:231:in `main'
	from /usr/local/sbin/portupgrade:2219:in `<main>'

while it works without -R. (and this is not the only port).
I wasn't seeing such an error since very long time, and as far as I can 
remember it was fixed at a certain point in time!!!
Running 'pkgdb -F' does nothing.

Finally, /usr/ports/Tools/script/plist isn't working anymore, throwing the 
following two lines:
/usr/ports/Tools/scripts/plist:56: Invalid next
/usr/ports/Tools/scripts/plist: compile error (SyntaxError)
But ATM I'm too sleepy to figure out how to fix it.

Barbara




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