backend/server/rhnSQL/driver_postgresql.py | 5 +++++ backend/spacewalk-backend.spec | 5 ++++- rel-eng/packages/spacewalk-backend | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)
New commits: commit b3329d8e1cbcec435b97cd813cf925ae09b25c73 Author: Michael Mraka michael.mraka@redhat.com Date: Fri Feb 4 10:10:37 2011 +0100
Automatic commit of package [spacewalk-backend] release [1.3.55-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec index 81ccff3..ee337e8 100644 --- a/backend/spacewalk-backend.spec +++ b/backend/spacewalk-backend.spec @@ -11,7 +11,7 @@ Name: spacewalk-backend Summary: Common programs needed to be installed on the Spacewalk servers/proxies Group: Applications/Internet License: GPLv2 and Python -Version: 1.3.54 +Version: 1.3.55 Release: 1%{?dist} URL: https://fedorahosted.org/spacewalk Source0: https://fedorahosted.org/releases/s/p/spacewalk/%%7Bname%7D-%%7Bversion%7D.t... @@ -684,6 +684,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$ %changelog +* Fri Feb 04 2011 Michael Mraka michael.mraka@redhat.com 1.3.55-1 +- fixed postgresql failure on RHEL6 + * Thu Feb 03 2011 Michael Mraka michael.mraka@redhat.com 1.3.54-1 - shortened and narrowed package sync logic - moved checksum logic into ContentPackage diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend index 9432ec6..71a16a1 100644 --- a/rel-eng/packages/spacewalk-backend +++ b/rel-eng/packages/spacewalk-backend @@ -1 +1 @@ -1.3.54-1 backend/ +1.3.55-1 backend/
commit ce18a71a935d610fb00209c397d57a331b8e3fac Author: Michael Mraka michael.mraka@redhat.com Date: Fri Feb 4 10:07:44 2011 +0100
fixed postgresql failure on RHEL6
addressing ERROR: unhandled exception occurred: Traceback (most recent call last): File "/usr/bin/rhn-satellite-activate", line 43, in <module> sys.exit(abs(mod.main() or 0)) File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/rhn_satellite_activate.py", line 584, in main username=db_user, password=db_password, database=database) File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py", line 121, in initDB __init__DB(backend, host, port, username, password, database) File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/__init__.py", line 52, in __init__DB __DB.connect() File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 169, in connect return self.connect(reconnect=0) File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 174, in connect [self.database, e.pgcode, e.pgerror, "Attempting Re-Connect to the database failed",]) AttributeError: 'exceptions.AttributeError' object has no attribute 'pgcode' (cherry picked from commit e5cb31a510d620e05509da7f50634aa0a3798989)
diff --git a/backend/server/rhnSQL/driver_postgresql.py b/backend/server/rhnSQL/driver_postgresql.py index e781b21..2e9f02d 100644 --- a/backend/server/rhnSQL/driver_postgresql.py +++ b/backend/server/rhnSQL/driver_postgresql.py @@ -22,6 +22,11 @@ import re import psycopg2 import hashlib
+# workaround for python-psycopg2 = 2.0.13 (RHEL6) +# which does not import extensions by default +if not hasattr(psycopg2, 'extensions'): + import psycopg2.extensions + import sql_base from spacewalk.server import rhnSQL from spacewalk.server.rhnSQL import sql_types