Skip to content

Conversation

@lslezak
Copy link
Contributor

@lslezak lslezak commented Apr 8, 2025

Problem

  • To find whether an Agama package contains a certain fix is not easy.
  • The package version contains the Git version tag + number of commits since that tag, so it is possible to find that respective commit but that is not trivial.
  • Moreover if the package comes from a different branch the number of commits can be the same as in master but with different content. The version number is not unique.

Solution

  • Include the short Git commit hash in the package version.
  • Then finding the appropriate Git commit in the history is trivial.
  • This makes the version unique even for different branches or forks.

Testing

  • Tested manually in https://build.opensuse.org/project/show/systemsmanagement:Agama:branches:git_commit_in_version OBS project

  • When listing the installed package versions the Git commit is included (highlighted with extra grep):

    image

  • Note: All packages have the save version/Git commit because I updated all of them in a single commit. Later the versions will be more different.

  • Zypper (libzypp) treats the versions correctly, the number of commits takes precedence so even if the Git commit uses a lower number the higher commit count is correctly evaluated as a newer version:

    image

  • That means updating the packages in the potential self-update will work correctly.

Make finding the relevant Git change and history easier.
@lslezak lslezak merged commit 10273f7 into master Apr 8, 2025
19 checks passed
@lslezak lslezak deleted the git_commit_in_version branch April 8, 2025 12:57
@imobachgs imobachgs mentioned this pull request Apr 22, 2025
imobachgs added a commit that referenced this pull request Apr 22, 2025
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.

3 participants