[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#420477: kexi: Please rebuild against the new libpqxx



Bcc control@bugs.debian.org
Date: Sun, 22 Apr 2007 20:06:57 +0100
In-Reply-To: <[🔎] 200704221829.36818.debian@pusling.com> (Sune Vuorela's message
	of "Sun, 22 Apr 2007 18:29:31 +0200")
Message-ID: <87mz10jkj2.fsf@hardknott.home>
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Transfer-Encoding: quoted-printable

tags 420477 + patch
thanks

Sune Vuorela <debian@pusling.com> writes:

> On Sunday 22 April 2007, Roger Leigh wrote:
>> kexi in koffice is currently build-depending on libpqxx-dev in order
>> to link with libpqxx.
>>
>> This bug is just to inform you that the current version of libpqxx
>> (2.6.8) is being replaced by a new version (2.6.9), which will result
>> in a soname change, requiring a rebuild.  libpqxx_2.6.9 will be in
>> NEW shortly, so it should be in the archive and built on all arches
>> within a week or so.  If you could rebuild after that time, I would
>> be very grateful.
>
> Is there any API-changes involved? or only a ABI-change ?

The attached patch will allow kexi to build with the current libpqxx.
This patch uses more modern versions of obsoleted features such as
sqlesc(), but note that these are also deprecated!  It really needs to
use the esc() transaction method.  kexi is using the API from at least
two major revisions ago.  This is something upstream needs to address!

My fixes are also likely to be obsoleted, perhaps in the next major
revision in a year or so, so updating to the latest API is highly
recommended for the future.  With my fix in place, it will continue to
build on both new and old versions of libpqxx for the time being.


Note that a build error prevented me building the whole package and
testing it:

 g++ -DHAVE_CONFIG_H -I. -I/tmp/koffice-1.6.1/./lib/kross/ruby -I../../.. -=
I/tmp
/koffice-1.6.1/./lib/kross -I/usr/lib/ruby/1.8/powerpc-linux -I/usr/include=
/kde
=2DI/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-l=
ong -Wu
ndef -ansi -D_XOPEN_SOURCE=3D500 -D_BSD_SOURCE -Wcast-align -Wconversion -W=
char-su
bscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -Wall -O2 -Wfo=
rmat-
security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -=
fno-c
heck-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -D=
QT_NO
_COMPAT -DQT_NO_TRANSLATION -DHAVE_KNEWSTUFF -fexceptions -c krossruby_la.a=
ll_cp
p.cpp  -fPIC -DPIC -o .libs/krossruby_la.all_cpp.o
/usr/include/unistd.h:266: error: declaration of 'int eaccess(const char*, =
int)
throw ()' throws different exceptions
/usr/lib/ruby/1.8/powerpc-linux/missing.h:43: error: from previous declarat=
ion '
int eaccess(const char*, int)'

This looks like a Ruby error due to the recent glibc update, rather
than a koffice bug...


Regards,
Roger

=2D-=20
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=koffice-pqxx.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: koffice patch to use newer libpqxx API

=2D-- koffice-1.6.1.original/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp	20=
06-11-17 15:03:25.000000000 +0000
+++ /tmp/koffice-1.6.1/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp	2007-04-=
22 19:25:36.871419622 +0100
@@ -277,7 +277,7 @@
 		//		m_trans =3D new pqxx::nontransaction(*m_pqxxsql);
 //		KexiDBDrvDbg << "About to execute" << endl;
 		//Create a result object through the transaction
=2D		d->res =3D new pqxx::result(m_trans->data->exec(statement.utf8()));
+		d->res =3D new pqxx::result(m_trans->data->exec(std::string(statement.ut=
f8())));
 //		KexiDBDrvDbg << "Executed" << endl;
 		//Commit the transaction
 		if (implicityStarted) {
=2D-- koffice-1.6.1.original/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h	20=
06-11-17 15:03:25.000000000 +0000
+++ /tmp/koffice-1.6.1/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h	2007-04-=
22 19:10:21.528874786 +0100
@@ -31,7 +31,7 @@
 #define PQXXSQLCONNECTIONINTERNAL_H
=20
 #include <kexidb/connection_p.h>
=2D#include <pqxx/all.h>
+#include <pqxx/pqxx>
=20
 namespace KexiDB
 {
=2D-- koffice-1.6.1.original/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp	2006-1=
1-17 15:03:25.000000000 +0000
+++ /tmp/koffice-1.6.1/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp	2007-04-22 1=
9:24:23.989970251 +0100
@@ -155,7 +155,7 @@
 			m_implicityStarted =3D true;
 		}
=20
=2D		m_res =3D new pqxx::result(((pqxxSqlConnection*)connection())->m_trans=
->data->exec(m_sql.utf8()));
+		m_res =3D new pqxx::result(((pqxxSqlConnection*)connection())->m_trans->=
data->exec(std::string(m_sql.utf8())));
 		((pqxxSqlConnection*)connection())
 			->drv_commitTransaction(((pqxxSqlConnection*)connection())->m_trans);
 //		my_conn->m_trans->commit();
=2D-- koffice-1.6.1.original/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp	2006-1=
1-17 15:03:25.000000000 +0000
+++ /tmp/koffice-1.6.1/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp	2007-04-22 1=
9:14:33.785820008 +0100
@@ -133,14 +133,14 @@
 //
 QString pqxxSqlDriver::escapeString( const QString& str) const
 {
=2D    return QString(pqxx::Quote(str.ascii()).c_str());
+    return QString(pqxx::sqlesc(str.ascii()).c_str());
 }
=20
 //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
 //
 QCString pqxxSqlDriver::escapeString( const QCString& str) const
 {
=2D    return QCString(pqxx::Quote(QString(str).ascii()).c_str());
+    return QCString(pqxx::sqlesc(QString(str).ascii()).c_str());
 }
=20
 //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
=2D-- koffice-1.6.1.original/kexi/migration/pqxx/pqxxmigrate.h	2006-11-17 1=
5:02:36.000000000 +0000
+++ /tmp/koffice-1.6.1/kexi/migration/pqxx/pqxxmigrate.h	2007-04-22 19:35:0=
2.348508333 +0100
@@ -26,7 +26,7 @@
 #include <kexidb/field.h>
 #include <kexidb/connection.h>
=20
=2D#include <pqxx/all.h>
+#include <pqxx/pqxx>
=20
 namespace KexiMigration
 {

--=-=-=--

--==-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGK7JUVcFcaSW/uEgRAtdbAKDs6Jxk7nzKm2uavpNhts5+zMmPNgCcCoWd
WqZ+d8JxmfSG7SsDO9rcuLk=
=M1eR
-----END PGP SIGNATURE-----
--==-=-=--



Reply to: