Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in port name capitalization are not reflected on web site #367

Open
ryandesign opened this issue Nov 5, 2023 · 3 comments
Open

Comments

@ryandesign
Copy link
Contributor

The web app shows a port named speexDSP. There used to be a port named speexDSP but it was removed and a new port named speexdsp was created. The ports web site should reflect the change in capitalization because although MacPorts is documented to handle port names case insensitively, there are some bugs where it does not do so.

If the ports web site usually handles this correctly, maybe the reason why it did not do so here is that the new speexdsp port was added first, creating a duplicate port. Later, the original speexDSP port was deleted.

@arjunsalyan
Copy link
Member

As far as I can remember, while designing the port add/update logic, it was assumed that port names will be unique (case-insensitive).

Here is how the current logic would behave for the given situation: When the speexdsp port was added (creating a duplicate), the site would have basically just overridden all the parameters of the existing port speexDSP with those from the newer one, but would not update the port name. And the same behaviour would carry on even after the old port was deleted. Never in this process the site would treat speexdsp and speexDSP as two separate ports.

The bugs mentioned probably got overlooked when deciding the above.

It would be quite some work to change this behaviour across the website. But one quick Action Item I can think of is to also update the port name when updating ports, so that case changes in name are taken care of.

@ryandesign
Copy link
Contributor Author

it was assumed that port names will be unique (case-insensitive).

MacPorts does intend to treat port names case-insensitively, and they are supposed to be unique. The web app should treat port names case-insensitively and the name should be a unique key. However, it is inevitable that, from time to time, someone will make a mistake and commit a duplicate port (with matching case or not). While that duplicate port exists, of course I would expect the web app to only contain information about one of them. The issue might get resolved by removing the original port as happened with speexDSP, or the new duplicate port might get deleted. Whichever resolution, it would be nice if the web app would end up containing the information of the port that remains.

But one quick Action Item I can think of is to also update the port name when updating ports, so that case changes in name are taken care of.

Yes that should be done. Port name case changes have happened before too.

@nilason
Copy link

nilason commented Jan 5, 2024

I have the same issue with pdal, after a renaming it to lowercase.

I noticed also that the web livecheck doesn't detect updates, while port livecheck pdal does. So this could possibly be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants