From e30287615aea3ee31a4e7b00c11d0e92439d8b03c42d09bfe96b03b74bb7695e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 20 Nov 2022 00:36:31 +0000 Subject: [PATCH] Accepting request 1036671 from home:dimstar:Factory - Cope with memcached moving from sbindir to bindir and safeguard against non-existing memcached binary: it if can't be started, there is no reason to even attempt to run the test suite. OBS-URL: https://build.opensuse.org/request/show/1036671 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylibmc?expand=0&rev=18 --- python-pylibmc.changes | 7 +++++++ python-pylibmc.spec | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/python-pylibmc.changes b/python-pylibmc.changes index f11c90e..859f6fd 100644 --- a/python-pylibmc.changes +++ b/python-pylibmc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 18 14:59:02 UTC 2022 - Dominique Leuenberger + +- Cope with memcached moving from sbindir to bindir and safeguard + against non-existing memcached binary: it if can't be started, + there is no reason to even attempt to run the test suite. + ------------------------------------------------------------------- Fri Dec 10 03:36:04 UTC 2021 - Steve Kowalik diff --git a/python-pylibmc.spec b/python-pylibmc.spec index 2e2fdbd..c466589 100644 --- a/python-pylibmc.spec +++ b/python-pylibmc.spec @@ -1,7 +1,7 @@ # # spec file for package python-pylibmc # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -58,7 +58,14 @@ export CFLAGS="%{optflags}" %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -%{_sbindir}/memcached & +if [ -f %{_sbindir}/memcached ]; then + %{_sbindir}/memcached & +elif [ -f %{_bindir}/memcached ]; then + %{_bindir}/memcached & +else + echo "Failed to start memcached - tests can't pass" + exit 1 +fi pid=$! %pytest_arch -k 'not testBigGetMulti' kill $pid