Package: aolserver4-nspostgres
Version: 4.5+20110709-1
Followup-For: Bug #743074
User: [email protected]
Usertags: origin-ubuntu trusty ubuntu-patch
Dear Maintainer,
on a rebuild of this package regarding the coming up release of Ubuntu, an
FTBFS was detected
in this package.
*** /tmp/tmpFZwuuF/bug_body
In Ubuntu, the attached patch was applied to fix the FTBFS. Details about
changes done in
Ubuntu follows:
* Fixed FTBFS from using deprecated structure access of
Tcl_interp (LP: #1303405)
- nspostgres.c: replaces direct access of result field in
Tlc_interp structure with API functions Tcl_GetStringResult
and Tcl_SetString.
Thanks for considering the patch.
-- System Information:
Debian Release: wheezy/sid
APT prefers saucy-updates
APT policy: (500, 'saucy-updates'), (500, 'saucy-security'), (500, 'saucy'),
(100, 'saucy-backports')
Architecture: i386 (i686)
Kernel: Linux 3.11.0-19-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
=== modified file 'debian/changelog'
=== added directory 'debian/patches'
=== added file 'debian/patches/deprecated-tclinterp-result-access'
--- debian/patches/deprecated-tclinterp-result-access 1970-01-01 00:00:00 +0000
+++ debian/patches/deprecated-tclinterp-result-access 2014-04-06 17:18:22 +0000
@@ -0,0 +1,61 @@
+Description: Uses API functions to access result in Tcl_interp.
+ Replaces deprecated direct access of field result in Tcl_interp structure
+ with Tcl_GetStringResult / Tcl_SetResult fixing FTBFS.
+Author: Sebastian Carneiro <[email protected]>
+Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
+Bug-Debian: https://bugs.debian.org/743074
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1303405
+Forwarded: yes
+Last-Update: 2014-04-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: fix-for-ftbfs/nspostgres.c
+===================================================================
+--- fix-for-ftbfs.orig/nspostgres.c 2014-04-06 00:32:53.467854019 -0300
++++ fix-for-ftbfs/nspostgres.c 2014-04-06 00:35:35.420657098 -0300
+@@ -31,6 +31,7 @@
+
+ #include "nspostgres.h"
+ #include <tcl.h>
++#include <tclDecls.h>
+
+ DllExport int Ns_ModuleVersion = 1;
+
+@@ -1760,6 +1761,8 @@
+ return TCL_ERROR;
+ }
+
++ char * interp_result = Tcl_GetStringResult(interp);
++
+ if (!strcmp(argv[1], "db")) {
+ Tcl_SetResult(interp, (char *) PQdb(nspgConn->conn), TCL_STATIC);
+ } else if (!strcmp(argv[1], "host")) {
+@@ -1769,15 +1772,15 @@
+ } else if (!strcmp(argv[1], "port")) {
+ Tcl_SetResult(interp, (char *) PQport(nspgConn->conn), TCL_STATIC);
+ } else if (!strcmp(argv[1], "number")) {
+- sprintf(interp->result, "%u", nspgConn->cNum);
++ sprintf(interp_result, "%u", nspgConn->cNum);
+ } else if (!strcmp(argv[1], "error")) {
+ Tcl_SetResult(interp, (char *) PQerrorMessage(nspgConn->conn),
+ TCL_STATIC);
+ } else if (!strcmp(argv[1], "status")) {
+ if (PQstatus(nspgConn->conn) == CONNECTION_OK) {
+- interp->result = "ok";
++ Tcl_SetResult(interp, "ok", TCL_VOLATILE);
+ } else {
+- interp->result = "bad";
++ Tcl_SetResult(interp, "bad", TCL_VOLATILE);
+ }
+ } else if (!strcmp(argv[1], "ntuples")) {
+ char string[16];
+@@ -1982,7 +1985,8 @@
+ argv[0], " ", argv[1], " dbId table\"", NULL);
+ goto bailout;
+ }
+- sprintf (interp->result, "%d", tinfo->ncolumns);
++ char * interp_result = Tcl_GetStringResult(interp);
++ sprintf (interp_result, "%d", tinfo->ncolumns);
+
+ }
+ else if (!strcmp(argv[1], "exists"))
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2014-04-05 13:21:08 +0000
@@ -0,0 +1 @@
+deprecated-tclinterp-result-access
=== added directory 'debian/source'
=== added file 'debian/source/format'
--- debian/source/format 1970-01-01 00:00:00 +0000
+++ debian/source/format 2014-04-05 10:37:33 +0000
@@ -0,0 +1 @@
+3.0 (quilt)