Per discussion on D14709, this patch implements Antoine's suggested "closest version" logic in place of the previous "highest version" when the default version is not in the range allowed by the port.
Details
- Reviewers
antoine mat - Group Reviewers
portmgr O5: Ports Framework - Commits
- rP543000: Update version selection logic for USES= lua
Tested standalone using make -v '...' to display variables with a range of inputs for USES and DEFAULT_VERSIONS, all output correct.
Tested in-situ by testport'ing a sample of lua ports with varying default versions, all builds worked as expected.
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Lua 5.4.0 is planned for release next week, it would be nice to have this resolved sometime reasonably soon.
Mk/Uses/lua.mk | ||
---|---|---|
35 ↗ | (On Diff #70755) | Can you explain how a tie can happen? |
Mk/Uses/lua.mk | ||
---|---|---|
35 ↗ | (On Diff #70755) | USES=lua:51,53 with 5.2 as the default version. |
Mk/Uses/lua.mk | ||
---|---|---|
35 ↗ | (On Diff #70755) | Is this an actually existing case, or is this purely academic? |
Mk/Uses/lua.mk | ||
---|---|---|
35 ↗ | (On Diff #70755) | I don't believe any existing port does it, but I do myself have some code (which I do eventually hope to make a port for) that works only with 5.1 or 5.3. This is because the 5.1 compatibility is there only to support luajit, whereas there is no good reason to support 5.2 if 5.3 is available. |
Mk/Uses/lua.mk | ||
---|---|---|
35 ↗ | (On Diff #70755) | Ok, so, this is code to handle an edge case that does not exist in the ports tree. I don't really like to add code to support non existing cases. I don't know Lua, but looking at their website, Lua 5.1 has been dead 8 years, Lua 5.2 has been dead 5, and Lua 5.3 has been dead 2, maybe it is time to remove 5.1 and 5.2... And plan to remove 5.3 in the next year or so. |
Mk/Uses/lua.mk | ||
---|---|---|
35 ↗ | (On Diff #70755) | You can always put it in as a comment for if it does happen in the future. |
Mk/Uses/lua.mk | ||
---|---|---|
35 ↗ | (On Diff #70755) | Why, though? It wouldn't change the code in any useful way. |