From yasu@home.utahime.org  Mon Jan  6 00:18:19 2014
Return-Path: <yasu@home.utahime.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id B58B72AD
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Jan 2014 00:18:19 +0000 (UTC)
Received: from gate.utahime.jp (ipq210.utahime.jp [183.180.29.210])
	by mx1.freebsd.org (Postfix) with ESMTP id 811561219
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Jan 2014 00:18:17 +0000 (UTC)
Received: from eastasia.home.utahime.org (eastasia.home.utahime.org [192.168.174.1])
	by gate.utahime.jp (Postfix) with ESMTP id 6214561F9D;
	Mon,  6 Jan 2014 09:10:52 +0900 (JST)
Received: from eastasia.home.utahime.org (localhost [127.0.0.1])
	by localhost-backdoor.home.utahime.org (Postfix) with ESMTP id 36BB24E632;
	Mon,  6 Jan 2014 09:10:52 +0900 (JST)
Received: from rolling-vm-freebsd2.home.utahime.org (rolling-vm-freebsd2.home.utahime.org [192.168.174.54])
	by eastasia.home.utahime.org (Postfix) with ESMTP id 122544E62C;
	Mon,  6 Jan 2014 09:10:52 +0900 (JST)
Received: by rolling-vm-freebsd2.home.utahime.org (Postfix, from userid 1000)
	id EECB718A133; Mon,  6 Jan 2014 09:10:51 +0900 (JST)
Message-Id: <20140106001051.EECB718A133@rolling-vm-freebsd2.home.utahime.org>
Date: Mon,  6 Jan 2014 09:10:51 +0900 (JST)
From: Yasuhiro KIMURA <yasu@utahime.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] ports-mgmt/portupgrade: use ruby-bdb with ruby 2.0 again
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         185523
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/portupgrade: use ruby-bdb with ruby 2.0 again
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bdrewery
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 06 00:20:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Sat Mar 22 10:40:00 UTC 2014
>Originator:     Yasuhiro KIMURA
>Release:        FreeBSD 10.0-RC3 amd64
>Organization:
>Environment:
System: FreeBSD xxxx 10.0-RC3 FreeBSD 10.0-RC3 #0 r259804: Tue Dec 24 13:24:02 JST 2013 xxxx amd64


	
>Description:
	
	Use ruby-bdb with ruby 2.0 again because breakage is fixed.

>How-To-Repeat:
	
>Fix:

	

