Opened 2 years ago

Closed 2 years ago

#65903 closed defect (wontfix)

pg python: check for files installed to ${python.prefix}, and fail build if any present

Reported by: mascguy (Christopher Nielsen) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: portgroup Cc: judaew (Vadym-Valdis Yudaiev), catap (Kirill A. Korinsky), reneeotten (Renee Otten), jmroot (Joshua Root)
Port:

Description

Trying to install a smattering of Python ports - including those under the umbrella of py-pytest-xxx - fails due to port-specific files installed directly in ${python.prefix}.

For example, py-about-time is one example:

$ port provides /opt/local/Library/Frameworks/Python.framework/Versions/3.10/LICENSE
/opt/local/Library/Frameworks/Python.framework/Versions/3.10/LICENSE is provided by: py310-about-time

Along with py-pytest-datadir (after first deactivating py310-about-time, to allow activation):

$ port provides /opt/local/Library/Frameworks/Python.framework/Versions/3.10/LICENSE
/opt/local/Library/Frameworks/Python.framework/Versions/3.10/LICENSE is provided by: py310-pytest-datadir

Rather than placing the full onus on maintainers, though, we should check for this in pg python. And cause the install to fail, if any such files are found.

Change History (10)

comment:1 Changed 2 years ago by Christopher Nielsen <mascguy@…>

In 8cc3a32cd6f27c53b1a892482ed37e209603ae93/macports-ports (master):

py-about-time: don't install files in python.prefix
See: #65903

comment:2 Changed 2 years ago by Christopher Nielsen <mascguy@…>

In 440d3e93dc68f86531b700478b065ff64fa30626/macports-ports (master):

py-pytest-datadir: don't install files in python.prefix
See: #65903

comment:3 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: judaew added; reneeotten removed
Owner: changed from judaew to reneeotten

comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)

Summary: python ports: inadvertent conflicts, due to files installed to ${python.prefix}: LICENSE, etcpg python: check for files installed to ${python.prefix}, and fail build if any present

comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: catap added

comment:6 Changed 2 years ago by judaew (Vadym-Valdis Yudaiev)

Thank you Christopher!

comment:7 Changed 2 years ago by reneeotten (Renee Otten)

Owner: reneeotten deleted

agreed that ports shouldn't install stuff in python.prefix; not sure though if checking for that has a place in the python PG or whether I should own this ticket.

Last edited 2 years ago by reneeotten (Renee Otten) (previous) (diff)

comment:8 in reply to:  7 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: reneeotten jmroot added
Keywords: portgroup added
Owner: set to mascguy
Port: py-about-time py-pytest-datadir removed

Replying to reneeotten:

agreed that ports shouldn't install stuff in python.prefix; not sure though if checking for that has a place in the python PG or whether I should own this ticket.

No worries, I'll own the ticket then. Just wanted to get some discussion going on this.

In terms of the goal, it seems logical to check for this within the Python portgroup. Otherwise, where else would we include such validation checks...?

comment:9 Changed 2 years ago by jmroot (Joshua Root)

I don't think this is really worth checking for. The mtree checks in base already detect if you're installing files completely outside the usual places. Ideally maintainers notice if ports are installing things in slightly weird places and fix it, but if nobody notices, it's likely not a problem. When someone does notice, like you did with these two ports, you fix it.

comment:10 in reply to:  9 Changed 2 years ago by mascguy (Christopher Nielsen)

Resolution: wontfix
Status: assignedclosed

Replying to jmroot:

I don't think this is really worth checking for. The mtree checks in base already detect if you're installing files completely outside the usual places. Ideally maintainers notice if ports are installing things in slightly weird places and fix it, but if nobody notices, it's likely not a problem. When someone does notice, like you did with these two ports, you fix it.

Works for me, we can always revisit in the future if needed.

Note: See TracTickets for help on using tickets.