Hello community, here is the log from the commit of package salt for openSUSE:Factory checked in at 2016-03-17 16:34:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/salt (Old) and /work/SRC/openSUSE:Factory/.salt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt" Changes: -------- --- /work/SRC/openSUSE:Factory/salt/salt.changes 2016-03-07 13:28:38.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.salt.new/salt.changes 2016-03-17 16:48:08.000000000 +0100 @@ -1,0 +2,25 @@ +Sat Mar 12 17:08:03 UTC 2016 - [email protected] + +- fix detection of base products in SLE11 + * 0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch +- fix rpm info for SLE11 + * 0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch + * 0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch +- fix init system detection for SLE11 + * 0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch + +------------------------------------------------------------------- +Fri Mar 11 14:42:52 UTC 2016 - [email protected] + +- Re-add corrected patch: + 0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch + +------------------------------------------------------------------- +Wed Mar 9 09:39:09 UTC 2016 - [email protected] + +- Make checksum configurable (upstream still wants md5, we + suggest sha256). bsc#955373 + Add: + 0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch + +------------------------------------------------------------------- New: ---- 0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch 0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch 0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch 0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch 0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ salt.spec ++++++ --- /var/tmp/diff_new_pack.1TaNUj/_old 2016-03-17 16:48:09.000000000 +0100 +++ /var/tmp/diff_new_pack.1TaNUj/_new 2016-03-17 16:48:09.000000000 +0100 @@ -96,6 +96,15 @@ # PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31629 Patch27: 0027-make-suse-check-consistent-with-rh_service.patch Patch28: 0028-fix-numerical-check-of-osrelease.patch +# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31162 +Patch29: 0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch +# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31786 +Patch30: 0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch +# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31445 +Patch31: 0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch +Patch32: 0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch +# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/31793 +Patch33: 0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: logrotate @@ -466,6 +475,11 @@ %patch26 -p1 %patch27 -p1 %patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 %build python setup.py --salt-transport=both build ++++++ 0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch ++++++ ++++ 734 lines (skipped) ++++++ 0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch ++++++ >From 79d5477cfa5e85d2480bb07e49ecaeff423f5238 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk <[email protected]> Date: Thu, 10 Mar 2016 13:25:20 +0100 Subject: [PATCH 30/33] Bugfix: on SLE11 series base product reported as additional Add SLE11 product info snapshot, rename previous Update test case to cover SLE11 and SLE12 --- salt/modules/zypper.py | 2 +- .../unit/modules/zypp/zypper-products-sle11sp3.xml | 37 +++++++++++++++ .../unit/modules/zypp/zypper-products-sle12sp1.xml | 37 +++++++++++++++ tests/unit/modules/zypp/zypper-products.xml | 37 --------------- tests/unit/modules/zypper_test.py | 52 +++++++++++++--------- 5 files changed, 107 insertions(+), 58 deletions(-) create mode 100644 tests/unit/modules/zypp/zypper-products-sle11sp3.xml create mode 100644 tests/unit/modules/zypp/zypper-products-sle12sp1.xml delete mode 100644 tests/unit/modules/zypp/zypper-products.xml diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py index d6628aa..1c6b31d 100644 --- a/salt/modules/zypper.py +++ b/salt/modules/zypper.py @@ -1373,7 +1373,7 @@ def list_products(all=False, refresh=False): for prd in doc.getElementsByTagName('product-list')[0].getElementsByTagName('product'): p_nfo = dict() for k_p_nfo, v_p_nfo in prd.attributes.items(): - p_nfo[k_p_nfo] = k_p_nfo not in ['isbase', 'installed'] and v_p_nfo or v_p_nfo == 'true' + p_nfo[k_p_nfo] = k_p_nfo not in ['isbase', 'installed'] and v_p_nfo or v_p_nfo in ['true', '1'] p_nfo['eol'] = prd.getElementsByTagName('endoflife')[0].getAttribute('text') p_nfo['eol_t'] = int(prd.getElementsByTagName('endoflife')[0].getAttribute('time_t')) p_nfo['description'] = " ".join( diff --git a/tests/unit/modules/zypp/zypper-products-sle11sp3.xml b/tests/unit/modules/zypp/zypper-products-sle11sp3.xml new file mode 100644 index 0000000..89a85e3 --- /dev/null +++ b/tests/unit/modules/zypp/zypper-products-sle11sp3.xml @@ -0,0 +1,37 @@ +<?xml version='1.0'?> +<stream> +<message type="info">Refreshing service 'nu_novell_com'.</message> +<message type="info">Loading repository data...</message> +<message type="info">Reading installed packages...</message> +<product-list> +<product name="SUSE_SLES" version="11.3" release="1.138" epoch="0" arch="x86_64" productline="" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Linux Enterprise Server 11 SP3" shortname="" flavor="" isbase="0" repo="nu_novell_com:SLES11-SP3-Pool" installed="0"><endoflife time_t="0" text="1970-01-01T01:00:00+0100"/>0x7ffdb538e948<description>SUSE Linux Enterprise offers a comprehensive + suite of products built on a single code base. + The platform addresses business needs from + the smallest thin-client devices to the world’s + most powerful high-performance computing + and mainframe servers. SUSE Linux Enterprise + offers common management tools and technology + certifications across the platform, and + each product is enterprise-class.</description></product> +<product name="SUSE_SLES-SP4-migration" version="11.3" release="1.4" epoch="0" arch="x86_64" productline="" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE_SLES Service Pack 4 Migration Product" shortname="" flavor="" isbase="0" repo="nu_novell_com:SLES11-SP3-Updates" installed="0"><endoflife time_t="0" text="1970-01-01T01:00:00+0100"/>0x7ffdb538e948<description>SUSE Linux Enterprise offers a comprehensive + suite of products built on a single code base. + The platform addresses business needs from + the smallest thin-client devices to the world’s + most powerful high-performance computing + and mainframe servers. SUSE Linux Enterprise + offers common management tools and technology + certifications across the platform, and + each product is enterprise-class.</description></product> +<product name="SUSE_SLES" version="11.3" release="1.201" epoch="0" arch="x86_64" productline="" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Linux Enterprise Server 11 SP3" shortname="" flavor="" isbase="0" repo="nu_novell_com:SLES11-SP3-Updates" installed="0"><endoflife time_t="0" text="1970-01-01T01:00:00+0100"/>0x7ffdb538e948<description>SUSE Linux Enterprise offers a comprehensive + suite of products built on a single code base. + The platform addresses business needs from + the smallest thin-client devices to the world’s + most powerful high-performance computing + and mainframe servers. SUSE Linux Enterprise + offers common management tools and technology + certifications across the platform, and + each product is enterprise-class.</description></product> +<product name="SUSE-Manager-Server" version="2.1" release="1.2" epoch="0" arch="x86_64" productline="" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Manager Server" shortname="" flavor="cd" isbase="0" repo="nu_novell_com:SUSE-Manager-Server-2.1-Pool" installed="0"><endoflife time_t="0" text="1970-01-01T01:00:00+0100"/>0x7ffdb538e948<description>SUSE Manager Server appliance</description></product> +<product name="SUSE-Manager-Server" version="2.1" release="1.2" epoch="0" arch="x86_64" productline="manager" registerrelease="" vendor="SUSE LINUX Products GmbH, Nuernberg, Germany" summary="SUSE Manager Server" shortname="" flavor="cd" isbase="1" repo="@System" installed="1"><endoflife time_t="0" text="1970-01-01T01:00:00+0100"/>0x7ffdb538e948<description>SUSE Manager Server appliance</description></product> +</product-list> +</stream> diff --git a/tests/unit/modules/zypp/zypper-products-sle12sp1.xml b/tests/unit/modules/zypp/zypper-products-sle12sp1.xml new file mode 100644 index 0000000..1a50363 --- /dev/null +++ b/tests/unit/modules/zypp/zypper-products-sle12sp1.xml @@ -0,0 +1,37 @@ +<?xml version='1.0'?> +<stream> +<message type="info">Loading repository data...</message> +<message type="info">Reading installed packages...</message> +<product-list> +<product name="SLES" version="12.1" release="0" epoch="0" arch="x86_64" vendor="SUSE LLC <https://www.suse.com/>" summary="SUSE Linux Enterprise Server 12 SP1" repo="SLE12-SP1-x86_64-Pool" productline="" registerrelease="" shortname="SLES12-SP1" flavor="POOL" isbase="false" installed="false"><endoflife time_t="1730332800" text="2024-10-31T01:00:00+01"/><registerflavor/><description>SUSE Linux Enterprise offers a comprehensive + suite of products built on a single code base. + The platform addresses business needs from + the smallest thin-client devices to the world's + most powerful high-performance computing + and mainframe servers. SUSE Linux Enterprise + offers common management tools and technology + certifications across the platform, and + each product is enterprise-class.</description></product> +<product name="SUSE-Manager-Proxy" version="3.0" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Proxy" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="SUSE Manager Proxy" flavor="DVD" isbase="false" installed="false"><endoflife time_t="1522454400" text="2018-03-31T02:00:00+02"/><registerflavor>extension</registerflavor><description>SUSE Manager Proxies extend large and/or geographically +dispersed SUSE Manager environments to reduce load on the SUSE Manager +Server, lower bandwidth needs, and provide faster local +updates.</description></product> +<product name="SUSE-Manager-Server" version="3.0" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Server" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="SUSE Manager Server" flavor="DVD" isbase="false" installed="false"><endoflife time_t="1522454400" text="2018-03-31T02:00:00+02"/><registerflavor>extension</registerflavor><description>SUSE Manager lets you efficiently manage physical, virtual, +and cloud-based Linux systems. It provides automated and cost-effective +configuration and software management, asset management, and system +provisioning.</description></product> +<product name="sle-manager-tools-beta" version="12" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Tools" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="Manager-Tools" flavor="POOL" isbase="false" installed="false"><endoflife time_t="1509408000" text="2017-10-31T01:00:00+01"/><registerflavor>extension</registerflavor><description><p> + SUSE Manager Tools provide packages required to connect to a + SUSE Manager Server. + <p></description></product> +<product name="SLES" version="12.1" release="0" epoch="0" arch="x86_64" vendor="SUSE" summary="SUSE Linux Enterprise Server 12 SP1" repo="@System" productline="sles" registerrelease="" shortname="SLES12-SP1" flavor="DVD" isbase="true" installed="true"><endoflife time_t="1730332800" text="2024-10-31T01:00:00+01"/><registerflavor/><description>SUSE Linux Enterprise offers a comprehensive + suite of products built on a single code base. + The platform addresses business needs from + the smallest thin-client devices to the world's + most powerful high-performance computing + and mainframe servers. SUSE Linux Enterprise + offers common management tools and technology + certifications across the platform, and + each product is enterprise-class.</description></product> +</product-list> +</stream> diff --git a/tests/unit/modules/zypp/zypper-products.xml b/tests/unit/modules/zypp/zypper-products.xml deleted file mode 100644 index 1a50363..0000000 --- a/tests/unit/modules/zypp/zypper-products.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version='1.0'?> -<stream> -<message type="info">Loading repository data...</message> -<message type="info">Reading installed packages...</message> -<product-list> -<product name="SLES" version="12.1" release="0" epoch="0" arch="x86_64" vendor="SUSE LLC <https://www.suse.com/>" summary="SUSE Linux Enterprise Server 12 SP1" repo="SLE12-SP1-x86_64-Pool" productline="" registerrelease="" shortname="SLES12-SP1" flavor="POOL" isbase="false" installed="false"><endoflife time_t="1730332800" text="2024-10-31T01:00:00+01"/><registerflavor/><description>SUSE Linux Enterprise offers a comprehensive - suite of products built on a single code base. - The platform addresses business needs from - the smallest thin-client devices to the world's - most powerful high-performance computing - and mainframe servers. SUSE Linux Enterprise - offers common management tools and technology - certifications across the platform, and - each product is enterprise-class.</description></product> -<product name="SUSE-Manager-Proxy" version="3.0" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Proxy" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="SUSE Manager Proxy" flavor="DVD" isbase="false" installed="false"><endoflife time_t="1522454400" text="2018-03-31T02:00:00+02"/><registerflavor>extension</registerflavor><description>SUSE Manager Proxies extend large and/or geographically -dispersed SUSE Manager environments to reduce load on the SUSE Manager -Server, lower bandwidth needs, and provide faster local -updates.</description></product> -<product name="SUSE-Manager-Server" version="3.0" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Server" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="SUSE Manager Server" flavor="DVD" isbase="false" installed="false"><endoflife time_t="1522454400" text="2018-03-31T02:00:00+02"/><registerflavor>extension</registerflavor><description>SUSE Manager lets you efficiently manage physical, virtual, -and cloud-based Linux systems. It provides automated and cost-effective -configuration and software management, asset management, and system -provisioning.</description></product> -<product name="sle-manager-tools-beta" version="12" release="0" epoch="0" arch="x86_64" vendor="obs://build.suse.de/Devel:Galaxy:Manager:Head" summary="SUSE Manager Tools" repo="SUSE-Manager-Head" productline="" registerrelease="" shortname="Manager-Tools" flavor="POOL" isbase="false" installed="false"><endoflife time_t="1509408000" text="2017-10-31T01:00:00+01"/><registerflavor>extension</registerflavor><description><p> - SUSE Manager Tools provide packages required to connect to a - SUSE Manager Server. - <p></description></product> -<product name="SLES" version="12.1" release="0" epoch="0" arch="x86_64" vendor="SUSE" summary="SUSE Linux Enterprise Server 12 SP1" repo="@System" productline="sles" registerrelease="" shortname="SLES12-SP1" flavor="DVD" isbase="true" installed="true"><endoflife time_t="1730332800" text="2024-10-31T01:00:00+01"/><registerflavor/><description>SUSE Linux Enterprise offers a comprehensive - suite of products built on a single code base. - The platform addresses business needs from - the smallest thin-client devices to the world's - most powerful high-performance computing - and mainframe servers. SUSE Linux Enterprise - offers common management tools and technology - certifications across the platform, and - each product is enterprise-class.</description></product> -</product-list> -</stream> diff --git a/tests/unit/modules/zypper_test.py b/tests/unit/modules/zypper_test.py index f89d18f..5c4eb67 100644 --- a/tests/unit/modules/zypper_test.py +++ b/tests/unit/modules/zypper_test.py @@ -150,26 +150,38 @@ class ZypperTestCase(TestCase): ''' List products test. ''' - ref_out = { - 'retcode': 0, - 'stdout': get_test_data('zypper-products.xml') - } - with patch.dict(zypper.__salt__, {'cmd.run_all': MagicMock(return_value=ref_out)}): - products = zypper.list_products() - self.assertEqual(len(products), 5) - self.assertEqual(['SLES', 'SLES', 'SUSE-Manager-Proxy', 'SUSE-Manager-Server', 'sle-manager-tools-beta'], - sorted([prod['name'] for prod in products])) - self.assertIn('SUSE LLC <https://www.suse.com/>', [product['vendor'] for product in products]) - self.assertEqual([False, False, False, False, True], - sorted([product['isbase'] for product in products])) - self.assertEqual([False, False, False, False, True], - sorted([product['installed'] for product in products])) - self.assertEqual(['0', '0', '0', '0', '0'], - sorted([product['release'] for product in products])) - self.assertEqual([False, False, False, False, u'sles'], - sorted([product['productline'] for product in products])) - self.assertEqual([1509408000, 1522454400, 1522454400, 1730332800, 1730332800], - sorted([product['eol_t'] for product in products])) + for filename, test_data in { + 'zypper-products-sle12sp1.xml': { + 'name': ['SLES', 'SLES', 'SUSE-Manager-Proxy', + 'SUSE-Manager-Server', 'sle-manager-tools-beta'], + 'vendor': 'SUSE LLC <https://www.suse.com/>', + 'release': ['0', '0', '0', '0', '0'], + 'productline': [False, False, False, False, 'sles'], + 'eol_t': [1509408000, 1522454400, 1522454400, 1730332800, 1730332800], + 'isbase': [False, False, False, False, True], + 'installed': [False, False, False, False, True], + }, + 'zypper-products-sle11sp3.xml': { + 'name': ['SUSE-Manager-Server', 'SUSE-Manager-Server', + 'SUSE_SLES', 'SUSE_SLES', 'SUSE_SLES-SP4-migration'], + 'vendor': 'SUSE LINUX Products GmbH, Nuernberg, Germany', + 'release': ['1.138', '1.2', '1.2', '1.201', '1.4'], + 'productline': [False, False, False, False, 'manager'], + 'eol_t': [0, 0, 0, 0, 0], + 'isbase': [False, False, False, False, True], + 'installed': [False, False, False, False, True], + }}.items(): + ref_out = { + 'retcode': 0, + 'stdout': get_test_data(filename) + } + + with patch.dict(zypper.__salt__, {'cmd.run_all': MagicMock(return_value=ref_out)}): + products = zypper.list_products() + self.assertEqual(len(products), 5) + self.assertIn(test_data['vendor'], [product['vendor'] for product in products]) + for kwd in ['name', 'isbase', 'installed', 'release', 'productline', 'eol_t']: + self.assertEqual(test_data[kwd], sorted([prod[kwd] for prod in products])) def test_refresh_db(self): ''' -- 2.1.4 ++++++ 0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch ++++++ >From d3d7d20b569ad1ae5bc8a7ba1ac6652aa2e47ec5 Mon Sep 17 00:00:00 2001 From: rallytime <[email protected]> Date: Tue, 23 Feb 2016 17:20:47 -0700 Subject: [PATCH 31/33] Only use LONGSIZE in rpm.info if available. Otherwise, use SIZE. Fixes #31366 --- salt/modules/rpm.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/salt/modules/rpm.py b/salt/modules/rpm.py index 51c72c9..cdf91a6 100644 --- a/salt/modules/rpm.py +++ b/salt/modules/rpm.py @@ -422,6 +422,14 @@ def info(*packages, **attr): salt '*' lowpkg.info apache2 bash attr=version salt '*' lowpkg.info apache2 bash attr=version,build_date_iso,size ''' + # LONGSIZE is not a valid tag for all versions of rpm. If LONGSIZE isn't + # available, then we can just use SIZE for older versions. See Issue #31366. + rpm_tags = __salt__['cmd.run_all']('rpm --querytags') + rpm_tags = rpm_tags.get('stdout').split('\n') + if 'LONGSIZE' in rpm_tags: + size_tag = '%{LONGSIZE}' + else: + size_tag = '%{SIZE}' cmd = packages and "rpm -q {0}".format(' '.join(packages)) or "rpm -qa" @@ -440,7 +448,7 @@ def info(*packages, **attr): "build_host": "build_host: %{BUILDHOST}\\n", "group": "group: %{GROUP}\\n", "source_rpm": "source_rpm: %{SOURCERPM}\\n", - "size": "size: %{LONGSIZE}\\n", + "size": "size: " + size_tag + "\\n", "arch": "arch: %{ARCH}\\n", "license": "%|LICENSE?{license: %{LICENSE}\\n}|", "signature": "signature: %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:" -- 2.1.4 ++++++ 0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch ++++++ >From 5c0c3da01e3e64e7614d9d3cc52d8d9c18a06230 Mon Sep 17 00:00:00 2001 From: rallytime <[email protected]> Date: Tue, 23 Feb 2016 17:26:52 -0700 Subject: [PATCH 32/33] Add error check when retcode is 0, but stderr is present --- salt/modules/rpm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salt/modules/rpm.py b/salt/modules/rpm.py index cdf91a6..00cbd5d 100644 --- a/salt/modules/rpm.py +++ b/salt/modules/rpm.py @@ -485,6 +485,8 @@ def info(*packages, **attr): if 'stderr' in call: comment += (call['stderr'] or call['stdout']) raise CommandExecutionError('{0}'.format(comment)) + elif 'error' in call['stderr']: + raise CommandExecutionError(call['stderr']) else: out = call['stdout'] -- 2.1.4 ++++++ 0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch ++++++ >From ba08f6714222622467215c23c8284f992830e047 Mon Sep 17 00:00:00 2001 From: Richard McIntosh <[email protected]> Date: Thu, 10 Mar 2016 16:46:14 +0100 Subject: [PATCH 33/33] fixing init system dectection on sles 11, refs #31617 --- salt/modules/rh_service.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/salt/modules/rh_service.py b/salt/modules/rh_service.py index 910a75d..c8ebb52 100644 --- a/salt/modules/rh_service.py +++ b/salt/modules/rh_service.py @@ -60,14 +60,19 @@ def __virtual__(): if __grains__['os'] in enable: if __grains__['os'] == 'XenServer': return __virtualname__ + + if __grains__['os'] == 'SUSE': + if str(__grains__['osrelease']).startswith('11'): + return __virtualname__ + else: + return (False, 'Cannot load rh_service module on SUSE > 11') + try: osrelease = float(__grains__.get('osrelease', 0)) except ValueError: return (False, 'Cannot load rh_service module: ' 'osrelease grain, {0}, not a float,'.format(osrelease)) - if __grains__['os'] == 'SUSE': - if osrelease >= 12: - return (False, 'Cannot load rh_service module on SUSE >= 12') + if __grains__['os'] == 'Fedora': if osrelease > 15: return (False, 'Cannot load rh_service module on Fedora >= 15') -- 2.1.4
