From nobody@FreeBSD.org  Sun Oct 23 09:38:08 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C840106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Oct 2011 09:38:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 722DE8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Oct 2011 09:38:08 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p9N9c82I037452
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Oct 2011 09:38:08 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p9N9c8Kt037451;
	Sun, 23 Oct 2011 09:38:08 GMT
	(envelope-from nobody)
Message-Id: <201110230938.p9N9c8Kt037451@red.freebsd.org>
Date: Sun, 23 Oct 2011 09:38:08 GMT
From: Grzegorz Blach <magik@roorback.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: databases/p5-Dancer-Plugin-Redis: Fixed reconnect function
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         161925
>Category:       ports
>Synopsis:       databases/p5-Dancer-Plugin-Redis: Fixed reconnect function
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    perl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 23 09:40:09 UTC 2011
>Closed-Date:    Tue Nov 01 01:37:02 UTC 2011
>Last-Modified:  Tue Nov  1 01:40:12 UTC 2011
>Originator:     Grzegorz Blach
>Release:        9.0-RC1 amd64
>Organization:
>Environment:
FreeBSD silver.nine 9.0-RC1 FreeBSD 9.0-RC1 #1: Sat Oct 22 17:56:19 CEST 2011     root@silver.nine:/usr/obj/usr/src/sys/SILVER  amd64

>Description:
In databases/p5-Redis method ping() has changed behavior,
now in disconnect state, it return false instead of throwing exception.
http://api.metacpan.org/source/MELO/Redis-1.904/Changes

This cause p5-Dancer-Plugin-Redis to crash on reconnect.
And p5-Dancer-Plugin-Redis wasn't updated upstream yet,
so I attached a lite patch for fix this crash.

>How-To-Repeat:
1. Build simple Dancer app with Redis plugin.
2. Run it and open page which do some database operations.
3. Wait 10 minutes for autodisconnect from db.
4. Try refresh page -> You get uncatched exception in Dancer app

>Fix:
Apply attached patch

Patch attached with submission follows:

diff -ruN /var/cache/pmerge/ports/databases/p5-Dancer-Plugin-Redis/Makefile databases/p5-Dancer-Plugin-Redis/Makefile
--- /var/cache/pmerge/ports/databases/p5-Dancer-Plugin-Redis/Makefile	2011-09-03 22:23:13.000000000 +0200
+++ databases/p5-Dancer-Plugin-Redis/Makefile	2011-10-23 11:12:18.243592679 +0200
@@ -7,6 +7,7 @@
 
 PORTNAME=	Dancer-Plugin-Redis
 PORTVERSION=	0.02
+PORTREVISION=	1
 CATEGORIES=	databases perl5
 MASTER_SITES=	CPAN
 MASTER_SITE_SUBDIR=	CPAN:CSCM
@@ -19,12 +20,17 @@
 LICENSE_COMB=	dual
 
 BUILD_DEPENDS=	p5-Dancer>=1.1750:${PORTSDIR}/www/p5-Dancer \
-		p5-Redis>=0:${PORTSDIR}/databases/p5-Redis
+		p5-Redis>=1.902:${PORTSDIR}/databases/p5-Redis
 RUN_DEPENDS=	p5-Dancer>=1.1750:${PORTSDIR}/www/p5-Dancer \
-		p5-Redis>=0:${PORTSDIR}/databases/p5-Redis
+		p5-Redis>=1.902:${PORTSDIR}/databases/p5-Redis
 
 PERL_CONFIGURE=	yes
 
 MAN3=		Dancer::Plugin::Redis.3
 
+post-patch:
+	@${REINPLACE_CMD} -i'' -e \
+		's/_check_connection($$handle->{dbh})/$$handle->{dbh}->ping/' \
+		${WRKSRC}/lib/Dancer/Plugin/Redis.pm
+
 .include <bsd.port.mk>


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->perl 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Oct 23 09:40:24 UTC 2011 
Responsible-Changed-Why:  
perl@ wants this port PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161925 
State-Changed-From-To: open->closed 
State-Changed-By: clsung 
State-Changed-When: Tue Nov 1 01:37:01 UTC 2011 
State-Changed-Why:  
Committed. Thank You. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/161925: commit references a PR
Date: Tue,  1 Nov 2011 01:36:49 +0000 (UTC)

 clsung      2011-11-01 01:36:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     databases/p5-Dancer-Plugin-Redis Makefile 
   Log:
   - Fixed reconnect function
   - In databases/p5-Redis method ping() has changed behavior,
     now in disconnect state, it return false instead of throwing exception.
     http://api.metacpan.org/source/MELO/Redis-1.904/Changes
   
     This cause p5-Dancer-Plugin-Redis to crash on reconnect.
     And p5-Dancer-Plugin-Redis wasn't updated upstream yet,
     so I attached a lite patch for fix this crash.
   - bump PORTREVISION
   
   PR:             ports/161925
   Submitted by:   maintainer (Grzegorz Blach)
   
   Revision  Changes    Path
   1.2       +8 -2      ports/databases/p5-Dancer-Plugin-Redis/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
