client/rhel/rhn-client-tools/rhn-client-tools.spec | 5 ++++-
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 12 +++++++++++-
rel-eng/packages/rhn-client-tools | 2 +-
3 files changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 916ebb26ac5ac84d3e8543991470433f92fe825f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Aug 30 11:02:36 2012 +0200
Automatic commit of package [rhn-client-tools] release [1.8.19-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 45b980d..af98b92 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.8.18
+Version: 1.8.19
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 30 2012 Miroslav Suchý <msuchy(a)redhat.com> 1.8.19-1
+- workaround missing python-ethtool
+
* Thu Aug 02 2012 Michael Mraka <michael.mraka(a)redhat.com> 1.8.18-1
- registerUser is dead since b27c6ad4b90a6c4c3f970fc0f8faefae7c134c9c
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 021e5d3..8661818 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.8.18-1 client/rhel/rhn-client-tools/
+1.8.19-1 client/rhel/rhn-client-tools/
commit 8baef61c8b6b9564e7e936f52575d5eb75b5ee38
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Aug 30 10:53:01 2012 +0200
workaround missing python-ethtool
On Debian/kfreebsd is not available python-ethtoool. It is because it requires libnl,
which is Linux specific.
So if python-ethtools is not present, do not fail and just print warning,
that hardware information about network interfaces are not present.
And read_network_interfaces() will return empty dictionary.
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 6e4300c..ba53256 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -22,7 +22,13 @@ import os
import sys
import config
-import ethtool
+try:
+ import ethtool
+ ethtool_present = True
+except ImportError:
+ sys.stderr.write("Warning: information about network interfaces could not be
retrieved on this platform.\n")
+ ethtool_present = False
+
import gettext
t = gettext.translation('rhn-client-tools', fallback=True)
_ = t.ugettext
@@ -524,6 +530,10 @@ def read_network_interfaces():
intDict = {}
intDict['class'] = "NETINTERFACES"
+ if not ethtool_present:
+ # ethtool is not available on non-linux platforms (as kfreebsd), skip it
+ return intDict
+
interfaces = list(set(ethtool.get_devices() + ethtool.get_active_devices()))
for interface in interfaces:
try: