From 441ee7a696558e450c31718c81f3a49163b59fb8 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Oct 17 2024 21:25:55 +0000 Subject: undefine fedora in rpmdefines section resolves centpkg issue #111 Signed-off-by: Troy Dawson --- diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index 3d09d1c..e52a0c9 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -217,6 +217,7 @@ class Commands(Commands): self._distvar = self.distgitdir.centosversion self._distval = self._distvar.replace(".", "_") + self._distunset = 'fedora' self._disttag = "el%s" % self._distval self._rpmdefines = [ "--define", @@ -237,6 +238,9 @@ class Commands(Commands): # This is so the rhel macro is set for spec files "--define", "rhel %s" % self._distval.split("_")[0], + # This is so the fedora macro is unset for spec files + "--eval", + "%%undefine %s" % self._distunset, ] self.log.debug("RPMDefines: %s" % self._rpmdefines)