#140 Export a function to check whether rpmautospec is used
Closed 4 years ago by nphilipp. Opened 4 years ago by scoady.

Story Time

As a developer, I want an easy way to check whether or not a specfile is using some of rpmautospec's features so that I don't have to do it myself.

Acceptance Criteria

  • rpmautospec exports a new function rpmautospecEnabled or similar/better
  • this function checks for the existence of either %autorelease or %autochangelog
  • the signature should probably be something like:
    -- input: a specfile, which macro to check for (default should check both)
    -- output: a simple boolean
  • tests written
  • documentation added explaining the new function

Metadata Update from @nphilipp:
- Issue tagged with: F35 Change

4 years ago

I want to give consumers a way to say e.g. "I'm only interested in the use of %autorelease", and the function name should be PEP8 compliant, i.e. lowercase and separated by underscores. Here's how it could look like:

def specfile_uses_rpmautospec(specfile: str, check_autorelease: bool = True, check_autochangelog: bool = True) -> bool:
    ...

Metadata Update from @scoady:
- Issue assigned to scoady

4 years ago

Metadata Update from @amoloney:
- Issue set to the milestone: 0.2 (Stg Deployment)
- Issue tagged with: End User Testing

4 years ago

Issue status updated to: Closed (was: Open)

4 years ago

Log in to comment on this ticket.

Metadata
Boards 1
Delivery Board Status: Done