Page MenuHomeFreeBSD

Mk/Uses/python.mk: Do not surround plist entries in quotes
ClosedPublic

Authored by jrm on Aug 28 2020, 5:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 9:39 AM
Unknown Object (File)
Thu, Oct 24, 7:33 AM
Unknown Object (File)
Oct 18 2024, 1:57 AM
Unknown Object (File)
Oct 1 2024, 7:19 PM
Unknown Object (File)
Sep 8 2024, 7:19 PM
Unknown Object (File)
Sep 5 2024, 12:15 PM
Unknown Object (File)
Aug 19 2024, 9:14 AM
Unknown Object (File)
Jul 6 2024, 8:41 PM
Subscribers

Details

Summary
Mk/Uses/python.mk: Do not surround plist entries in quotes

This fixes packaging issues like this one.


===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%PYTHON_SITELIBDIR%%/scipy/io/tests/data/Transparent Busy.ani
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: "/usr/local/%%PYTHON_SITELIBDIR%%/scipy/io/tests/data/Transparent Busy.ani"
===> Error: Plist issues found.


I tested an update to scient/py-scipy, which includes a plist entry with a space, and this patch fixed the issue.  I see many other ports have pkg-plist entries with spaces and no quotes, so I assume this will not introduce new issues.  Am I missing anything?

PR:
Submitted by:
Reported by:
Differential_Revision: D26221

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jrm requested review of this revision.Aug 28 2020, 5:49 PM
jrm created this revision.
jrm retitled this revision from pyhton.mk: Do not surround plist entries in quotes This fixes packaging issues like this one. ``` ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%PYTHON_SITELIBDIR%%/scipy/io/tests/data/Transparent Busy.ani ===>... to pyhton.mk: Do not surround plist entries in quotes.Aug 28 2020, 5:50 PM
jrm edited the summary of this revision. (Show Details)
jrm edited the summary of this revision. (Show Details)
  • Add end-of-line marker to sed command

Expression looks good and now that you mention it, a port I maintain even has a space in one of the plist entries, so I suppose we are probably space-safe.

Should probably exp-run it to be certain? I wouldn't really expect any fallout, though.

This revision is now accepted and ready to land.Aug 28 2020, 7:01 PM
koobs retitled this revision from pyhton.mk: Do not surround plist entries in quotes to Mk/Uses/python.mk: Do not surround plist entries in quotes.
koobs edited the summary of this revision. (Show Details)
koobs edited the summary of this revision. (Show Details)

Why is it quoted in the first place, and why is it broken now?

In D26221#583268, @mat wrote:

Why is it quoted in the first place, and why is it broken now?

It looks like it's quoted because in Mk/Uses/python.mk the package list is generated using PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST}. It's broken because different things under Mk/ do not expect a quote, e.g., ${SED} -e 's|^${PREFIX}/||' ${_PYTHONPKGLIST} ${TMPPLIST} or when doing stage-qa.

In D26221#583669, @jrm wrote:
In D26221#583268, @mat wrote:

Why is it quoted in the first place, and why is it broken now?

It looks like it's quoted because in Mk/Uses/python.mk the package list is generated using PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST}. It's broken because different things under Mk/ do not expect a quote, e.g., ${SED} -e 's|^${PREFIX}/||' ${_PYTHONPKGLIST} ${TMPPLIST} or when doing stage-qa.

Oh, ok, I forgot Python's plists were generated by distutils. So, it was always adding quotes if required, but it is the first time it happened, ok.

Thank you for investigating the why. Be sure to include the why in the commit message.

Will do. I should have put portmgr as a reviewer here. Will do that now. Could you approve if you are ok with the change, or do you think an exp-run is necessary? I requested one at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248981