client/rhel
by Milan Zazrivec
client/rhel/rhn-client-tools/src/actions/up2date_config.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a7e090fb93f5720d618da1e658b5d2c4b300562b
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Oct 19 12:16:14 2011 +0200
745438 - up2date_config: use localhost to avoid confusion
diff --git a/client/rhel/rhn-client-tools/src/actions/up2date_config.py b/client/rhel/rhn-client-tools/src/actions/up2date_config.py
index 6acdb3a..c050bcc 100644
--- a/client/rhel/rhn-client-tools/src/actions/up2date_config.py
+++ b/client/rhel/rhn-client-tools/src/actions/up2date_config.py
@@ -120,7 +120,7 @@ def main():
pprint.pprint(update(configdata))
- configdata['serverURL'] = "http://hokeypokeyland.org/XMLRPC"
+ configdata['serverURL'] = "http://localhost/XMLRPC"
pprint.pprint(update(configdata))
if __name__ == "__main__":
12 years, 8 months
Changes to 'refs/tags/spacewalk-schema-1.6.23-1'
by Michael Mraka
Tag 'spacewalk-schema-1.6.23-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-10-19 10:05 +0000
Tagging package [spacewalk-schema] version [1.6.23-1] in directory [schema/spacewalk/].
Changes since yum-rhn-plugin-1.6.13-1:
Michael Mraka (2):
fixed rhnContentSourceFilter upgrade to match freshly created table
Automatic commit of package [spacewalk-schema] release [1.6.23-1].
---
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/100-rhnContentSourceFilter.sql.postgresql | 4 ++--
3 files changed, 7 insertions(+), 4 deletions(-)
---
12 years, 8 months
2 commits - rel-eng/packages schema/spacewalk
by Michael Mraka
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/100-rhnContentSourceFilter.sql.postgresql | 4 ++--
3 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 3af7bf02e1a744ce6fe94c44f98dd9d22f26f585
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Oct 19 12:05:35 2011 +0200
Automatic commit of package [spacewalk-schema] release [1.6.23-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 1248247..ff6fac9 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.6.22-1 schema/spacewalk/
+1.6.23-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 46b8953..cac2706 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.6.22
+Version: 1.6.23
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Oct 19 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.23-1
+- fixed rhnContentSourceFilter upgrade to match freshly created table
+
* Tue Oct 18 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.22-1
- rhnContentSourceFilter stores package filters for repos
commit c92ce7330f36637615c5a8f901766eabb7f4f8eb
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Oct 19 12:04:32 2011 +0200
fixed rhnContentSourceFilter upgrade to match freshly created table
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/100-rhnContentSourceFilter.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/100-rhnContentSourceFilter.sql.postgresql
index 343f9e9..d3c6b41 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/100-rhnContentSourceFilter.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/100-rhnContentSourceFilter.sql.postgresql
@@ -12,8 +12,8 @@ rhnContentSourceFilter
flag varchar(1) NOT NULL
check (flag in ('+','-')),
filter varchar(4000) NOT NULL,
- created date default current_timestamp NOT NULL,
- modified date default current_timestamp NOT NULL
+ created timestamptz default current_timestamp NOT NULL,
+ modified timestamptz default current_timestamp NOT NULL
)
;
12 years, 8 months
Changes to 'refs/tags/yum-rhn-plugin-1.6.13-1'
by Miroslav Suchý
Tag 'yum-rhn-plugin-1.6.13-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-10-18 18:40 +0000
Tagging package [yum-rhn-plugin] version [1.6.13-1] in directory [client/rhel/yum-rhn-plugin/].
Changes since rhn-client-tools-1.6.24-1:
Miroslav Suchý (1):
Automatic commit of package [yum-rhn-plugin] release [1.6.13-1].
---
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 5 ++++-
rel-eng/packages/yum-rhn-plugin | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
12 years, 8 months
Changes to 'refs/tags/rhn-client-tools-1.6.24-1'
by Miroslav Suchý
Tag 'rhn-client-tools-1.6.24-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-10-18 18:40 +0000
Tagging package [rhn-client-tools] version [1.6.24-1] in directory [client/rhel/rhn-client-tools/].
Changes since spacewalk-backend-1.6.34-1:
Ionuț Arțăriși (1):
move errata.py action to the yum-rhn-plugin package
Miroslav Suchý (3):
move imports to beginning of file
simplify code
Automatic commit of package [rhn-client-tools] release [1.6.24-1].
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 -
client/rhel/rhn-client-tools/src/actions/Makefile | 2
client/rhel/rhn-client-tools/src/actions/errata.py | 87 ---------------------
client/rhel/rhnlib/rhn/connections.py | 11 --
client/rhel/yum-rhn-plugin/actions/errata.py | 86 ++++++++++++++++++++
rel-eng/packages/rhn-client-tools | 2
6 files changed, 96 insertions(+), 98 deletions(-)
---
12 years, 8 months
5 commits - client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 -
client/rhel/rhn-client-tools/src/actions/Makefile | 2
client/rhel/rhn-client-tools/src/actions/errata.py | 87 ---------------------
client/rhel/rhnlib/rhn/connections.py | 11 --
client/rhel/yum-rhn-plugin/actions/errata.py | 86 ++++++++++++++++++++
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 5 -
rel-eng/packages/rhn-client-tools | 2
rel-eng/packages/yum-rhn-plugin | 2
8 files changed, 101 insertions(+), 100 deletions(-)
New commits:
commit 5f353abf6953a38b63732d7ca8d0ae616026209a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 18 20:40:36 2011 +0200
Automatic commit of package [yum-rhn-plugin] release [1.6.13-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index df1f31a..dabd6a7 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -1,6 +1,6 @@
Summary: RHN support for yum
Name: yum-rhn-plugin
-Version: 1.6.12
+Version: 1.6.13
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -72,6 +72,9 @@ fi
%doc LICENSE
%changelog
+* Tue Oct 18 2011 Miroslav Suchý 1.6.13-1
+- move errata.py action to the yum-rhn-plugin package (iartarisi(a)suse.cz)
+
* Fri Oct 07 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.12-1
- pass error messages from yum plugin to rhn_check
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index 4b7f185..b7af1a5 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-1.6.12-1 client/rhel/yum-rhn-plugin/
+1.6.13-1 client/rhel/yum-rhn-plugin/
commit 0a8dafd1d10c6d9111725102561b2772199ee019
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 18 20:40:26 2011 +0200
Automatic commit of package [rhn-client-tools] release [1.6.24-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 51292fb..15e1b4a 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 1.6.23
+Version: 1.6.24
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -338,6 +338,9 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Tue Oct 18 2011 Miroslav Suchý 1.6.24-1
+- move errata.py action to the yum-rhn-plugin package (iartarisi(a)suse.cz)
+
* Tue Oct 11 2011 Tomas Lestach <tlestach(a)redhat.com> 1.6.23-1
- 706148 - set _uri, when connecting to a different server (luvilla(a)redhat.com)
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 004daf7..ec2a243 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.6.23-1 client/rhel/rhn-client-tools/
+1.6.24-1 client/rhel/rhn-client-tools/
commit 561ee725dd0f6fc2acdc6fef70b211c71fd18ea8
Author: Ionuț Arțăriși <iartarisi(a)suse.cz>
Date: Tue Oct 18 16:49:24 2011 +0200
move errata.py action to the yum-rhn-plugin package
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 8d9f58b..51292fb 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -249,7 +249,6 @@ make -f Makefile.rhn-client-tools test
# actions for rhn_check to run
%{_datadir}/rhn/actions/__init__.*
%{_datadir}/rhn/actions/hardware.*
-%{_datadir}/rhn/actions/errata.*
%{_datadir}/rhn/actions/systemid.*
%{_datadir}/rhn/actions/reboot.*
%{_datadir}/rhn/actions/rhnsd.*
diff --git a/client/rhel/rhn-client-tools/src/actions/Makefile b/client/rhel/rhn-client-tools/src/actions/Makefile
index 2d72848..fec4eff 100644
--- a/client/rhel/rhn-client-tools/src/actions/Makefile
+++ b/client/rhel/rhn-client-tools/src/actions/Makefile
@@ -3,7 +3,7 @@
# $Id$
ACTIONS = up2date_config hardware reboot \
- rhnsd systemid errata __init__
+ rhnsd systemid __init__
PYFILES = $(addsuffix .py, $(ACTIONS))
OBJECTS = $(PYFILES) $(addsuffix .pyc, $(ACTIONS))
diff --git a/client/rhel/rhn-client-tools/src/actions/errata.py b/client/rhel/rhn-client-tools/src/actions/errata.py
deleted file mode 100644
index 49f1c65..0000000
--- a/client/rhel/rhn-client-tools/src/actions/errata.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/python
-
-# Client code for Update Agent
-# Copyright (c) 1999-2002 Red Hat, Inc. Distributed under GPL.
-#
-# Author: Adrian Likins <alikins(a)redhat.com
-#
-
-import sys
-sys.path.append("/usr/share/rhn/")
-from up2date_client import rhnserver
-from up2date_client import up2dateAuth
-from up2date_client import pkgUtils
-from actions import packages
-
-__rhnexport__ = [
- 'update']
-
-# action version we understand
-ACTION_VERSION = 2
-
-def __getErrataInfo(errata_id):
- s = rhnserver.RhnServer()
- return s.errata.getErrataInfo(up2dateAuth.getSystemId(), errata_id)
-
-def update(errataidlist, cache_only=None):
- packagelist = []
-
- if type(errataidlist) not in [type([]), type(())]:
- errataidlist = [ errataidlist ]
-
- for errataid in errataidlist:
- tmpList = __getErrataInfo(errataid)
- packagelist = packagelist + tmpList
-
- current_packages_with_arch = {}
- current_packages ={}
- for p in pkgUtils.getInstalledPackageList(getArch=1):
- current_packages_with_arch[p['name']+p['arch']] = p
- current_packages[p['name']] = p
-
- u = {}
- # only update packages that are currently installed
- # since an "applicable errata" may only contain some packages
- # that actually apply. aka kernel. Fun fun fun.
-
- if len(packagelist[0]) > 4:
- # Newer sats send down arch, filter using name+arch
- for p in packagelist:
- if current_packages_with_arch.has_key(p[0]+p[4]):
- u[p[0]+p[4]] = p
- elif current_packages_with_arch.has_key(p[0]+"noarch"):
- u[p[0]+p[4]] = p
- elif p[4] == "noarch" and current_packages.has_key(p[0]):
- u[p[0]] = p
- else:
- # 5.2 and older sats + hosted dont send arch
- for p in packagelist:
- if current_packages.has_key(p[0]):
- u[p[0]] = p
-
-
- # XXX: Fix me - once we keep all errata packages around,
- # this is the WRONG thing to do - we want to keep the specific versions
- # that the user has asked for.
- packagelist = map(lambda a: u[a], u.keys())
-
- if packagelist == []:
- data = {}
- data['version'] = "0"
- data['name'] = "errata.update.no_packages"
- data['erratas'] = errataidlist
-
- return (39,
- "No packages from that errata are available",
- data)
-
- return packages.update(packagelist, cache_only)
-
-
-def main():
- print update([23423423])
-
-
-if __name__ == "__main__":
- main()
-
diff --git a/client/rhel/yum-rhn-plugin/actions/errata.py b/client/rhel/yum-rhn-plugin/actions/errata.py
new file mode 100644
index 0000000..03a4bb9
--- /dev/null
+++ b/client/rhel/yum-rhn-plugin/actions/errata.py
@@ -0,0 +1,86 @@
+#!/usr/bin/python
+
+# Client code for Update Agent
+# Copyright (c) 1999-2002 Red Hat, Inc. Distributed under GPL.
+#
+# Author: Adrian Likins <alikins(a)redhat.com
+#
+
+import sys
+sys.path.append("/usr/share/rhn/")
+from up2date_client import rhnserver
+from up2date_client import up2dateAuth
+from up2date_client import pkgUtils
+from actions import packages
+
+__rhnexport__ = [
+ 'update']
+
+# action version we understand
+ACTION_VERSION = 2
+
+def __getErrataInfo(errata_id):
+ s = rhnserver.RhnServer()
+ return s.errata.getErrataInfo(up2dateAuth.getSystemId(), errata_id)
+
+def update(errataidlist, cache_only=None):
+ packagelist = []
+
+ if type(errataidlist) not in [type([]), type(())]:
+ errataidlist = [ errataidlist ]
+
+ for errataid in errataidlist:
+ tmpList = __getErrataInfo(errataid)
+ packagelist = packagelist + tmpList
+
+ current_packages_with_arch = {}
+ current_packages ={}
+ for p in pkgUtils.getInstalledPackageList(getArch=1):
+ current_packages_with_arch[p['name']+p['arch']] = p
+ current_packages[p['name']] = p
+
+ u = {}
+ # only update packages that are currently installed
+ # since an "applicable errata" may only contain some packages
+ # that actually apply. aka kernel. Fun fun fun.
+
+ if len(packagelist[0]) > 4:
+ # Newer sats send down arch, filter using name+arch
+ for p in packagelist:
+ if current_packages_with_arch.has_key(p[0]+p[4]):
+ u[p[0]+p[4]] = p
+ elif current_packages_with_arch.has_key(p[0]+"noarch"):
+ u[p[0]+p[4]] = p
+ elif p[4] == "noarch" and current_packages.has_key(p[0]):
+ u[p[0]] = p
+ else:
+ # 5.2 and older sats + hosted dont send arch
+ for p in packagelist:
+ if current_packages.has_key(p[0]):
+ u[p[0]] = p
+
+
+ # XXX: Fix me - once we keep all errata packages around,
+ # this is the WRONG thing to do - we want to keep the specific versions
+ # that the user has asked for.
+ packagelist = map(lambda a: u[a], u.keys())
+
+ if packagelist == []:
+ data = {}
+ data['version'] = "0"
+ data['name'] = "errata.update.no_packages"
+ data['erratas'] = errataidlist
+
+ return (39,
+ "No packages from that errata are available",
+ data)
+
+ return packages.update(packagelist, cache_only)
+
+
+def main():
+ print update([23423423])
+
+
+if __name__ == "__main__":
+ main()
commit 1ec69c63f3ebed1330d3315c40a74459cafba2d1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 18 16:02:50 2011 +0200
simplify code
diff --git a/client/rhel/rhnlib/rhn/connections.py b/client/rhel/rhnlib/rhn/connections.py
index 2667c75..cd9c0bb 100644
--- a/client/rhel/rhnlib/rhn/connections.py
+++ b/client/rhel/rhnlib/rhn/connections.py
@@ -18,9 +18,7 @@ import socket
from platform import python_version
# Import into the local namespace some httplib-related names
-_CS_REQ_SENT = httplib._CS_REQ_SENT
-_CS_IDLE = httplib._CS_IDLE
-ResponseNotReady = httplib.ResponseNotReady
+from httplib import _CS_REQ_SENT, _CS_IDLE, ResponseNotReady
class HTTPResponse(httplib.HTTPResponse):
def set_callback(self, rs, ws, ex, user_data, callback):
commit 9a6821d9af8bbb43541df14bd742cdc2d2413673
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 18 16:00:37 2011 +0200
move imports to beginning of file
diff --git a/client/rhel/rhnlib/rhn/connections.py b/client/rhel/rhnlib/rhn/connections.py
index 2403bf8..2667c75 100644
--- a/client/rhel/rhnlib/rhn/connections.py
+++ b/client/rhel/rhnlib/rhn/connections.py
@@ -8,11 +8,14 @@
# $Id$
+import base64
import SSL
import nonblocking
import httplib
import xmlrpclib
import encodings.idna
+import socket
+from platform import python_version
# Import into the local namespace some httplib-related names
_CS_REQ_SENT = httplib._CS_REQ_SENT
@@ -29,7 +32,6 @@ class HTTPConnection(httplib.HTTPConnection):
response_class = HTTPResponse
def __init__(self, host, port=None):
- from platform import python_version
if python_version() >= '2.6.1':
httplib.HTTPConnection.__init__(self, host, port, timeout=SSL.DEFAULT_TIMEOUT)
else:
@@ -140,7 +142,6 @@ class HTTPProxyConnection(HTTPConnection):
if not self.__username:
return
# Authenticated proxy
- import base64
userpass = "%s:%s" % (self.__username, self.__password)
enc_userpass = base64.encodestring(userpass).replace("\n", "")
self.putheader("Proxy-Authorization", "Basic %s" % enc_userpass)
@@ -156,8 +157,6 @@ class HTTPSConnection(HTTPConnection):
def connect(self):
"Connect to a host on a given (SSL) port"
- import socket
-
results = socket.getaddrinfo(self.host, self.port,
socket.AF_UNSPEC, socket.SOCK_STREAM)
12 years, 8 months
Changes to 'refs/tags/spacewalk-backend-1.6.34-1'
by Miroslav Suchý
Tag 'spacewalk-backend-1.6.34-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-10-18 10:17 +0000
Tagging package [spacewalk-backend] version [1.6.34-1] in directory [backend/].
Changes since spacewalk-backend-1.6.33-1:
Miroslav Suchý (2):
745102 - unify handlers of nullable columns
Automatic commit of package [spacewalk-backend] release [1.6.34-1].
---
backend/server/rhnServer/server_hardware.py | 13 ++++---------
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
---
12 years, 8 months
2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by Miroslav Suchý
backend/server/rhnServer/server_hardware.py | 13 ++++---------
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
New commits:
commit ae9c924621731891dd4a4d1ef9707c0b654ecfc9
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 18 12:17:23 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.6.34-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 262ce23..21006be 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,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.6.33
+Version: 1.6.34
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -675,6 +675,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Oct 18 2011 Miroslav Suchý 1.6.34-1
+- 745102 - unify handlers of nullable columns
+
* Tue Oct 18 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.33-1
- package filters can be stored in database now
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index c64458b..672d321 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.33-1 backend/
+1.6.34-1 backend/
commit 92c081b6b53db4387dd178291fbc81afa77b4876
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Oct 18 11:59:35 2011 +0200
745102 - unify handlers of nullable columns
save() use unsetEmptyFields() which use self.__varchar_fields, while
insert(), delete(), update() use _null_columns() which use self._autonull.
Lets unify it together by replacing unsetEmptyFields() with _null_columns().
Additionally self._autonull is set in base class. And all childs should extend this field.
If they set it to specific value and will ignore previous values, then you are on your own.
Having columns in _autonull list, which are not in fields list is no harm.
diff --git a/backend/server/rhnServer/server_hardware.py b/backend/server/rhnServer/server_hardware.py
index 81ebdd4..dd044e1 100644
--- a/backend/server/rhnServer/server_hardware.py
+++ b/backend/server/rhnServer/server_hardware.py
@@ -180,7 +180,7 @@ class GenericDevice:
self.data = {}
# default to the hardware seq...
self.sequence = "rhn_hw_dev_id_seq"
- self.__varchar_fields = ("description", "board")
+ self._autonull = ("description", "board")
def getid(self):
if self.id == 0:
self.id = rhnSQL.Sequence(self.sequence)()
@@ -191,11 +191,6 @@ class GenericDevice:
if self.status == 0: # original item, unchanged
return 0
return 1
- def unsetEmptyFields(self):
- """ empty string fields mapped to varchar must be saved as NULL values """
- for field_name in self.__varchar_fields:
- if field_name in self.data and self.data[field_name] == '':
- self.data[field_name] = None
def save(self, sysid):
""" save data in the rhnDevice table """
log_debug(4, self.__table, self.status, self.data)
@@ -208,7 +203,7 @@ class GenericDevice:
del t[self.id]
return 0
# set description to null if empty
- self.unsetEmptyFields()
+ self._null_columns([self.data], self._autonull)
# make sure we have a device id
devid = self.getid()
for k in self.data.keys():
@@ -243,7 +238,7 @@ class GenericDevice:
# list of dicts
for param in params:
for name in names:
- if param.has_key(name) and param[name] == '':
+ if name in param and param[name] == '':
param[name] = None
class Device(GenericDevice):
@@ -374,9 +369,9 @@ class NetworkInformation(Device):
""" This is a wrapper class for the Network Information (rhnServerNetwork) """
def __init__(self, dict = None):
fields = ["hostname", "ipaddr", "ip6addr"]
- self._autonull = ('ipaddr', 'ip6addr')
mapping = { 'class' : None }
Device.__init__(self, "rhnServerNetwork", fields, dict, mapping)
+ self._autonull = ('ipaddr', 'ip6addr')
# use our own sequence
self.sequence = "rhn_server_net_id_seq"
# bugzilla: 129840 kudzu (rhpl) will sometimes pad octets
12 years, 8 months
Changes to 'refs/tags/spacewalk-backend-1.6.33-1'
by Michael Mraka
Tag 'spacewalk-backend-1.6.33-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-10-18 10:03 +0000
Tagging package [spacewalk-backend] version [1.6.33-1] in directory [backend/].
Changes since spacewalk-schema-1.6.22-1:
Michael Mraka (1):
Automatic commit of package [spacewalk-backend] release [1.6.33-1].
---
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
12 years, 8 months
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 3a784bdb17e9001ae269caf4282c8c5a8a663709
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Oct 18 12:03:09 2011 +0200
Automatic commit of package [spacewalk-backend] release [1.6.33-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index d9f0f94..262ce23 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,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.6.32
+Version: 1.6.33
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -675,6 +675,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Oct 18 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.33-1
+- package filters can be stored in database now
+
* Mon Oct 17 2011 Jan Pazdziora 1.6.32-1
- add an 'xmlrpc.errata.patch_names' capability (iartarisi(a)suse.cz)
- 600555 - removing the Management word from the error message because it is
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 598ba85..c64458b 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.32-1 backend/
+1.6.33-1 backend/
12 years, 8 months