Skip to content

Fix AnityaDistribution version detection with set_version service#19375

Open
Sahitya0805 wants to merge 1 commit intoopenSUSE:masterfrom
Sahitya0805:fix-anitya-distribution-version
Open

Fix AnityaDistribution version detection with set_version service#19375
Sahitya0805 wants to merge 1 commit intoopenSUSE:masterfrom
Sahitya0805:fix-anitya-distribution-version

Conversation

@Sahitya0805
Copy link
Copy Markdown
Contributor

@Sahitya0805 Sahitya0805 commented Mar 2, 2026

Hi friends,

This PR fixes an issue where AnityaDistribution reports an incorrect package version when the set_version service is used in buildtime mode.

In such cases, the version defined in the .spec file remains unchanged, while the actual version is updated dynamically by the _service during build time. As a result, the detected version was not reflecting the effective version produced by the service.

Fix

This change updates the version detection logic to prefer the version from _service-generated sourceinfo entries (identified via _service: filenames), and falls back to the default sourceinfo when not present.

Why this approach

  • Keeps the change minimal and focused
  • Uses already available backend data without additional API complexity

Result

The detected version now correctly reflects the version modified by the set_version service.

Fixes: #18610

Thanks!

@github-actions github-actions bot added the Frontend Things related to the OBS RoR app label Mar 2, 2026
@eduardoj
Copy link
Copy Markdown
Member

eduardoj commented Mar 2, 2026

This PR includes a commit "Fix crash when creating an existing patchinfo package issue" not related to fixing the issue...

@Sahitya0805
Copy link
Copy Markdown
Contributor Author

Thanks for pointing that out!

You’re right — the patchinfo fix addresses a different issue.
I’ll remove it from this PR so it only contains the AnityaDistribution fix

@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch from f6587e1 to c9e8bbf Compare March 2, 2026 12:13
@Sahitya0805 Sahitya0805 marked this pull request as draft March 2, 2026 12:14
@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch 4 times, most recently from cdf88d0 to 758732d Compare March 3, 2026 17:07
@github-actions github-actions bot added the Test Suite / CI 💉 Things related to our tests/CI label Mar 6, 2026
@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch 11 times, most recently from 15386a5 to 6b4666f Compare March 6, 2026 19:33
@Sahitya0805 Sahitya0805 marked this pull request as ready for review March 8, 2026 06:56
@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch from 6b4666f to 21a9b96 Compare March 15, 2026 06:53
@hennevogel
Copy link
Copy Markdown
Member

@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch from 21a9b96 to 3e2ef49 Compare March 16, 2026 12:11
@Sahitya0805 Sahitya0805 marked this pull request as draft March 16, 2026 12:14
@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch from 3e2ef49 to 917345e Compare March 16, 2026 12:17
@Sahitya0805 Sahitya0805 marked this pull request as ready for review March 16, 2026 13:21
@Sahitya0805 Sahitya0805 marked this pull request as draft March 16, 2026 13:40
@Sahitya0805
Copy link
Copy Markdown
Contributor Author

Thanks for the clarification! I've removed the test and kept the PR focused on the fix.

@Sahitya0805 Sahitya0805 marked this pull request as ready for review March 16, 2026 13:42
@hennevogel hennevogel force-pushed the fix-anitya-distribution-version branch from 2fd53cd to 22fc9ec Compare March 17, 2026 10:42
@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch 5 times, most recently from e3afecb to ccaf7a8 Compare March 29, 2026 08:51
@Sahitya0805 Sahitya0805 force-pushed the fix-anitya-distribution-version branch from ccaf7a8 to 5145bf5 Compare March 29, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Things related to the OBS RoR app Test Suite / CI 💉 Things related to our tests/CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect package version detected by AnityaDistribution attribute with set_version

3 participants