StaticSrcUri suggests change for downloaded patch from github, should ignore patterns in only replacement filename
Original discussion in https://github.com/pkgcore/pkgcheck/issues/451#issuecomment-1374477237
Copy-pasting for a new issue report:
Here's the commit: https://github.com/gentoo/gentoo/commit/67e0c923557984eda05b09fcad093c0840ef8a12
and ebuild: https://github.com/gentoo/gentoo/blob/67e0c923557984eda05b09fcad093c0840ef8a12/app-containers/lxd/lxd-5.0.1-r4.ebuild#L11
So today I saw this for lxd:
StaticSrcUri: version 5.0.1-r4: '5.0' in SRC_URI, replace with $(ver_cut 1-2)
this makes no sense to me. I'd have to: $(ver_cut 1-2).1-r4? Note that the static numbering is for a distfile, not from upstream URL.
Yeah, I think the key distinction here is that the version only appears to the right, i.e. for the renamed distfile, so in fact using a variable would be worse (not just useless/noisy) because one could end up downloading it for future versions unnecessarily.
If we're applying a rename and the matched pattern is only for the distfile name, we shouldn't emit a warning.