On 2019/05/13 09:18, Kurt Mosiejczuk wrote:
> On Mon, May 13, 2019 at 07:37:36AM +0100, Stuart Henderson wrote:
> 
> > As far as plists go, unless the port only supports py2 or only
> > supports py3, it ought to generate the plist with FLAVOR=python3
> > and then prefix any lines ending in ${MODPY_PYCACHE}/ with
> > ${MODPY_COMMENT}.
> 
> Yes. I was describing that to afresh1 at one point. Someone else brought
> up setting REVISION while doing so. I had seen that danj's aliases for
> regenerating the plist set REVISION to 999, although I had a problem
> related to have done that at one point. Is setting the REVISION while
> doing so still necessary? If it is, what does it do? (It'd probably be
> nice to know the reasoning before making a tool incorporate it :) ).
> 
> --Kurt

portgen should not set this.

Python ports usually include an egg-info file which includes the module
name + version, normally written as name-${MODPY_EGG_VERSION}. But in the
case where this is equal to FULLPKGNAME update-plist prefers that longer
match. This is most common in tools that happen to be written in python
(no py- prefix in the package name) - things like ansible, beets,
radiotray etc.

It initially looks like things work ok with FULLPKGNAME there, but then
later somebody makes a change and bumps REVISION, and packaging gets
broken.

The trick of forcing a bogus REVISION prevents the string in the egg-info
filename from matching FULLPKGNAME.

The proper way to fix that problem is remove FULLPKGNAME from the
default SUBST_VARS. This used to be needed for the filenames for
pkg-readmes, but these have been changed to use PKGSTEM instead of
FULLPKGNAME, so pkg-readmes isn't a problem for doing this any more.
However since then, lua ports (ports/*/lua* and ports/devel/lpeg)
started using FULLPKGNAME as a de-conflict mechanism for examples and
docs directories, so they would need changing.

Reply via email to