BioArchLinux / Packages

Aim to be the bioinformatics repository with more and newer packages
https://bioarchlinux.org/packages
GNU Affero General Public License v3.0
82 stars 9 forks source link

[BUG] Inconsistent r-speedglm version numbering: 0.3_5 instead 0.3.5 #152

Closed brianmsm closed 1 year ago

brianmsm commented 1 year ago

This is not an error directly associated with installing the package from the command line. However, the PKGBUILD configuration file does not follow the usual coding of _pkgver to request download on CRAN and pkgver to publish to repository so the versioning follows the archlinux guideline: https://wiki.archlinux.org/title/Arch_package_guidelines#Package_versioning

I see that in a previous commit those variables were removed to use only pkgver, although I'm not sure why: https://github.com/BioArchLinux/Packages/commit/25888a1562768071d2f56b39c5b05b5485dac1b2

All other packages in this repository follow this proper versioning practice, e.g.: https://github.com/BioArchLinux/Packages/blob/master/BioArchLinux/r-lavaan/PKGBUILD

Desktop:

Additional context Just to complement. Currently, speedglm versioning causes a conflict when trying to install under the bspm package: https://github.com/Enchufa2/bspm/issues/71

pekkarr commented 1 year ago

Thanks for reporting, it should get fixed when the package gets rebuilt in about an hour

sukanka commented 1 year ago

@pekkarr plz note that according to arch wiki, dash in pkgver should be replaced with underscore instead of dot. see https://wiki.archlinux.org/title/PKGBUILD#pkgver

pekkarr commented 1 year ago

dash in pkgver should be replaced with underscore instead of dot

On the other hand, the R package guidelines page has the following advice:

R allows packages to have colons and hyphens in their version, this is disallowed in PKGBUILDs. Convert these to a period or underscore.

Also almost all R packages in this repo and in AUR use dot as the replacement. I don't see any benefits to using underscores instead, so in my opinion we should continue using dots instead of underscores.

In addition to that, we are not only replacing hyphens but colons too, so replacing them both with a dot makes sense, because then we don't need different conversions for each of them and the same pkgver=${_pkgver//[:-]/.} definition works for both.

sukanka commented 1 year ago

I suggest using underscore as we can get a one-to-one mapping between the R pkg version and pkgver in PKGBUILD. the colon can be replaced with another symbol such as + (but this is not semantic.)

Also almost all R packages in this repo and in AUR use dot as the replacement.

Maybe they are all wrong? Most of them are maintained by us.


BTW, I'd like to add some examples from official repo,

pekkarr commented 1 year ago

Apparently colons aren't allowed in R package versions, as the Writing R Extensions guide states that

The mandatory ‘Version’ field gives the version of the package. This is a sequence of at least two (and usually three) non-negative integers separated by single ‘.’ or ‘-’ characters.

I also checked all packages in CRAN and Bioconductor, and none of them have a colon in version. So there's no need to have colon replacing code after all.

we can get a one-to-one mapping between the R pkg version and pkgver in PKGBUILD

What is the use case for this? Why would this be needed?

Maybe they are all wrong?

I don't think using either is wrong. The R package guidelines allow both, but for consistency we should choose one and use that in all R packages.

Most of them are maintained by us.

Even for the packages not maintained by us replacing with dot is far more common. I don't remember seeing any R package on AUR that uses underscore (except r-speedglm), probably because the templates in R package guidelines all use dot as the replacement.

I'd like to add some examples from official repo

Yeah, it seems that underscores are commonly used for replacing hyphens. However, dots are used too for that purpose. The most notable example of this is the official r package, that replaces hyphens in bundled R packages' versions with a dot when adding them to its provides array.

However, if we do decide to use underscores instead, that should be changed in all maintained R packages. Also the colon replacing code should be removed, probably at the same time if we switch to underscores.

sukanka commented 1 year ago

Ok. Since the template in R packages guideline use dot for both hyphens and colon, let's keep this convention.

The most notable example of this is the official r package, that replaces hyphens in bundled R packages' versions with a dot when adding them to its provides array.

I have to mention that it is proposed by me. https://bugs.archlinux.org/task/74850 So this does not persuade me.

But the template does.

pekkarr commented 1 year ago

Let's keep using dots then.

However, the R package guidelines aren't that accurate. They claim that upstream R package versions can contain colons, which is false. They also say to put packages in the LinkingTo field to depends, even though those should really go to makedepends (unless they're also in Depends or Imports).

starsareintherose commented 1 year ago

Should this issue be closed?