pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/59539: pkgtools/pkg_install: pkg_info(1) renders relational operators as one character



>Number:         59539
>Category:       pkg
>Synopsis:       pkgtools/pkg_install: pkg_info(1) renders relational operators as one character
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 21 15:55:00 +0000 2025
>Originator:     Robert Whitlock
>Release:        pkgsrc current, July 21, 2025
>Organization:
>Environment:
NetBSD current
>Description:
pkg_info(1) prints the >= and <= operators as single characters instead of two characters. The pkg_info program only accepts the two-character form, not the one-character form.

According to mdoc(7) (which redirects to groff_mdoc(7)) in the PREDEFINED STRINGS section, the single-character form is used by troff but not nroff. I have LC_CTYPE=en_US.UTF-8, and the single-character form can be inhibited by running

env -u LC_CTYPE man pkg_info
>How-To-Repeat:
Set LC_CTYPE appropriately.
Use a terminal emulator that has Unicode support.
man pkg_info
>Fix:
Index: pkg_info.1
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/info/pkg_info.1,v
retrieving revision 1.34
diff -u -r1.34 pkg_info.1
--- pkg_info.1	11 Jan 2015 22:53:44 -0000	1.34
+++ pkg_info.1	21 Jul 2025 15:22:41 -0000
@@ -245,33 +245,33 @@
 style {,} alternates have been implemented.
 Package version numbers can also be matched in a relational manner
 using the
-.Dq \*[Ge] ,
-.Dq \*[Le] ,
-.Dq \*[Gt] ,
+.Dq >= ,
+.Dq <= ,
+.Dq > ,
 and
-.Dq \*[Lt]
+.Dq < 
 operators.
 For example,
-.Dl pkg_info -e 'name\*[Ge]1.3'
+.Dl pkg_info -e 'name>=1.3'
 will match versions 1.3 and later of the
 .Dq name
 package.
 (Make sure to use shell quoting.)
 Additionally, ranges can be defined, by giving both a lower bound
 .Po with
-.Dq \*[Gt]
+.Dq >
 or
-.Dq \*[Ge]
+.Dq >=
 .Pc
 as well as an upper bound
 .Po with
-.Dq \*[Lt]
+.Dq <
 or
-. Dq \*[Le]
+. Dq <=
 .Pc .
 The lower bound has to come first.
 For example,
-.Dl pkg_info -e 'name\*[Ge]1.3\*[Lt]2.0'
+.Dl pkg_info -e 'name>=1.3<2.0'
 will match versions 1.3 (inclusive) to 2.0 (exclusive) of package
 .Dq name .
 .Pp



Home | Main Index | Thread Index | Old Index