Skip to content

Commit

Permalink
Add support for Obsoletes tag in RPM definition (#778)
Browse files Browse the repository at this point in the history
Currently there doesn't appear to be any support `Obsoletes` in our
RPM structure.  This change introduces the support for the `Obsoletes`
tag in the RPM specfile.  Unlikely `Requires`, there doesn't appear to
be a context-specific `Obsoletes`, so this is not added here.
  • Loading branch information
kellyma2 committed Nov 13, 2023
1 parent b5d3071 commit 9dd0c8c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/rpm_pfg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ def _pkg_rpm_impl(ctx):
preamble_pieces.extend(["Provides: " + p for p in ctx.attr.provides])
if ctx.attr.conflicts:
preamble_pieces.extend(["Conflicts: " + c for c in ctx.attr.conflicts])
if ctx.attr.obsoletes:
preamble_pieces.extend(["Obsoletes: " + o for o in ctx.attr.obsoletes])
if ctx.attr.requires:
preamble_pieces.extend(["Requires: " + r for r in ctx.attr.requires])
if ctx.attr.requires_contextual:
Expand Down Expand Up @@ -924,6 +926,14 @@ pkg_rpm = rule(
See also: https://rpm-software-management.github.io/rpm/manual/dependencies.html
""",
),
"obsoletes": attr.string_list(
doc = """List of rpm capability expressions that this package obsoletes.
Corresponds to the "Obsoletes" preamble tag.
See also: https://rpm-software-management.github.io/rpm/manual/dependencies.html
""",
),
"requires": attr.string_list(
doc = """List of rpm capability expressions that this package requires.
Expand Down

0 comments on commit 9dd0c8c

Please sign in to comment.