NetBSD Problem Report #57572

From www@netbsd.org  Mon Aug  7 23:13:20 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 372341A9238
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  7 Aug 2023 23:13:20 +0000 (UTC)
Message-Id: <20230807231248.A21571A923A@mollari.NetBSD.org>
Date: Mon,  7 Aug 2023 23:12:48 +0000 (UTC)
From: andrew.cagney@gmail.com
Reply-To: andrew.cagney@gmail.com
To: gnats-bugs@NetBSD.org
Subject: documentation of sort order of foo-1.0nb1 vs foo-1.0pre202308008 for instance
X-Send-Pr-Version: www-1.0

>Number:         57572
>Category:       pkg
>Synopsis:       documentation of sort order of foo-1.0nb1 vs foo-1.0pre202308008 for instance
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 07 23:15:00 +0000 2023
>Last-Modified:  Thu Aug 10 02:00:02 +0000 2023
>Originator:     Andrew
>Release:        pkgsrc-2023Q2
>Organization:
>Environment:
$ uname -a
NetBSD arm64 10.0_BETA NetBSD 10.0_BETA (GENERIC64) #1: Sat Jul  1 11:46:10 EDT 2023  cagney@fedora:/home/cagney/netbsd-build/10/evbarm64/sys/arch/evbarm/compile/GENERIC64 evbarm

>Description:
From IRC (much thanks for the help) I've found out that pkgsrc has some special tokens when sorting names.  For instance:

   foo-1.0pre1 < foo-1.0 < foo-1.0nb1

I believe.  I couldn't find anything in the documentation though.  For instance around where PKGNAME and DISTNAME are described.  Could this be added?  Even if it is a reference to the code as that contains the definitive sort order.

>How-To-Repeat:

>Fix:

>Audit-Trail:
From: Thomas Klausner <wiz@gatalith.at>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/57572: documentation of sort order of foo-1.0nb1 vs
 foo-1.0pre202308008 for instance
Date: Tue, 8 Aug 2023 01:27:14 +0200

 Take a look at the PACKAGE WILDCARDS section of pkg_info(1), I think
 it answers most of your questions.
  Thomas

From: Andrew Cagney <andrew.cagney@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/57572: documentation of sort order of foo-1.0nb1 vs
 foo-1.0pre202308008 for instance
Date: Wed, 9 Aug 2023 14:24:56 -0400

 --000000000000686ffb06028199e2
 Content-Type: text/plain; charset="UTF-8"

 On Mon, 7 Aug 2023 at 19:30, Thomas Klausner <wiz@gatalith.at> wrote:

 > The following reply was made to PR pkg/57572; it has been noted by GNATS.
 >
 > From: Thomas Klausner <wiz@gatalith.at>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: pkg/57572: documentation of sort order of foo-1.0nb1 vs
 >  foo-1.0pre202308008 for instance
 > Date: Tue, 8 Aug 2023 01:27:14 +0200
 >
 >  Take a look at the PACKAGE WILDCARDS section of pkg_info(1), I think
 >  it answers most of your questions.
 >

 It and `pkg_admin` help.  With those I came up with foo-5.0pre0.20230808
 (pre0 leaves space for more official rc1)  So a pointer to either of those
 from the guide would be just as useful.  Also some guidance on what is
 considered best practice.



 >   Thomas
 >
 >

 --000000000000686ffb06028199e2
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
 <div dir=3D"ltr" class=3D"gmail_attr">On Mon, 7 Aug 2023 at 19:30, Thomas K=
 lausner &lt;<a href=3D"mailto:wiz@gatalith.at">wiz@gatalith.at</a>&gt; wrot=
 e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
 .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The following=
  reply was made to PR pkg/57572; it has been noted by GNATS.<br>
 <br>
 From: Thomas Klausner &lt;<a href=3D"mailto:wiz@gatalith.at" target=3D"_bla=
 nk">wiz@gatalith.at</a>&gt;<br>
 To: gnats-bugs@NetBSD.org<br>
 Cc: <br>
 Subject: Re: pkg/57572: documentation of sort order of foo-1.0nb1 vs<br>
 =C2=A0foo-1.0pre202308008 for instance<br>
 Date: Tue, 8 Aug 2023 01:27:14 +0200<br>
 <br>
 =C2=A0Take a look at the PACKAGE WILDCARDS section of pkg_info(1), I think<=
 br>
 =C2=A0it answers most of your questions.<br></blockquote><div><br></div><di=
 v>It and `pkg_admin` help.=C2=A0 With those I came up with foo-5.0pre0.2023=
 0808 (pre0 leaves space for more official rc1)=C2=A0 So a pointer to either=
  of those from the guide would be just as useful.=C2=A0 Also some guidance =
 on what is considered best practice.<br></div><div><br></div><div>=C2=A0<br=
 ></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
 border-left:1px solid rgb(204,204,204);padding-left:1ex">
 =C2=A0 Thomas<br>
 <br>
 </blockquote></div></div>

 --000000000000686ffb06028199e2--

From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/57572: documentation of sort order of foo-1.0nb1 vs
 foo-1.0pre202308008 for instance
Date: Wed, 09 Aug 2023 19:09:16 -0400

 > It and `pkg_admin` help.  With those I came up with 
 > foo-5.0pre0.20230808
 > (pre0 leaves space for more official rc1)  So a pointer to either of 
 > those
 > from the guide would be just as useful.  Also some guidance on what is
 > considered best practice.

 It's unclear from this ticket what sort of guidance you're seeking?
 (This to me is a somewhat obscure question I'm not sure would normally
 be addressed in the guide.)

 Regards,

 Dave

From: Andrew Cagney <andrew.cagney@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/57572: documentation of sort order of foo-1.0nb1 vs
 foo-1.0pre202308008 for instance
Date: Wed, 9 Aug 2023 21:56:34 -0400

 On Wed, 9 Aug 2023 at 19:10, David H. Gutteridge <david@gutteridge.ca> wrote:
 >
 > The following reply was made to PR pkg/57572; it has been noted by GNATS.
 >
 > From: "David H. Gutteridge" <david@gutteridge.ca>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: pkg/57572: documentation of sort order of foo-1.0nb1 vs
 >  foo-1.0pre202308008 for instance
 > Date: Wed, 09 Aug 2023 19:09:16 -0400
 >
 >  > It and `pkg_admin` help.  With those I came up with
 >  > foo-5.0pre0.20230808
 >  > (pre0 leaves space for more official rc1)  So a pointer to either of
 >  > those
 >  > from the guide would be just as useful.  Also some guidance on what is
 >  > considered best practice.
 >
 >  It's unclear from this ticket what sort of guidance you're seeking?
 >  (This to me is a somewhat obscure question I'm not sure would normally
 >  be addressed in the guide.)

 Naming a snapshot or a pre-release in a way that doesn't trump the
 official release is a common problem and something easy to screw up.
 It turns out I do this using  "pre" or "rc",  but this isn't mentioned
 in the guide.

 To me that is a gap.  There should minimally be something mentioning
 that "pre", et.al. exist (and point to pkg_info for more information),
 and preferably an example of how the pkgsrc maintainers think they
 should be used.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.