Closed thesamesam closed 1 year ago
@thesamesam Some basic implementation gave those results. Should we continue with it?
I have also added some code to catch for other gitlab instances (I catch all domains that have the word gitlab
in it). I suggest to replace tar.gz
, tar
and zip
with tar.bz2
Perhaps instead of printing the URL twice we could just print the original URL and the suggested suffix?
Yeah, looks good to me @arthurzam! Thank you! I don't mind if we use mgorny's suggestion and it might be better as it's smaller output.
This is an offshoot of https://github.com/pkgcore/pkgcheck/issues/474 as it's really easy to implement and it's a simpler rule.
gitlab provides .tar.bz2 for its "download a tag" links (e.g. https://gitlab.com/accounts-sso/libaccounts-glib/-/tags/1.26).
We can easily detect when something is using the following and suggest a replacement, just like
ObsoleteUri
does right now for github ancient tarball links:The above example is from net-libs/libaccounts-glib at 14391c2df186a086e429ae3d678f9c2859257ea7.
So, all we have to do is look for "gitlab.com///-/archive//.gz" and suggest bz2 instead, I think?