ports/161925: databases/p5-Dancer-Plugin-Redis: Fixed reconnect function
Grzegorz Blach
magik at roorback.net
Sun Oct 23 09:40:10 UTC 2011
>Number: 161925
>Category: ports
>Synopsis: databases/p5-Dancer-Plugin-Redis: Fixed reconnect function
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 23 09:40:09 UTC 2011
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list