ports/140273: ports-mgmt/portupgrade-devel chokes on bsdpan pkgs
Steve Wills
swills at FreeBSD.org
Sun Aug 21 18:51:15 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/21/11 14:18, Steve Wills wrote:
> On 08/21/11 13:30, Fabian Wenk wrote:
>> The following reply was made to PR ports/140273; it has been noted by GNATS.
>
>> From: Fabian Wenk <fabian at wenks.ch>
>> To: bug-followup at FreeBSD.org
>> Cc: dokas at oitsec.umn.edu
>> Subject: Re: ports/140273: ports-mgmt/portupgrade-devel chokes on bsdpan pkgs
>> Date: Sun, 21 Aug 2011 19:21:47 +0200
>
>> Hello
>
>> This is still not fixed even with portupgrade-2.4.9,2 and gives
>> the same error. I'm running on FreeBSD 7.3-RELEASE-p4 amd64. All
>> Ports are current as of today.
>
>> root at batman:/usr/ports# portupgrade -an
>> ---> Session started at: Sun, 21 Aug 2011 18:24:39 +0200
>> ---> Skipping 'bsdpan-Bot-Pastebot-0.52' because it is held by
>> user (specify -f to force)
>> ---> Session ended at: Sun, 21 Aug 2011 18:25:21 +0200 (consumed
>> 00:00:41)
>> /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>'
>> root at batman:/usr/ports#
>
>
> If you're using Ruby 1.9, give this patch a try.
>
> Steve
>
Replying to myself, but here are patches which may fix the issue even
with Ruby 1.8. Please give them a try. Just mkdir
/usr/ports/ports-mgmt/portupgrade/files then drop these into that dir
then reinstall portupgrade.
Steve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)
iQEcBAEBAgAGBQJOUVOfAAoJEPXPYrMgexuhbbkH/AkZJNPtUeg0IlUuZgtPgdll
6RdUiYCXPXc5eJyA6MIy+VCYV1QwVdDTvUcG73PKHXdHvZEfeI3gEBu2gv3+2U3k
etqz3locNO3cweU/f0OUCtlkMVBSYjGIJahZ4aphMKjaKH589aQy/06fVD2BqehD
ElrqLgwtwpAIE3I0IfVODaUv/IAd4GHJH98gRpiEoRQiMDySbl9Pr+mN9F4QJrnd
/ktP3WZuKwOIj7OEtugtkOyK1Sk0zfgbOaGPHfLy+49++e8dKjNCGgnpXOnTRBEI
PdOOHl3j8wCWWS016v9svEmFDrz47cdR3SK+bNvlga1rXSaW/7SCyWHWo7ZVR+4=
=yGdC
-----END PGP SIGNATURE-----
-------------- next part --------------
--- ./lib/portsdb.rb.orig 2011-08-21 14:38:09.000000000 +0000
+++ ./lib/portsdb.rb 2011-08-21 14:38:42.000000000 +0000
@@ -31,7 +31,7 @@
require 'singleton'
require 'tempfile'
begin
- require 'features/ruby18/file'
+ require 'features/file'
rescue LoadError; end
require 'pkgmisc'
require 'pkgdbtools'
-------------- next part --------------
--- ./lib/pkginfo.rb.orig 2008-01-08 11:32:27.000000000 +0000
+++ ./lib/pkginfo.rb 2011-08-21 14:39:13.000000000 +0000
@@ -30,7 +30,7 @@
require 'pkgdb'
require 'pkgversion'
begin
- require 'features/ruby18/file'
+ require 'features/file'
rescue LoadError; end
class PkgInfo
-------------- next part --------------
--- ./lib/pkgmisc.rb.orig 2011-08-21 14:39:13.000000000 +0000
+++ ./lib/pkgmisc.rb 2011-08-21 14:40:57.000000000 +0000
@@ -28,8 +28,8 @@
# $FreeBSD: projects/pkgtools/lib/pkgmisc.rb,v 1.12 2011-07-25 12:34:43 swills Exp $
begin
- require 'features/ruby18/dir' # for Dir.chdir(dir) { ... }
- require 'features/ruby18/enum' # Enumerable#any?, etc.
+ require 'features/dir' # for Dir.chdir(dir) { ... }
+ require 'features/enum' # Enumerable#any?, etc.
rescue LoadError
end
@@ -100,12 +100,6 @@
}.join(' ')
end
-class File
- def File.realpath(path)
- return File.expand_path(path)
- end
-end
-
def init_tmpdir
if ! $tmpdir.nil? && $tmpdir != "" then
return
-------------- next part --------------
--- ./lib/pkgtools.rb.orig 2011-08-21 14:37:50.000000000 +0000
+++ ./lib/pkgtools.rb 2011-08-21 14:38:38.000000000 +0000
@@ -31,8 +31,8 @@
Version = "2.4.9"
begin
- require 'features/ruby18/file'
- require 'features/ruby18/enumerable'
+ require 'features/file'
+ require 'features/enumerable'
rescue LoadError
if !File.respond_to?(:fnmatch?)
if ENV['RUBY_STATIC']
-------------- next part --------------
--- ./bin/portupgrade.orig 2011-07-25 12:34:43.000000000 +0000
+++ ./bin/portupgrade 2011-08-21 14:39:13.000000000 +0000
@@ -634,7 +634,7 @@
get_all_depends(origin).each do |d|
newdep = $pkgdb.deorigin(d)
unless newdep.nil? then
- dep << newdep.to_s
+ dep << newdep.join
end
end
depends |= dep if $upward_recursive
@@ -995,6 +995,10 @@
$package_tasks << key if deps.include?(pkgname)
end
end
+ else
+ # maybe held?
+ upgraded = false
+ return false
end
$results << PkgResult.new(origin, result ? :done : :ignored, pkgname)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-lib__portsdb.rb.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ruby/attachments/20110821/b9ba7ec0/patch-lib__portsdb.rb.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-lib__pkginfo.rb.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ruby/attachments/20110821/b9ba7ec0/patch-lib__pkginfo.rb.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-lib__pkgmisc.rb.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ruby/attachments/20110821/b9ba7ec0/patch-lib__pkgmisc.rb.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-lib__pkgtools.rb.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ruby/attachments/20110821/b9ba7ec0/patch-lib__pkgtools.rb.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-bin__portupgrade.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ruby/attachments/20110821/b9ba7ec0/patch-bin__portupgrade.obj
More information about the freebsd-ruby
mailing list