]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build/ops: rpm: fix _defined_if_python2_absent conditional 20166/head
authorNathan Cutler <ncutler@suse.com>
Mon, 29 Jan 2018 12:44:43 +0000 (13:44 +0100)
committerNathan Cutler <ncutler@suse.com>
Mon, 29 Jan 2018 13:17:00 +0000 (14:17 +0100)
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 <ncutler@suse.com>
ceph.spec.in

index 50ae588d656e0552bf94d4ba2347f3dc77b9ddc3..b18d13d339833d4449ea5ab877e15f271ae26be1 100644 (file)
 %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