3 commits - client/rhel rel-eng/packages
by Michael Mraka
client/rhel/rhn-client-tools/rhn-client-tools.spec | 9 ++++++---
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 7 +++++--
rel-eng/packages/rhn-client-tools | 2 +-
rel-eng/packages/yum-rhn-plugin | 2 +-
4 files changed, 13 insertions(+), 7 deletions(-)
New commits:
commit 34a1aa7d2dc9888d92142c73b5d8a75448a9959e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:47:16 2011 +0200
Automatic commit of package [yum-rhn-plugin] release [1.6.5-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index c523879..c3324bc 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.4
+Version: 1.6.5
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -72,6 +72,9 @@ fi
%doc LICENSE
%changelog
+* Thu Aug 04 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.5-1
+- the latest yum-rhn-plugin and rhn-client-tools require each other
+
* Thu Aug 04 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.4-1
- 710065 - exception messages are in unicode
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index e1f196c..4c64d51 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-1.6.4-1 client/rhel/yum-rhn-plugin/
+1.6.5-1 client/rhel/yum-rhn-plugin/
commit 5c0494b70c84ccaa75d84f08ab18288821092212
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:47:09 2011 +0200
Automatic commit of package [rhn-client-tools] release [1.6.7-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index d214c30..9623d23 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.6
+Version: 1.6.7
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -339,6 +339,9 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Thu Aug 04 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.7-1
+- the latest yum-rhn-plugin and rhn-client-tools require each other
+
* Thu Aug 04 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.6-1
- 710065 - handle unicode log messages
- 710065 - handle unicode error messages
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index c988186..5ae4cf3 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.6.6-1 client/rhel/rhn-client-tools/
+1.6.7-1 client/rhel/rhn-client-tools/
commit 644d5122faf1b4951c14271c59fdfa19e7a44979
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:44:12 2011 +0200
the latest yum-rhn-plugin and rhn-client-tools require each other
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 62f02bd..d214c30 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -47,7 +47,7 @@ Requires: yum
%endif
Conflicts: up2date < 5.0.0
-Conflicts: yum-rhn-plugin < 1.1.4-1
+Conflicts: yum-rhn-plugin < 1.6.4-1
Conflicts: rhncfg < 5.9.23-1
Conflicts: spacewalk-koan < 0.2.7-1
Conflicts: rhn-kickstart < 5.4.3-1
@@ -83,7 +83,7 @@ Requires: %{name} = %{version}-%{release}
%if 0%{?suse_version}
Requires: zypp-plugin-spacewalk
%else
-Requires: yum-rhn-plugin >= 1.1.2-1
+Requires: yum-rhn-plugin >= 1.6.4-1
%endif
%description -n rhn-check
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index d65436f..c523879 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -15,7 +15,7 @@ BuildRequires: intltool
BuildRequires: gettext
Requires: yum >= 3.2.19-15
-Requires: rhn-client-tools >= 0.4.20-2
+Requires: rhn-client-tools >= 1.6.6-1
Requires: m2crypto >= 0.16-6
Requires: python-iniparse
12 years, 10 months
Changes to 'refs/tags/yum-rhn-plugin-1.6.4-1'
by Michael Mraka
Tag 'yum-rhn-plugin-1.6.4-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-08-04 12:39 +0000
Tagging package [yum-rhn-plugin] version [1.6.4-1] in directory [client/rhel/yum-rhn-plugin/].
Changes since rhn-client-tools-1.6.6-1:
Michael Mraka (1):
Automatic commit of package [yum-rhn-plugin] release [1.6.4-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, 10 months
client/rhel rel-eng/packages
by Michael Mraka
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 5 ++++-
rel-eng/packages/yum-rhn-plugin | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 4dce0ac2bcceb65ed900134afe50bb57f30c25aa
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:39:27 2011 +0200
Automatic commit of package [yum-rhn-plugin] release [1.6.4-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index 30c2930..d65436f 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.3
+Version: 1.6.4
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -72,6 +72,9 @@ fi
%doc LICENSE
%changelog
+* Thu Aug 04 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.4-1
+- 710065 - exception messages are in unicode
+
* Tue Aug 02 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.3-1
- fixed package exclusion
- 725496 - respect default plugin settings from [main]
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index 9ac58af..e1f196c 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-1.6.3-1 client/rhel/yum-rhn-plugin/
+1.6.4-1 client/rhel/yum-rhn-plugin/
12 years, 10 months
Changes to 'refs/tags/rhn-client-tools-1.6.6-1'
by Michael Mraka
Tag 'rhn-client-tools-1.6.6-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-08-04 12:38 +0000
Tagging package [rhn-client-tools] version [1.6.6-1] in directory [client/rhel/rhn-client-tools/].
Changes since rhn-client-tools-1.6.5-1:
Michael Mraka (11):
moved duplicated code to base Error class
merged duplicated code to NoLogError class
changed comments to doc strings
710065 - handle unicode error messages
710065 - handle unicode log messages
fixed pylint warning W: 5: Uses of a deprecated module 'string'
fixed pylint warning C: 43:Log.trace_me: Black listed name "bar"
fixed pylint warning W: 46:Log.log_exception: Redefining built-in 'type'
fixed pylint warning W: 47:Log.log_exception: Attribute 'log_info' defined outside __init__
710065 - exception messages are in unicode
Automatic commit of package [rhn-client-tools] release [1.6.6-1].
Milan Zazrivec (1):
684250 - correct priority for initial registration screen
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 9
client/rhel/rhn-client-tools/src/firstboot/rhn_register.py | 2
client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py | 192 ++--------
client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py | 19
client/rhel/yum-rhn-plugin/rhnplugin.py | 12
rel-eng/packages/rhn-client-tools | 2
6 files changed, 82 insertions(+), 154 deletions(-)
---
12 years, 10 months
client/rhel rel-eng/packages
by Michael Mraka
client/rhel/rhn-client-tools/rhn-client-tools.spec | 9 ++++++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit af41a7a880ed49dbb795568d794ba218acf7d950
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:38:59 2011 +0200
Automatic commit of package [rhn-client-tools] release [1.6.6-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index dbb4194..62f02bd 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.5
+Version: 1.6.6
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -339,6 +339,13 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Thu Aug 04 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.6-1
+- 710065 - handle unicode log messages
+- 710065 - handle unicode error messages
+- merged duplicated code to NoLogError class
+- moved duplicated code to base Error class
+- 684250 - correct priority for initial registration screen
+
* Thu Aug 04 2011 Martin Minar <mminar(a)redhat.com> 1.6.5-1
- 727908 - registration: send correct hostname during kickstart
(mzazrivec(a)redhat.com)
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 87640a9..c988186 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.6.5-1 client/rhel/rhn-client-tools/
+1.6.6-1 client/rhel/rhn-client-tools/
12 years, 10 months
10 commits - client/rhel
by Michael Mraka
client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py | 192 ++--------
client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py | 19
client/rhel/yum-rhn-plugin/rhnplugin.py | 12
3 files changed, 72 insertions(+), 151 deletions(-)
New commits:
commit 6300588a7586d8974a7b9d3e6e2e65bac448cd20
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:33:19 2011 +0200
710065 - exception messages are in unicode
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 1341610..c1dc20f 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -120,7 +120,7 @@ def init_hook(conduit):
except up2dateErrors.RhnServerException, e:
rewordError(e)
conduit.error(0, COMMUNICATION_ERROR + "\n" + RHN_DISABLED + "\n" +
- str(e))
+ unicode(e))
rhn_enabled = False
return
@@ -144,7 +144,7 @@ def init_hook(conduit):
return
except up2dateErrors.RhnServerException, e:
conduit.error(0, COMMUNICATION_ERROR + "\n" + CHANNELS_DISABLED +
- "\n" + str(e))
+ "\n" + unicode(e))
return
repos = conduit.getRepos()
@@ -235,7 +235,7 @@ def posttrans_hook(conduit):
except up2dateErrors.RhnServerException, e:
conduit.error(0, COMMUNICATION_ERROR + "\n" +
_("Package profile information could not be sent.") + "\n" +
- str(e))
+ unicode(e))
def rewordError(e):
""" This is compensating for hosted/satellite returning back an error
@@ -315,7 +315,7 @@ class RhnRepo(YumRepository):
try:
li = up2dateAuth.getLoginInfo()
except up2dateErrors.RhnServerException, e:
- raise yum.Errors.RepoError(str(e))
+ raise yum.Errors.RepoError(unicode(e))
# TODO: do evalution on li auth times to see if we need to obtain a
# new session...
@@ -342,7 +342,7 @@ class RhnRepo(YumRepository):
try:
up2dateAuth.updateLoginInfo()
except up2dateErrors.RhnServerException, e:
- raise yum.Errors.RepoError(str(e))
+ raise yum.Errors.RepoError(unicode(e))
return self._noExceptionWrappingGet(url, relative, local,
start, end, copy_local, checkfunc, text, reget, cache, size)
@@ -352,7 +352,7 @@ class RhnRepo(YumRepository):
"failed to retrieve %s from %s\nerror was %s" % (relative,
self.id, e)
except SSLError, e:
- raise yum.Errors.RepoError(str(e))
+ raise yum.Errors.RepoError(unicode(e))
except up2dateErrors.InvalidRedirectionError, e:
raise up2dateErrors.InvalidRedirectionError(e)
_YumRepository__get = _getFile
commit ee4ae74d7e2615673070de0870459a3a7b4c649d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:30:50 2011 +0200
fixed pylint warning W: 47:Log.log_exception: Attribute 'log_info' defined outside __init__
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
index f447f6d..8efa899 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
@@ -13,6 +13,7 @@ class Log:
def __init__(self):
self.app = "up2date"
self.cfg = config.initUp2dateConfig()
+ self.log_info = ''
def set_app_name(self, name):
self.app = str(name)
commit 400568934b238c42aa86ea95779ad0dbafb8c6ad
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:29:08 2011 +0200
fixed pylint warning W: 46:Log.log_exception: Redefining built-in 'type'
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
index 5c4ab06..f447f6d 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
@@ -42,12 +42,12 @@ class Log:
msg = ''.join(traceback.format_list(x))
self.write_log(msg)
- def log_exception(self, type, value, tb):
+ def log_exception(self, logtype, value, tb):
self.log_info = "[%s] %s" % (time.ctime(time.time()), self.app)
output = ["\n"] # Accumulate the strings in a list
output.append("Traceback (most recent call last):\n")
output = output + traceback.format_list(traceback.extract_tb(tb))
- output.append("%s: %s\n" % (type, value))
+ output.append("%s: %s\n" % (logtype, value))
self.write_log("".join(output))
def write_log(self, s):
commit 3fb13adcead0c2d800d7ccb6755f7c267359fd0b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:27:05 2011 +0200
fixed pylint warning C: 43:Log.trace_me: Black listed name "bar"
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
index 8da4461..5c4ab06 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
@@ -39,8 +39,8 @@ class Log:
def trace_me(self):
self.log_info = "[%s] %s" % (time.ctime(time.time()), self.app)
x = traceback.extract_stack()
- bar = ''.join(traceback.format_list(x))
- self.write_log(bar)
+ msg = ''.join(traceback.format_list(x))
+ self.write_log(msg)
def log_exception(self, type, value, tb):
self.log_info = "[%s] %s" % (time.ctime(time.time()), self.app)
commit 5294f342dd1213dc8a90091438dc7773ec914f78
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:25:38 2011 +0200
fixed pylint warning W: 5: Uses of a deprecated module 'string'
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
index 9a3ff80..8da4461 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
@@ -2,7 +2,6 @@
# $Id$
import time
-import string
import config
import traceback
@@ -40,7 +39,7 @@ class Log:
def trace_me(self):
self.log_info = "[%s] %s" % (time.ctime(time.time()), self.app)
x = traceback.extract_stack()
- bar = string.join(traceback.format_list(x))
+ bar = ''.join(traceback.format_list(x))
self.write_log(bar)
def log_exception(self, type, value, tb):
commit 603ef5a95dd74b7d2120efa283ef9842650bf169
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 14:19:24 2011 +0200
710065 - handle unicode log messages
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
index b6afecb..9a3ff80 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateLog.py
@@ -20,8 +20,7 @@ class Log:
def log_debug(self, *args):
if self.cfg["debug"] > 1:
- message ="D: " + string.join(map(lambda a: str(a), args), " ")
- self.log_me(message)
+ self.log_me("D: ", *args)
def log_me(self, *args):
"""General logging function.
@@ -29,9 +28,11 @@ class Log:
"""
self.log_info = "[%s] %s" % (time.ctime(time.time()), self.app)
- s = ""
+ s = u""
for i in args:
- s = s + "%s" % (i,)
+ if not isinstance(i, unicode):
+ i = unicode(i, 'utf-8')
+ s += i
if self.cfg["debug"] > 1:
print s
self.write_log(s)
commit eb22791ceca8f07bfe598c1c820c74378c586d00
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Aug 3 12:11:21 2011 +0200
710065 - handle unicode error messages
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
index b2d7206..96029e7 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
@@ -19,6 +19,8 @@ class Error:
"""base class for errors"""
premsg = ''
def __init__(self, errmsg):
+ if not isinstance(errmsg, unicode):
+ errmsg = unicode(errmsg, 'utf-8')
self.errmsg = self.premsg + errmsg
self.log = up2dateLog.initLog()
@@ -73,6 +75,8 @@ class RpmRemoveError(Error):
self.args = args
self.errmsg = ""
for key in self.args.keys():
+ if not isinstance(errmsg, self.args[key]):
+ self.args[key] = unicode(self.args[key], 'utf-8')
self.errmsg = self.errmsg + "%s failed because of %s\n" % (
key, self.args[key])
self.data = self.args
@@ -81,6 +85,8 @@ class RpmRemoveError(Error):
class NoLogError(Error):
def __init__(self, msg):
+ if not isinstance(msg, unicode):
+ errmsg = unicode(msg, 'utf-8')
self.errmsg = self.premsg + msg
def __repr__(self):
commit 75d261a4e13e9803f224db3078fe267803adda99
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Aug 3 14:42:51 2011 +0200
changed comments to doc strings
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
index 2638b09..b2d7206 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
@@ -96,21 +96,21 @@ class AuthenticationError(NoLogError):
pass
class ValidationError(NoLogError, RhnServerException):
- # indicates an error during server input validation
+ """indicates an error during server input validation"""
premsg = _("Error validating data at server:\n")
class InvalidRegistrationNumberError(ValidationError):
pass
class InvalidProductRegistrationError(NoLogError):
- # indicates an error during server input validation
+ """indicates an error during server input validation"""
premsg = _("The installation number is invalid")
class OemInfoFileError(NoLogError):
premsg = _("Error parsing the oemInfo file at field:\n")
class NoBaseChannelError(NoLogError, RhnServerException):
- # No valid base channel was found for this system
+ """No valid base channel was found for this system"""
pass
class UnknownMethodException(NoLogError, RhnServerException):
commit e747e4bd5bae669020f8a030006e7bad086cf1b1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 13:46:37 2011 +0200
merged duplicated code to NoLogError class
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
index 9c27496..2638b09 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
@@ -79,74 +79,45 @@ class RpmRemoveError(Error):
def __repr__(self):
return self.errmsg
-class AbuseError(Error):
+class NoLogError(Error):
def __init__(self, msg):
- self.errmsg = msg
+ self.errmsg = self.premsg + msg
def __repr__(self):
return self.errmsg
-class AuthenticationTicketError(RhnServerException):
- def __init__(self, msg):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
+class AbuseError(Error):
+ pass
-class AuthenticationError(Error):
- def __init__(self, msg):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
+class AuthenticationTicketError(NoLogError, RhnServerException):
+ pass
-class ValidationError(RhnServerException):
- def __init__(self, errmsg):
- Error.__init__(self, errmsg)
+class AuthenticationError(NoLogError):
+ pass
+class ValidationError(NoLogError, RhnServerException):
# indicates an error during server input validation
- def __repr__(self):
- return _("Error validating data at server:\n") + self.errmsg
+ premsg = _("Error validating data at server:\n")
class InvalidRegistrationNumberError(ValidationError):
pass
-class InvalidProductRegistrationError(Error):
- def __init__(self, errmsg):
- Error.__init__(self, errmsg)
-
+class InvalidProductRegistrationError(NoLogError):
# indicates an error during server input validation
- def __repr__(self):
- return _("The installation number is invalid") + self.errmsg
+ premsg = _("The installation number is invalid")
-class OemInfoFileError(Error):
- def __init__(self,errmsg):
- Error.__init__(self, errmsg)
-
- def __repr__(self):
- return _("Error parsing the oemInfo file at field:\n") + self.errmsg
-
-class NoBaseChannelError(RhnServerException):
- def __init__(self, errmsg):
- Error.__init__(self, errmsg)
+class OemInfoFileError(NoLogError):
+ premsg = _("Error parsing the oemInfo file at field:\n")
+class NoBaseChannelError(NoLogError, RhnServerException):
# No valid base channel was found for this system
- def __repr__(self):
- return self.errmsg
-
-class UnknownMethodException(RhnServerException):
- def __init__(self, errmsg):
- Error.__init__(self, errmsg)
-
- def __repr__(self):
- return self.errmsg
+ pass
-class RhnUuidUniquenessError(RhnServerException):
- def __init__(self, msg):
- self.errmsg = msg
+class UnknownMethodException(NoLogError, RhnServerException):
+ pass
- def __repr__(self):
- return self.errmsg
+class RhnUuidUniquenessError(NoLogError, RhnServerException):
+ pass
class ServerCapabilityError(Error):
def __init__(self, msg, errorlist=None):
@@ -158,12 +129,8 @@ class ServerCapabilityError(Error):
def __repr__(self):
return self.errmsg
-class NoChannelsError(Error):
- def __init__(self, msg):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
+class NoChannelsError(NoLogError):
+ pass
if getPlatform() == 'deb':
RepoError = Error
@@ -187,8 +154,7 @@ class SSLCertificateVerifyFailedError(RepoError):
RepoError.__init__(self, "The SSL certificate %s failed verification." % certFile)
class SSLCertificateFileNotFound(Error):
- def __init__(self, errmsg):
- Error.__init__(self, errmsg)
+ pass
class AuthenticationOrAccountCreationError(ValidationError):
@@ -211,40 +177,20 @@ class NotEntitlingError(Error):
class InvalidProtocolError(Error):
pass
-class UnableToCreateUser(Error):
- def __init__(self, msg):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
+class UnableToCreateUser(NoLogError):
+ pass
-class ActivationKeyUsageLimitError(Error):
- def __init__(self, msg):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
-
-class LoginMinLengthError(Error):
- def __init__(self, msg):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
-
-class PasswordMinLengthError(Error):
- def __init__(self, msg):
- self.errmsg = msg
+class ActivationKeyUsageLimitError(NoLogError):
+ pass
- def __repr__(self):
- return self.errmsg
+class LoginMinLengthError(NoLogError):
+ pass
-class PasswordMaxLengthError(Error):
- def __init__(self, msg):
- self.errmsg = msg
+class PasswordMinLengthError(NoLogError):
+ pass
- def __repr__(self):
- return self.errmsg
+class PasswordMaxLengthError(NoLogError):
+ pass
class InsuffMgmntEntsError(RhnServerException):
@@ -271,17 +217,9 @@ class InsuffMgmntEntsError(RhnServerException):
loc = msg.rindex(term) + len(term)
return msg[:loc] + newExpln
-class NoSystemIdError(Error):
- def __init__(self, msg):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
+class NoSystemIdError(NoLogError):
+ pass
-class InvalidRedirectionError(Error):
+class InvalidRedirectionError(NoLogError):
""" Raise when redirect requests could'nt return a package"""
- def __init__(self, msg ):
- self.errmsg = msg
-
- def __repr__(self):
- return self.errmsg
+ pass
commit 5a100f4d654ed861e17f46d01f9b657a8c8c67ad
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 4 13:39:50 2011 +0200
moved duplicated code to base Error class
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
index cba128a..9c27496 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateErrors.py
@@ -17,8 +17,9 @@ from platform import getPlatform
class Error:
"""base class for errors"""
+ premsg = ''
def __init__(self, errmsg):
- self.errmsg = errmsg
+ self.errmsg = self.premsg + errmsg
self.log = up2dateLog.initLog()
def __repr__(self):
@@ -27,67 +28,42 @@ class Error:
class RpmError(Error):
"""rpm itself raised an error condition"""
- def __repr__(self):
- msg = _("RPM error. The message was:\n") + self.errmsg
- log = up2dateLog.initLog()
- log.log_me(msg)
- return msg
+ premsg = _("RPM error. The message was:\n")
class RhnServerException(Error):
pass
class PasswordError(RhnServerException):
"""Raise when the server responds with that a password is incorrect"""
- def __repr__(self):
- log = up2dateLog.initLog()
- msg = _("Password error. The message was:\n") + self.errmsg
- log.log_me(msg)
- return msg
+ premsg = _("Password error. The message was:\n")
class DependencyError(Error):
"""Raise when a rpm transaction set has a dependency error"""
+ premsg = _("RPM dependency error. The message was:\n")
def __init__(self, msg, deps=None):
- self.errmsg = msg
+ Error.__init__(self, msg)
# just tag on the whole deps tuple, so we have plenty of info
# to play with
self.deps = deps
-
- def __repr__(self):
- msg = _("RPM dependency error. The message was:\n") + self.errmsg
- log = up2dateLog.initLog()
- log.log_me(msg)
- return msg
class CommunicationError(RhnServerException):
"""Indicates a problem doing xml-rpc http communication with the server"""
- def __repr__(self):
- msg = _("Error communicating with server. "\
- "The message was:\n") + self.errmsg
- log = up2dateLog.initLog()
- log.log_me(msg)
- return msg
+ premsg = _("Error communicating with server. "\
+ "The message was:\n")
class FileNotFoundError(Error):
"""
Raise when a package or header that is requested returns
a 404 error code"""
- def __repr__(self):
- msg = _("File Not Found: \n") + self.errmsg
- log = up2dateLog.initLog()
- log.log_me(msg)
- return msg
+ premsg = _("File Not Found: \n")
class DelayError(RhnServerException):
"""
Raise when the expected response from a xml-rpc call
exceeds a timeout"""
- def __repr__(self):
- msg = _("Delay error from server. The message was:\n") + self.errmsg
- log = up2dateLog.initLog()
- log.log_me(msg)
- return msg
+ premsg = _("Delay error from server. The message was:\n")
class RpmRemoveError(Error):
"""
12 years, 10 months
client/rhel
by Milan Zazrivec
client/rhel/rhn-client-tools/src/firstboot/rhn_register.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5cff30092d47ca5de092d78a0b74190f45c052f2
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Aug 4 11:57:36 2011 +0200
684250 - correct priority for initial registration screen
This is to make sure EULA comes before registration (EULA has prio 2).
diff --git a/client/rhel/rhn-client-tools/src/firstboot/rhn_register.py b/client/rhel/rhn-client-tools/src/firstboot/rhn_register.py
index c07329f..9258310 100644
--- a/client/rhel/rhn-client-tools/src/firstboot/rhn_register.py
+++ b/client/rhel/rhn-client-tools/src/firstboot/rhn_register.py
@@ -25,7 +25,7 @@ _ = lambda x: gettext.ldgettext("rhn-client-tools", x)
class moduleClass(ModuleSet):
def __init__(self):
ModuleSet.__init__(self)
- self.priority = 2
+ self.priority = 3
self.sidebarTitle = _("Set Up Software Updates")
self.title = _("Set Up Software Updates")
self.path = "/usr/share/rhn/up2date_client/firstboot"
12 years, 10 months
Changes to 'refs/tags/rhn-client-tools-1.6.5-1'
by Martin Minar
Tag 'rhn-client-tools-1.6.5-1' created by Martin Minar <mminar(a)redhat.com> at 2011-08-04 06:16 +0000
Tagging package [rhn-client-tools] version [1.6.5-1] in directory [client/rhel/rhn-client-tools/].
Changes since rhn-client-tools-1.6.4-1:
Martin Minar (1):
Automatic commit of package [rhn-client-tools] release [1.6.5-1].
Milan Zazrivec (1):
727908 - registration: send correct hostname during kickstart
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +++++-
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 12 +++++-------
rel-eng/packages/rhn-client-tools | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)
---
12 years, 10 months
client/rhel rel-eng/packages
by Martin Minar
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 77776558b2cfe54682155309fc88a39c4ca0a66f
Author: Martin Minar <mminar(a)redhat.com>
Date: Thu Aug 4 08:16:06 2011 +0200
Automatic commit of package [rhn-client-tools] release [1.6.5-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index a7b5b31..dbb4194 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.4
+Version: 1.6.5
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -339,6 +339,10 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Thu Aug 04 2011 Martin Minar <mminar(a)redhat.com> 1.6.5-1
+- 727908 - registration: send correct hostname during kickstart
+ (mzazrivec(a)redhat.com)
+
* Wed Aug 03 2011 Martin Minar <mminar(a)redhat.com> 1.6.4-1
- 702107 - cogent error message for exception when listing child channels
(mzazrivec(a)redhat.com)
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 46167b3..87640a9 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.6.4-1 client/rhel/rhn-client-tools/
+1.6.5-1 client/rhel/rhn-client-tools/
12 years, 10 months
client/rhel
by Milan Zazrivec
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit bd4cc512b94ee378a891da5f3f2fa295b600ca10
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Aug 3 17:28:40 2011 +0200
727908 - registration: send correct hostname during kickstart
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index ca80e5b..6a4eabd 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -487,15 +487,13 @@ def read_network():
except:
netdict['ipaddr'] = "127.0.0.1"
+ hostname, ipaddr = findHostByRoute()
- if netdict['hostname'] == 'localhost.localdomain' or \
- netdict['ipaddr'] == "127.0.0.1":
- hostname, ipaddr = findHostByRoute()
+ if netdict['hostname'] != hostname and hostname != 'localhost.localdomain':
+ netdict['hostname'] = hostname
- if netdict['hostname'] == 'localhost.localdomain':
- netdict['hostname'] = hostname
- if netdict['ipaddr'] == "127.0.0.1":
- netdict['ipaddr'] = ipaddr
+ if netdict['ipaddr'] != ipaddr and ipaddr != "127.0.0.1":
+ netdict['ipaddr'] = ipaddr
if netdict['ipaddr'] is None:
netdict['ipaddr'] = ''
12 years, 10 months