svn commit: r546343 - in head/net/mpd5: . files

Eugene Grosbein eugen at FreeBSD.org
Thu Aug 27 13:14:35 UTC 2020


Author: eugen
Date: Thu Aug 27 13:14:31 2020
New Revision: 546343
URL: https://svnweb.freebsd.org/changeset/ports/546343

Log:
  net/mpd5: improve logging in rare case of libpdel failure.
  
  Import upstream r2329 and r2373 to direct assertion message to the log.
  See also: https://sourceforge.net/p/mpd/bugs/68/

Added:
  head/net/mpd5/files/patch-write-abortmsg   (contents, props changed)
Modified:
  head/net/mpd5/Makefile

Modified: head/net/mpd5/Makefile
==============================================================================
--- head/net/mpd5/Makefile	Thu Aug 27 13:14:22 2020	(r546342)
+++ head/net/mpd5/Makefile	Thu Aug 27 13:14:31 2020	(r546343)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mpd
 DISTVERSION=	5.8
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	net
 MASTER_SITES=	SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
 PKGNAMESUFFIX=	5

Added: head/net/mpd5/files/patch-write-abortmsg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mpd5/files/patch-write-abortmsg	Thu Aug 27 13:14:31 2020	(r546343)
@@ -0,0 +1,51 @@
+Index: src/log.h
+===================================================================
+--- src/log.h	(revision 2328)
++++ src/log.h	(revision 2329)
+@@ -14,6 +14,10 @@
+ #ifndef _LG_H_
+ #define	_LG_H_
+ 
++#include "mbuf.h"
++
++#include <stdio.h>
++
+ /*
+  * DEFINITIONS
+  */
+Index: src/contrib/libpdel/util/gtree.c
+===================================================================
+--- src/contrib/libpdel/util/gtree.c	(revision 2372)
++++ src/contrib/libpdel/util/gtree.c	(revision 2373)
+@@ -58,6 +58,9 @@
+ #include "util/gtree.h"
+ #include "util/typed_mem.h"
+ 
++#include "defs.h"
++#include "log.h"
++
+ /* Enabled debug tracing: only use this when keys are strings */
+ #define GTREE_TRACE	0
+ 
+@@ -1091,7 +1094,7 @@ gtree_assert(int pred, const char *s, co
+ {
+ 	if (pred)
+ 		return;
+-	printf("FAILURE: %s:%u: %s\n", func, line, s);
++	Perror("FAILURE: %s:%u: %s\n", func, line, s);
+ 	gtree_print(g, stdout);
+ 	kill(getpid(), SIGABRT);
+ }
+Index: src/Makefile
+===================================================================
+--- src/Makefile	(revision 2372)
++++ src/Makefile	(revision 2373)
+@@ -162,7 +162,7 @@ STDSRCS+=	web.c
+ LDADD+=		-lssl
+ .endif
+ 
+-CFLAGS+=	-DNOLIBPDEL -I./contrib/libpdel
++CFLAGS+=	-DNOLIBPDEL -I. -I./contrib/libpdel
+ PDPATH1=	contrib/libpdel/util:contrib/libpdel/structs
+ PDPATH2=	contrib/libpdel/structs/type
+ .if defined ( NOWEB )


More information about the svn-ports-all mailing list