The latest update to textproc/py-bracex changed DISTVERSION from 2.5 to 2.5.post1, which becomes a PORTVERSION of 2.5.p1, and this is less than the previous version: $ pkg version -t 2.5 2.5.p1 < Suggested patch attached. It looks fairly ugly because I hit a problem with USES=python where DISTVERSION is used in a number of places. Because overriding both DISTVERSION and PORTVERSION is not permitted, I had to copy the things that use DISTVERSION.
Created attachment 256339 [details] Patch
Thanks for the report. I think your patch is a bit too much -- there should be a much simpler solution. Leave it with me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f3a480104b6b787539b4f8990ce432aad506d38b commit f3a480104b6b787539b4f8990ce432aad506d38b Author: Matthew Seaman <matthew@FreeBSD.org> AuthorDate: 2025-01-02 21:21:58 +0000 Commit: Matthew Seaman <matthew@FreeBSD.org> CommitDate: 2025-01-02 21:24:19 +0000 textproc/py-bracex: fix version going backwards Force a pkg version of 2.5p1 because 2.5.p1 is less than 2.5 PR: 283790 textproc/py-bracex/Makefile | 1 + 1 file changed, 1 insertion(+)
Thank you very much for the report. Fixed, thanks!
When I test with pkg version, I don't get what is described in comment 0... % pkg version -t 2.5 2.5.p1 > This is using pkg-1.21.3 Also the fix that was committed triggers an error in 'DEVELOPER' mode (sets a DEV_ERROR in bsd.port.mk): % locp make extract DEVELOPER=yes /!\ py311-bracex-2.5p1: Makefile errors /!\ Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, set DISTNAME *** Error code 1
(In reply to John Hein from comment #5) > When I test with pkg version, I don't get what is described in comment 0... > > % pkg version -t 2.5 2.5.p1 > > You get the expected correct result (left is higher), whereas I got it wrong when I neglected to copy the command and its output and instead typed them.
(In reply to Christian Ullrich from comment #6) Okay, so it seems the fix committed by matthew@ (comment 3) should be rolled back, and there is no "going backwards" problem after all?
(In reply to John Hein from comment #7) Never mind. Brain problem on my end. The definition of both PORTVERSION and DISTVERSION is still a problem, however.
Created attachment 256627 [details] [patch] textproc/py-bracex - fix definition of both PORTVERSION and DISTVERSION Here's a patch to address the "violation" of defining both PORTVERSION and DISTVERSION. Same idea as the fix from comment 3, but just a little different to appease the DEV_ERROR complaint and the ports tree policy. https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-naming
(In reply to John Hein from comment #9) Hmm... that patch (attachment 256627 [details]) doesn't work because Mk/Uses/python.mk explicitly references DISTVERSION for pep517 builds (which is now 2.5p1 and the .whl that is built with 2.5.post1 in the name, so 'make stage' fails). Without overriding PEP517_INSTALL_CMD and do-install, I don't see any way with the current bsd.port.mk and Uses/python.mk to avoid setting both DISTVERSION and PORTVERSION. python.mk could add a knob to override the DISTVERSION referenced in PEP517_INSTALL_CMD and the do-install target. I did that locally, and that works. Or maybe the ports tree could loosen the restriction and officially allow both PORTVERSION and DISTVERSION if needed.