Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-67473

Make use of bcond macro in spec file

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-10.0
    • rhel-10.0
    • iptables
    • None
    • iptables-1.8.11-6.el10
    • No
    • None
    • rhel-sst-networking-core
    • ssg_networking
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      Neal Gompa writes[1]:

      "Not required for this MR, but FYI, this could be made more natural using build conditions:

      - %global do_legacy_pkg ! 0%{?rhel}
      + %bcond build_legacy_pkg [ ! 0%{?rhel} ]
      

      And %

      {do_legacy_pkg}

      can be replaced with %

      {with build_legacy_pkg}

      throughout the spec."

      While at it, guard %package and %description sections of legacy packages by the macro as well, suggested by Michel Lind[2].

      [1] https://gitlab.com/redhat/centos-stream/rpms/iptables/-/merge_requests/67#note_2206996129
      [2] https://gitlab.com/redhat/centos-stream/rpms/iptables/-/commit/4f61921d62f73298201513dc84ee351f607e6e77?merge_request_iid=67

              psutter@redhat.com Phil Sutter
              psutter@redhat.com Phil Sutter
              Phil Sutter Phil Sutter
              qe-baseos-daemons qe-baseos-daemons
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: