rel-eng/packages/spacewalk-web | 2 +-
web/modules/rhn/RHN/DB.pm | 12 ++++++------
web/spacewalk-web.spec | 5 ++++-
3 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit cc2057dfb2256ac0a6ade69bbbaffe90d076467f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 22 10:32:17 2011 +0100
Automatic commit of package [spacewalk-web] release [1.4.12-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 7b1f24b..da0e041 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-1.4.11-1 web/
+1.4.12-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 63bf23d..95a9d56 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -2,7 +2,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.4.11
+Version: 1.4.12
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -260,6 +260,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Tue Mar 22 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.4.12-1
+- evaluate default_connection in runtime not in use RHN::DB time
+
* Fri Mar 18 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.4.11-1
- fixed package_removal_failures in postgresql
commit 5eb32c8a8ee62334fab40b9fd4bd86eb5a9c56c5
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 22 10:27:39 2011 +0100
evaluate default_connection in runtime not in use RHN::DB time
diff --git a/web/modules/rhn/RHN/DB.pm b/web/modules/rhn/RHN/DB.pm
index 5084c11..ce1c7d0 100644
--- a/web/modules/rhn/RHN/DB.pm
+++ b/web/modules/rhn/RHN/DB.pm
@@ -66,11 +66,7 @@ sub get_dbi_connection_string {
}
}
-$RHN::DB::default_connection = RHN::DB->get_dbi_connection_string(
- PXT::Config->get("db_backend"),
- PXT::Config->get("db_host"),
- PXT::Config->get("db_port"),
- PXT::Config->get("db_name"));
+$RHN::DB::default_connection = undef;
sub set_default_connection {
my $class = shift;
@@ -148,7 +144,11 @@ sub connect {
# TODO: Once upon a time these aliases were just Oracle dsn's, if the incoming
# alias is in this format, convert it to an Oracle dbi string?
- $alias ||= $RHN::DB::default_connection;
+ $alias ||= ($RHN::DB::default_connection ||= RHN::DB->get_dbi_connection_string(
+
PXT::Config->get("db_backend"),
+
PXT::Config->get("db_host"),
+
PXT::Config->get("db_port"),
+
PXT::Config->get("db_name")));
if ($handles{$alias} and $handles{$alias}->{Active}) {
my $dbh = $handles{$alias};