-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not strip VCS tags leading "V" and do not use a "version_prefix" PURL qualifier #153
Comments
The proposed change in this issue sounds like a good idea to me, but I think it might require some major data upgrades to all the AboutCode projects? |
I am going to guess that the stripping of prefix literals from a package version was a conscious decision at some point in order to facilitate version range sorting and comparisons by "normalizing" the version to the numeric value only. In hindsight, that may not have been a good idea, but changing/fixing that to do something else might also have an impact on any of the AboutCode tools that work with versioning. |
We need to determine which types of packages are affected - perhaps starting with the set of Packages in the DejaCode reference data. This seems to be characteristic of GitHub (including the AboutCode repos) with a "v" in the Download URL and uncommon for many package types like maven, npm or pypi.
|
My point is that when the package version comes from a git tag it should NEVER be stripped from a suffix. Tags (and versions in general) should NOT be modified as this does not help with anything but impair portability.
The tags themselves should not be stored as modified to accommodate either of these concerns. @tdruez we need to find a way to revert that change |
Signed-off-by: tdruez <[email protected]>
@tdruez Everything looks good on staging. I tried multiple variants, including a package without release tags, and everything was generated without problems. I also did a number of "round trips" between dataspaces using purl values and that all worked great as well. The re-genned packages are all valid, as far as I can tell. I think it's ready to deploy, and thanks for taking care of this. |
On the other hand (and you undoubtedly know this already) the issue reported regarding pkg:github/apache/[email protected] in issue #149 is still a problem. |
@DennisClark the version should be exactly The only way out of this would be to track the actual tagging scheme for each and every package which sounds like a wild goose chase. Or just have the logic for all packages in one place which is what https://github.com/nexB/purldb/tree/main/purl2vcs does exactly |
* Upgrade packageurl-python to latest 0.15.5 version #153 Signed-off-by: tdruez <[email protected]> * Upgrade packageurl-python to latest 0.15.6 version #149 Signed-off-by: tdruez <[email protected]> --------- Signed-off-by: tdruez <[email protected]>
Fix merged and deployed. |
Describe the bug
Do not strip VCS tags leading "V" or "v" as it creates weird and impossible to use PURLs.
See also:
To Reproduce
Steps to reproduce the behavior:
pkg:github/elliotchance/[email protected]?version_prefix=v
Expected behavior
PURL should be
pkg:github/elliotchance/[email protected]
We should reuse tags as-is.
The text was updated successfully, but these errors were encountered: