Conversion of "Floating" versions
s/of 3/of 3 digits/
Using this in ebuilds
Is there an eclass or something that uses this algorithm to translate $PV to $DIST_VERSION automatically? It's really tedious trying to follow these best practices in an overlay when every version bump requires a bunch of easy-to-forget busywork. -- Ant P. (talk) 00:32, 1 February 2020 (UTC)
- Its not possible to convert $PV to $DIST_VERSION, as the inverse transformation ( $DIST_VERSION to $PV ) is inherently lossy. Specifically, the lost information is the specific upstream format used (of which there are many), which cannot be trivially converted from $PV, and upstream has a tendency to change their version scheme randomly. Thus, even if you codified what you thought was the upstream format used, during a bump, the upstream format may change sufficient that you encounter the exact same problem: The scheme specification becomes wrong, and the translation of $PV to $DIST_VERSION fails.
- I would instead encourage you to have some sort of local tooling where you pumped in the upstream version you intend to ship, and have it handle the conversion from $DIST_VERSION to $PV and uses that value for the "new" ebuild, which is based on a previous "old" ebuild. --kent\n 06:30, 1 February 2020 (UTC)