diff --git a/rhn-client-tools.spec b/rhn-client-tools.spec index 63b63b8c2b..4ed3582d6a 100644 --- a/rhn-client-tools.spec +++ b/rhn-client-tools.spec @@ -5,7 +5,7 @@ Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version URL: https://github.com/spacewalkproject/spacewalk Name: rhn-client-tools Version: 2.0.2 -Release: 21%{?dist} +Release: 22%{?dist} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if 0%{?suse_version} @@ -38,7 +38,9 @@ Requires: newt %if 0%{?fedora} || 0%{?rhel} > 5 Requires: newt-python %endif +%if %{_arch} != s390x && %{_arch} != s390 Requires: python-dmidecode +%endif %if 0%{?suse_version} Requires: zypper %else @@ -361,6 +363,10 @@ make -f Makefile.rhn-client-tools test %endif %changelog +* Thu Aug 16 2018 Tomas Kasparek 2.0.2-22 +- Resolves: #1617942 - drop dmidecode dependency on s390x + (tkasparek@redhat.com) + * Fri Dec 08 2017 Tomas Kasparek 2.0.2-21 - Resolves: #1430298 - fix warning: numeric expression expected (got ") (pstudeni@redhat.com) diff --git a/src/up2date_client/hardware.py b/src/up2date_client/hardware.py index 69a96704f3..a20ac48efd 100644 --- a/src/up2date_client/hardware.py +++ b/src/up2date_client/hardware.py @@ -30,12 +30,18 @@ except ImportError: sys.stderr.write("Warning: information about network interfaces could not be retrieved on this platform.\n") ethtool_present = False +try: + import dmidecode + dmidecode_present = True +except ImportError: + sys.stderr.write("Warning: DMI information could not be retrieved on this platform.\n") + dmidecode_present = False + import gettext t = gettext.translation('rhn-client-tools', fallback=True) _ = t.ugettext import dbus -import dmidecode import up2dateLog try: # F13 and EL6 @@ -60,7 +66,7 @@ except ImportError: # this does not change, we can cache it _dmi_data = None -_dmi_not_available = 0 +_dmi_not_available = 0 if dmidecode_present else 1 def dmi_warnings(): if not hasattr(dmidecode, 'get_warnings'):