--- patch-portupgrade begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 338831)
+++ Makefile	(working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=	portupgrade
 PORTVERSION=	2.4.12
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	SF/portupgrade/pkgtools/dist/ \
@@ -38,11 +39,8 @@
 INSTALL_TARGET+=	install-doc
 .endif
 
-# Reported that ruby-bdb is BROKEN with 2.0
-.if ${RUBY_VER} != 2.0
 # For PKG_DBDRIVER={bdb_btree,bdb_hash}
 RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb
-.endif
 
 # Need to install working script(1)
 .if ${OSVERSION} < 801000
--- patch-portupgrade ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bdrewery 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jan 6 00:20:08 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185523 

From: Yasuhiro KIMURA <yasu@utahime.org>
To: bdrewery@FreeBSD.org
Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Subject: Re: ports/185523: [PATCH] ports-mgmt/portupgrade: use ruby-bdb
 with ruby 2.0 again
Date: Sat, 08 Feb 2014 17:39:22 +0900 (JST)

 Hello,
 
 Would you please commit this PR?
 
 Best Regards.
 
 ---
 Yasuhiro KIMURA

From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Yasuhiro KIMURA <yasu@utahime.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/185523: [PATCH] ports-mgmt/portupgrade: use ruby-bdb with
 ruby 2.0 again
Date: Sat, 08 Feb 2014 08:23:55 -0600

 On 2/8/2014 2:39 AM, Yasuhiro KIMURA wrote:
 > Hello,
 > 
 > Would you please commit this PR?
 > 
 > Best Regards.
 > 
 > ---
 > Yasuhiro KIMURA
 > 
 
 Do you have evidence that the issue was fixed and that it didn't just
 'work for you'?
 
 I had many reports of portsdb -u and pkgdb -u crashing.
 
 -- 
 Regards,
 Bryan Drewery

From: Yasuhiro KIMURA <yasu@utahime.org>
To: Bryan Drewery <bdrewery@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/185523: [PATCH] ports-mgmt/portupgrade: use ruby-bdb with
 ruby 2.0 again
Date: Sat, 22 Mar 2014 18:27:46 +0900

 This is a multi-part message in MIME format.
 --------------080109000404030304050806
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hello Bryan, and sorry for very late response.
 
 (2014/02/08 23:23), Bryan Drewery wrote:
 > Do you have evidence that the issue was fixed and that it didn't just
 > 'work for you'?
 >
 > I had many reports of portsdb -u and pkgdb -u crashing.
 
 I thought dependency to ruby-bdb was removed when ruby is 2.0 because 
 ruby-bdb couldn't be built with ruby 2.0. But later the breakage was 
 fixed and now it can be build with ruby 2.0. That was why I submitted 
 this PR.
 
 But futher later lang/ruby21 was connected to port tree. And I found 
 ruby-bdb fails to build with it. I changed Makefile of portupgrade port 
 so it doesn't depend on ruby-bdb if ruby21 is used, and installed both 
 ruby21 and portupgrade to some of FreeBSD machines I maintain. Then I 
 faced annoying problem as following:
 
 There are two 10.0-RELEASE machines. One is for regular operation and 
 the other is for testing. From now on I call the formar 'REGULAR' and 
 the latter 'TESTING'. Both REGULAR and TESTING shares ports tree with 
 NFS which exists on another file server. I upgrade TESTING to 
 lang/ruby21 while staying REGULAR to lang/rub19. As a result on TESTING 
 database/ruby-bdb is not installed and portupgrade uses bdb in base 
 system while on REGULAR ruby-bdb is installed and portupgrade uses bdb 
 in ports. And this is the cause of problem.
 
 Now I update ports tree and /usr/ports/INDEX-10 on file server, then 
 login to REGULAR and execute 'portversion -vL ='. Since INDEX file is 
 updated /usr/ports/INDEX-10.db is rebuilt at first and then some 
 outdated ports are displayed if exists. I may execute 'portupgrade -a' 
 to update these outdated ports. Next I login to TESTING and execute 
 'portversion -vL=' in the same way, and then the problem happens.
 Since INDEX-10 is not updated, this time there is no need to rebuild 
 INDEX-10.db. However data format of db file is imcompatible between bdb 
 in base system and one in ports. So portversion complains INDEX-10.db is 
 broken and rebuild it again before showing outdated ports.
 
 Such rebuilding occurs every time when I do something about portupgrade 
 on the other side of two machines, and it is much annoying. Especially 
 for my case because , though I don't know why this happens, rebuilding 
 .db file on NFS takes much longer time than rebulding on local file system.
 
 Therefore now I think dependency to databases/ruby-bdb should be removed 
 from portupgrade regardless of which version of ruby is used.
 So if you agree with me please commit attached patch instead of original 
 one.
 
 Best Regards.
 
 ---
 Yasuhiro KIMURA
 
 
 --------------080109000404030304050806
 Content-Type: text/plain; charset=Shift_JIS;
  name="patch-portupgrade"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch-portupgrade"
 
 Index: ports-mgmt/portupgrade/Makefile
 ===================================================================
 --- ports-mgmt/portupgrade/Makefile	(revision 348724)
 +++ ports-mgmt/portupgrade/Makefile	(working copy)
 @@ -38,12 +38,6 @@
  INSTALL_TARGET+=	install-doc
  .endif
  
 -# Reported that ruby-bdb is BROKEN with 2.0
 -.if ${RUBY_VER} != 2.0
 -# For PKG_DBDRIVER={bdb_btree,bdb_hash}
 -RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb
 -.endif
 -
  # Need to install working script(1)
  .if ${OSVERSION} < 801000
  PLIST_SUB+=	SCRIPT=""
 Index: ports-mgmt/portupgrade-devel/Makefile
 ===================================================================
 --- ports-mgmt/portupgrade-devel/Makefile	(revision 348724)
 +++ ports-mgmt/portupgrade-devel/Makefile	(working copy)
 @@ -39,11 +39,6 @@
  INSTALL_TARGET+=	install-doc
  .endif
  
 -# Reported that ruby-bdb is BROKEN with 2.0
 -.if ${RUBY_VER} != 2.0
 -RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb
 -.endif
 -
  # Need to install working script(1)
  .if ${OSVERSION} < 801000
  PLIST_SUB+=	SCRIPT=""
 
 --------------080109000404030304050806--

From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Yasuhiro KIMURA <yasu@utahime.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/185523: [PATCH] ports-mgmt/portupgrade: use ruby-bdb with
 ruby 2.0 again
Date: Sat, 22 Mar 2014 05:30:36 -0500

 On 3/22/2014 4:27 AM, Yasuhiro KIMURA wrote:
 > Therefore now I think dependency to databases/ruby-bdb should be removed
 > from portupgrade regardless of which version of ruby is used.
 > So if you agree with me please commit attached patch instead of original
 > one.
 
 I think I do agree. If I remember correctly this was mostly for 1.8.
 1.9+ had a more reliable builtin bdb I think. I'll need to research and
 test more. Thanks!
 
 Bryan
>Unformatted:
