Bug 266775 - ports-mgmt/pkg: deal with tilde in version numbers (was: security/putty: New package version scheme is not compatible with pkg and portmaster)
Summary: ports-mgmt/pkg: deal with tilde in version numbers (was: security/putty: New ...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-02 20:45 UTC by David Wagner
Modified: 2023-11-28 06:32 UTC (History)
1 user (show)

See Also:
mandree: maintainer-feedback+
mandree: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Wagner 2022-10-02 20:45:20 UTC
The tilde in the latest versions of putty (example: putty-0.78~pre20220922) appears to confuse pkg, and by extension, portmaster.  Examples:


# portmaster -wD 'putty-0.78*'
        ===>>> No origin available for putty-0.78~pre20220922


===>>> Cannot continue
===>>> Aborting update

# pkg info 'putty-0.78*'
putty-0.78~pre20220922

# pkg info 'putty-0.78~pre20220922'
pkg: No package(s) matching putty-0.78~pre20220922
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2022-10-02 21:01:10 UTC
David,

Please point me to the documentation that requires a port to avoid the tilde, or else we need to reassign this problem report to ports-mgmt/pkg.  

I have looked around for a reasonable amount of time and only found that - _ , are forbidden characters, per ports/Mk/bsd.port.mk.
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2022-10-02 21:02:48 UTC
also:
$ pkg version -t putty-0.78~pre20220922 putty-0.78
<
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2022-10-02 21:10:51 UTC
FWIW: confirmed with pkg 1.18.4
Comment 4 David Wagner 2022-10-02 23:07:47 UTC
I can't find any specific doc that says you can't have a tilde.  Looking in the current INDEX, putty seems to be the only port that's trying it at the moment, so this could be an edge case that no one anticipated.  I have no objection if you want to push this over to the pkg folks for their take on it.
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2022-10-03 06:46:22 UTC
pkg@ guys, please assess and feed back.
Comment 6 Baptiste Daroussin freebsd_committer freebsd_triage 2022-10-03 09:04:12 UTC
the only documentation available for now, is here:https://github.com/freebsd/pkg/blob/master/libpkg/pkg_version.c#L121 this code and documentation is inherited from the old pkg_install tools.

We cannot break the scheme, we did not when going from pkg_install to pkg(8)
Comment 7 Matthias Andree freebsd_committer freebsd_triage 2022-10-03 09:28:00 UTC
Source-only documentation is invisible and therefore cannot be considered relevant.

putty is free to use the versioning scheme involving a tilde, and pkg(8) is messing up.
Please fix pkg(8).