#113 set centos and undefine fedora in rpmdefines section
Merged a month ago by tdawson. Opened a month ago by tdawson.
centos/ tdawson/centpkg undefine-fedora  into  develop

file modified
+7
@@ -217,6 +217,7 @@ 

          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,12 @@ 

              # This is so the rhel macro is set for spec files

              "--define",

              "rhel %s" % self._distval.split("_")[0],

+             # This is so the centos macro is set for spec files

+             "--define",

+             "centos %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)

  

resolves centpkg issue #111 and #112

Signed-off-by: Troy Dawson tdawson@redhat.com

Note:
I set self._distunset = 'fedora' very similar to how fedpkg does it, so if we ever need to make it conditional, we can.

1 new commit added

  • define centos in rpmdefines section
a month ago

I think this is fine. I've been trying to think of any situation where this would cause issues and I can't come up with anything.

:thumbsup:

Thanks for the reviews, merging.

Pull-Request has been merged by tdawson

a month ago
Metadata