From f57e00db801d5dffa4e5fd1015251fc5c58d1513 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Mon, 29 Jan 2018 13:44:43 +0100 Subject: [PATCH] build/ops: rpm: fix _defined_if_python2_absent conditional The expectation is that _defined_if_python2_absent will be defined if (and only if) the python2 bcond is not set. Before this patch, if somebody were to build the package on suse_version 1500 with --with-python2, the _defined_if_python2_absent would be defined, which is a bug. Signed-off-by: Nathan Cutler --- ceph.spec.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ceph.spec.in b/ceph.spec.in index 50ae588d656e0..b18d13d339833 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -48,10 +48,12 @@ %endif %if 0%{?suse_version} >= 1500 %bcond_with python2 -%global _defined_if_python2_absent 1 %else %bcond_without python2 %endif +%if 0%{without python2} +%global _defined_if_python2_absent 1 +%endif %if %{with selinux} # get selinux policy version -- 2.39.5