Relocate python-psycopg2 to stx-integ/database/python-psycopg2
Move content from stx-gplv3 into stx-integ Packages will be relocated to stx-integ: base/ anaconda crontabs dnsmasq rsync database/ python-psycopg2 filesystem/ parted grub/ grub2 security/ python-keyring Change-Id: I576ac689eb3f25936452bee7833a0b3d30a27780 Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
parent
62a26021ee
commit
9f65539a66
@ -1,4 +1,3 @@
|
|||||||
python-psycopg2
|
|
||||||
crontabs
|
crontabs
|
||||||
parted
|
parted
|
||||||
python-keyring
|
python-keyring
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
TIS_PATCH_VER=2
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
setup-spec-for-tis.patch
|
|
||||||
meta-patch0.patch
|
|
@ -1,33 +0,0 @@
|
|||||||
From f964faeb50150b64ed2481f721e544f4c3e2ca55 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Al Bailey <al.bailey@windriver.com>
|
|
||||||
Date: Tue, 29 Nov 2016 15:06:32 -0500
|
|
||||||
Subject: [PATCH 1/1] meta patch0
|
|
||||||
|
|
||||||
---
|
|
||||||
SPECS/python-psycopg2.spec | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/SPECS/python-psycopg2.spec b/SPECS/python-psycopg2.spec
|
|
||||||
index 2489fc5..c11a680 100644
|
|
||||||
--- a/SPECS/python-psycopg2.spec
|
|
||||||
+++ b/SPECS/python-psycopg2.spec
|
|
||||||
@@ -36,6 +36,8 @@ Url: http://www.psycopg.org/psycopg/
|
|
||||||
|
|
||||||
Source0: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-%{version}.tar.gz
|
|
||||||
|
|
||||||
+Patch0: Manually-patch-170-173-187-and-187-fix.patch
|
|
||||||
+
|
|
||||||
BuildRequires: postgresql-devel
|
|
||||||
BuildRequires: python-devel
|
|
||||||
BuildRequires: python-debug
|
|
||||||
@@ -103,6 +105,7 @@ Zope Database Adapter for PostgreSQL, called ZPsycopgDA
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q -n psycopg2-%{version}
|
|
||||||
+%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
|
||||||
for python in %{python_runtimes} ; do
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 78314a11e44751d23da70c5b935c73579650a2bd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Al Bailey <al.bailey@windriver.com>
|
|
||||||
Date: Tue, 29 Nov 2016 14:29:21 -0500
|
|
||||||
Subject: [PATCH 1/1] Setup spec for Titanium Cloud
|
|
||||||
|
|
||||||
---
|
|
||||||
SPECS/python-psycopg2.spec | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/SPECS/python-psycopg2.spec b/SPECS/python-psycopg2.spec
|
|
||||||
index 8492914..2489fc5 100644
|
|
||||||
--- a/SPECS/python-psycopg2.spec
|
|
||||||
+++ b/SPECS/python-psycopg2.spec
|
|
||||||
@@ -28,7 +28,7 @@
|
|
||||||
Summary: A PostgreSQL database adapter for Python
|
|
||||||
Name: python-psycopg2
|
|
||||||
Version: 2.5.1
|
|
||||||
-Release: 3%{?dist}
|
|
||||||
+Release: 3.el7%{?_tis_dist}.%{tis_patch_ver}
|
|
||||||
# The exceptions allow linking to OpenSSL and PostgreSQL's libpq
|
|
||||||
License: LGPLv3+ with exceptions
|
|
||||||
Group: Applications/Databases
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,96 +0,0 @@
|
|||||||
From 04fe7ce2bed4b20ffa89d12551bd2865d21caec1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Al Bailey <al.bailey@windriver.com>
|
|
||||||
Date: Tue, 29 Nov 2016 14:52:47 -0500
|
|
||||||
Subject: [PATCH 1/1] Manually patch 170,173,187 and 187 fix
|
|
||||||
|
|
||||||
---
|
|
||||||
psycopg/connection_int.c | 7 ++++++-
|
|
||||||
psycopg/error_type.c | 12 ++++++++++--
|
|
||||||
psycopg/lobject_type.c | 15 +++++++++------
|
|
||||||
3 files changed, 25 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c
|
|
||||||
index 7851b0a..5069e64 100644
|
|
||||||
--- a/psycopg/connection_int.c
|
|
||||||
+++ b/psycopg/connection_int.c
|
|
||||||
@@ -642,6 +642,7 @@ static int
|
|
||||||
_conn_poll_connecting(connectionObject *self)
|
|
||||||
{
|
|
||||||
int res = PSYCO_POLL_ERROR;
|
|
||||||
+ const char *msg;
|
|
||||||
|
|
||||||
Dprintf("conn_poll: poll connecting");
|
|
||||||
switch (PQconnectPoll(self->pgconn)) {
|
|
||||||
@@ -656,7 +657,11 @@ _conn_poll_connecting(connectionObject *self)
|
|
||||||
break;
|
|
||||||
case PGRES_POLLING_FAILED:
|
|
||||||
case PGRES_POLLING_ACTIVE:
|
|
||||||
- PyErr_SetString(OperationalError, "asynchronous connection failed");
|
|
||||||
+ msg = PQerrorMessage(self->pgconn);
|
|
||||||
+ if (!(msg && *msg)) {
|
|
||||||
+ msg = "asynchronous connection failed";
|
|
||||||
+ }
|
|
||||||
+ PyErr_SetString(OperationalError, msg);
|
|
||||||
res = PSYCO_POLL_ERROR;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
diff --git a/psycopg/error_type.c b/psycopg/error_type.c
|
|
||||||
index 106b87a..75761e8 100644
|
|
||||||
--- a/psycopg/error_type.c
|
|
||||||
+++ b/psycopg/error_type.c
|
|
||||||
@@ -163,8 +163,16 @@ psyco_error_reduce(errorObject *self)
|
|
||||||
if (2 != PyTuple_GET_SIZE(tuple)) { goto exit; }
|
|
||||||
|
|
||||||
if (!(dict = PyDict_New())) { goto error; }
|
|
||||||
- if (0 != PyDict_SetItemString(dict, "pgerror", self->pgerror)) { goto error; }
|
|
||||||
- if (0 != PyDict_SetItemString(dict, "pgcode", self->pgcode)) { goto error; }
|
|
||||||
+ if (self->pgerror) {
|
|
||||||
+ if (0 != PyDict_SetItemString(dict, "pgerror", self->pgerror)) {
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ if (self->pgcode) {
|
|
||||||
+ if (0 != PyDict_SetItemString(dict, "pgcode", self->pgcode)) {
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
{
|
|
||||||
PyObject *newtuple;
|
|
||||||
diff --git a/psycopg/lobject_type.c b/psycopg/lobject_type.c
|
|
||||||
index fee11c4..823a1b7 100644
|
|
||||||
--- a/psycopg/lobject_type.c
|
|
||||||
+++ b/psycopg/lobject_type.c
|
|
||||||
@@ -355,9 +355,11 @@ lobject_dealloc(PyObject* obj)
|
|
||||||
{
|
|
||||||
lobjectObject *self = (lobjectObject *)obj;
|
|
||||||
|
|
||||||
- if (lobject_close(self) < 0)
|
|
||||||
- PyErr_Print();
|
|
||||||
- Py_XDECREF((PyObject*)self->conn);
|
|
||||||
+ if (self->conn) { /* if not, init failed */
|
|
||||||
+ if (lobject_close(self) < 0)
|
|
||||||
+ PyErr_Print();
|
|
||||||
+ Py_XDECREF((PyObject*)self->conn);
|
|
||||||
+ }
|
|
||||||
PyMem_Free(self->smode);
|
|
||||||
|
|
||||||
Dprintf("lobject_dealloc: deleted lobject object at %p, refcnt = "
|
|
||||||
@@ -372,10 +374,11 @@ lobject_init(PyObject *obj, PyObject *args, PyObject *kwds)
|
|
||||||
int oid = (int)InvalidOid, new_oid = (int)InvalidOid;
|
|
||||||
const char *smode = "";
|
|
||||||
const char *new_file = NULL;
|
|
||||||
- PyObject *conn;
|
|
||||||
+ PyObject *conn = NULL;
|
|
||||||
|
|
||||||
- if (!PyArg_ParseTuple(args, "O|iziz",
|
|
||||||
- &conn, &oid, &smode, &new_oid, &new_file))
|
|
||||||
+ if (!PyArg_ParseTuple(args, "O!|iziz",
|
|
||||||
+ &connectionType, &conn,
|
|
||||||
+ &oid, &smode, &new_oid, &new_file))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return lobject_setup((lobjectObject *)obj,
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
mirror:Source/python-psycopg2-2.5.1-3.el7.src.rpm
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user