View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0017831||website||website||public||2020-11-04 22:15||2020-11-12 16:01|
|Target Version||Fixed in Version|
|Summary||0017831: Missing Epoch on "import" commits on git.centos.org makes it extremely difficult to reliably find the latest version|
|Description||I'm trying to write a script to retrieve the source for the latest version of an RPM from git.centos.org - basically `yumdownloader --source` but using git repos instead of yum repos. Unfortunately, reliably identifying the latest version is proving to be quite challenging.|
In each RPM repo on git.centos.org, a single branch is used for each major release (eg. "c8" for CentOS 8.*), and commits for all minor releases (eg. CentOS 8.1 and 8.2) are mixed together in the same branch. Because of this, and the fact that multiple versions of the same RPM may be maintained for different minor releases simultaneously/asynchronously, the latest commit in a branch does not reliably correspond with the latest version of the RPM.
For example, in https://git.centos.org/rpms/java-11-openjdk/tree/c8 :
https://git.centos.org/rpms/java-11-openjdk/c/0b2558c84aff4c2c2fe0a0d3981b09ba93f312c5?branch=c8 imported java-11-openjdk-18.104.22.168-1.el8_1
before https://git.centos.org/rpms/java-11-openjdk/c/aa59cc3aacb503e3723eefd125b99c6c7681a253?branch=c8 imported java-11-openjdk-22.214.171.124-4.el8
and then no further versions were imported for a few months after that.
To handle this, I currently parse the version number out of each "import" commit message, then use rpmdev-vercmp to compare the version numbers and identify the latest version number. However, since the version numbers in the "import" commit messages (and associated tags) do not include the Epoch, this falls apart for any RPMs that have changed their Epoch. There doesn't appear to be any way to rectify that problem short of extracting and parsing the spec file from every "import" commit.
Could the scripts that generate these "import" commit messages and associated tags be updated to include the Epoch in the version number to fix this problem?
|Tags||No tags attached.|
|Unfortunately probably there is nothing the people from the CentOS project can do for you because the git push process is 100% under the control of RedHat people. CentOS is just a consumer of the content originated from RH.|
|I've opened a ticket with RedHat. I will keep this ticket updated with status.|