From: Nathan Cutler Date: Mon, 29 Jan 2018 12:44:43 +0000 (+0100) Subject: build/ops: rpm: fix _defined_if_python2_absent conditional X-Git-Tag: v13.0.2~392^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f57e00db801d5dffa4e5fd1015251fc5c58d1513;p=ceph.git 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 --- 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