Skip to content

Conversation

@nforro
Copy link
Member

@nforro nforro commented Nov 19, 2025

It turns out simple bump_release() is not enough, there can be e.g. Z-Stream release in a Y-Stream branch.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the release version handling for spec files, particularly for Y-Stream branches, to correctly manage complex release strings. The new logic is more robust and is supported by additional test cases. The refactoring also improves code clarity by extracting helper methods and removing duplication.

My review includes two suggestions for agents/tools/specfile.py:

  1. Optimize the _bump_or_reset_release method to reduce file I/O by opening the spec file only once.
  2. Correct the async usage in _bump_or_reset_release, as it contains synchronous blocking code, which can be problematic in an asynchronous application.

Overall, the changes are a good improvement to the release management logic.

Copy link
Member

@majamassarini majamassarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I really understand it. But I am ok with testing it 😅

@nforro
Copy link
Member Author

nforro commented Nov 19, 2025

Not that I really understand it. But I am ok with testing it 😅

Basically, this is to avoid:

 Name:           libxml2
 Version:        2.9.7
-Release:        21%{?dist}.3
+Release:        22%{?dist}.3
 Summary:        Library providing XML and HTML support

 License:        MIT

It needs to be either 21%{?dist}.4 or 22%{?dist}. I implemented the latter because this is a Y-Stream branch (even though it's a maintenance release Z-Stream, which is maybe why the maintainer did this).

@nforro nforro merged commit e53874d into packit:main Nov 19, 2025
7 checks passed
@nforro nforro deleted the release branch November 19, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants