Gentoo Archives: gentoo-pms

From: "Michał Górny" gentoo-pms@l.g.o "Michał Górny" [gentoo-pms] [PATCH] pkg-mgr-commands: Correct ver_cut and ver_rs to use ${PV} by default Mon, 08 Jul 2019 16:50:29 20190708165022.26580-1-mgorny@gentoo.org  1 Correct the description of ver_cut and ver_rs commands to indicate 2 that they process${PV} when no version argument is specified, rather 3 than wrongly ${PVR}. 4 5 It seems that the latter was introduced as a typo, as it neither agrees 6 with initial Bugzilla proposal of the function [1], pre-EAPI 7 implementation in eapi7-ver.eclass [2] or EAPI 7 cheatsheet in PMS. 8 Furthermore, it simply makes little sense as the common usage of those 9 functions is to manipulate URLs and filenames, and those do not use 10 ebuild revisions.. 11 12 It is also how it was implemented in Portage, and initially in PkgCore 13 (afterwards the PkgCore implementation changed to conform to PMS, with 14 expectably breaking results). 15 16 [1] https://bugs.gentoo.org/482170#c15 17 [2] https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/eapi7-ver.eclass?id=59a1a0dda7300177a263eb1de347da493f09fdee 18 19 Signed-off-by: Michał Górny 20 --- 21 pkg-mgr-commands.tex | 4 ++-- 22 1 file changed, 2 insertions(+), 2 deletions(-) 23 24 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex 25 index e3e831f..95e3306 100644 26 --- a/pkg-mgr-commands.tex 27 +++ b/pkg-mgr-commands.tex 28 @@ -954,7 +954,7 @@ the second, inclusively. 29 \item[ver_cut] Takes a range as the first argument, and optionally a version string as the second. 30 Prints a substring of the version string starting at the version component specified as start 31 of the range and ending at the version component specified as end of the range. If the version 32 - string is not specified, \t{\$\{PVR\}} is used. 33 + string is not specified, \t{\$\{PV\}} is used. 34 35 If the range spans outside the present version components, the missing components and separators 36 are presumed empty. In particular, the range starting at zero includes the zeroth version 37 @@ -965,7 +965,7 @@ the second, inclusively. 38 \item[ver_rs] Takes one or more pairs of arguments, optionally followed by a version string. 39 Every argument pair specifies a range and a replacement string. Prints a version string after 40 performing the specified separator substitutions. If the version string is not specified, 41 - \t{\$\{PVR\}} is used. 42 + \t{\\$\{PV\}} is used. 43 44 For every argument pair specified, each of the version separators present at indices specified 45 by the range is replaced with the replacement string, in order. If the range spans outside 46 -- 47 2.22.0