upt-macports project update and feedback request

Ryan Schmidt ryandesign at macports.org
Fri Jun 7 03:14:42 UTC 2019


On Jun 6, 2019, at 21:11, Renee Otten wrote:

> Looking at your comments I must admit I am a little confused, but that is probably because I am not understanding some (basic) MacPorts things correctly… For example, I didn’t realize (probably never tried) that “port info py-sphinx” and "port info py-Sphinx” give the same result and that the capitalization apparently does not matter. Does “portindex” index the directory structure, gets the portnames from there and because of case-insensitive filesystems both the lowercase/capitalized port names work, or…? 
> 
> So just to make sure I am understanding it correctly, let me rephrase the questions about Python port naming:
> 
> 1. is there consensus that we should use py-<upstream_name> for modules and <upstream_name> for tools/applications and in case we find ports (I mentioned two earlier) that do not follow this convention, we can rename them accordingly?
> 
> 2. is there any practical difference (or preference) between keeping the *exact* upstream name or converting it into lowercase, either when specifying dependencies or choosing a directory name / <name>-field in the Portfile?
> 
> 3. how should we handle updating Portfiles with upt in cases where there is a discrepancy between capitalization in port that is currently MacPorts and the upstream name (we can not only change the <name> field in the Portfiles without changing the capitalization of the directory, otherwise “port lint” will complain? In such cases, would it be acceptable to change the capitalization to follow upstream (it seems that this could be done without a “replaced_by” situation)?
> 
> In my thinking the easiest way is to make sure that all ports follow the py-<upstream_exact> naming convention (and we can do that as default for upt) so that we can add dependencies as they are listed on PyPI and there is never any confusion about the names. This is still important with respect to differences between "py-codestyle” versus “py-pycodestyle”. If indeed the actual capitalization of the names does not make a difference we could just always specify dependencies in the Portfile as they are listed on PyPI even though MacPorts uses still lowercase names. 

MacPorts treats port names case-insensitively. The case sensitivity of the filesystem does not matter.

The portindex indexes port names, not names of directories.

The name of the Portfile should match the name of the directory it's in, including capitalization. It will work if they don't match, but they should be changed to match. port lint warns if it doesn't match.

Changing the capitalization of a port name can be done without needing to use replaced_by.

Changing the capitalization of a port directory name may require the developer to use a case-sensitive filesystem. For example, use Disk Utility to create a case-sensitive HFS disk image large enough to hold the macports-ports working copy, copy the macports-ports working copy to it, do the rename, commit it, and push it. Then you can pull your regular macports-ports working copy to receive the change.

Dependencies should be specified with the correct capitalization. It will work if they don't match, but they should be changed to match. port lint does not warn if it doesn't match. It would be a good idea to enhance port lint to do that.

Changing the capitalization of a dependency specification doesn't necessitate increasing the port's revision.



More information about the macports-dev mailing list