commit:     248f1eaefec15b7c9537ad68a818e34065036b0d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  8 16:44:07 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul  8 19:14:56 2019 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=248f1eae

pkg-mgr-commands: Correct ver_cut and ver_rs to use ${PV} by default

Correct the description of ver_cut and ver_rs commands to indicate
that they process ${PV} when no version argument is specified, rather
than wrongly ${PVR}.

It seems that the latter was introduced as a typo, as it neither agrees
with initial Bugzilla proposal of the function [1], pre-EAPI
implementation in eapi7-ver.eclass [2] or EAPI 7 cheatsheet in PMS.
Furthermore, it simply makes little sense as the common usage of those
functions is to manipulate URLs and filenames, and those do not use
ebuild revisions..

It is also how it was implemented in Portage, and initially in PkgCore
(afterwards the PkgCore implementation changed to conform to PMS, with
expectably breaking results).

[1] https://bugs.gentoo.org/482170#c15
[2] 
https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/eapi7-ver.eclass?id=59a1a0dda7300177a263eb1de347da493f09fdee

Bug: https://bugs.gentoo.org/689494
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 pkg-mgr-commands.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index e3e831f..95e3306 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -954,7 +954,7 @@ the second, inclusively.
 \item[ver_cut] Takes a range as the first argument, and optionally a version 
string as the second.
     Prints a substring of the version string starting at the version component 
specified as start
     of the range and ending at the version component specified as end of the 
range. If the version
-    string is not specified, \t{\$\{PVR\}} is used.
+    string is not specified, \t{\$\{PV\}} is used.
 
     If the range spans outside the present version components, the missing 
components and separators
     are presumed empty. In particular, the range starting at zero includes the 
zeroth version
@@ -965,7 +965,7 @@ the second, inclusively.
 \item[ver_rs] Takes one or more pairs of arguments, optionally followed by a 
version string.
     Every argument pair specifies a range and a replacement string. Prints a 
version string after
     performing the specified separator substitutions. If the version string is 
not specified,
-    \t{\$\{PVR\}} is used.
+    \t{\$\{PV\}} is used.
 
     For every argument pair specified, each of the version separators present 
at indices specified
     by the range is replaced with the replacement string, in order. If the 
range spans outside

Reply via email to