#59 added rhel macro to the rpmdefines
Merged 2 years ago by tdawson. Opened 2 years ago by dfan.
centos/ dfan/centpkg rhel-macro  into  develop

file modified
+3 -1
@@ -196,7 +196,9 @@ 

                              '--define', '_rpmdir %s' % self.layout.rpmdir,

                              '--define', 'dist .%s' % self._disttag,

                              # int and float this to remove the decimal

-                             '--define', '%s 1' % self._disttag]

+                             '--define', '%s 1' % self._disttag,

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

+                             '--define', 'rhel %s' % self._distval.split('_')[0]]

          self.log.debug("RPMDefines: %s" % self._rpmdefines)

  

      def construct_build_url(self, *args, **kwargs):

Fixes https://git.centos.org/centos/centpkg/issue/33

This should make the %rhel conditionalized sources be added to a srpm

Depends on rpkg 1.65+

You should use ' instead of " to keep consistency with the rest of the function.

But other than that, it works in all my tests. I haven't hit any bugs because of it either.

My bad! The rhpkg I was looking at was using ". I'll fix it now and push

rebased onto 179163f

2 years ago

Looks good. Thank you for this.

Pull-Request has been merged by tdawson

2 years ago
Metadata