Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#68931 closed defect (fixed)

py-sip builds contain incorrect code.

Reported by: SiggyF Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: ventura sonoma Cc: reneeotten (Renee Otten)
Port: py-sip

Description (last modified by ryandesign (Ryan Carsten Schmidt))

There was a bug in the 3.8.0 version of py-sip. This bug was fixed two weeks ago in 3.8.1. This also solved #68828. Now the 3.8.1 is available. Somehow the old code ended up in the builds of the pre-build 3.8.1 version.

This can be checked in for example the file:

https://packages.macports.org/py311-sip/py311-sip-6.8.1_0.darwin_22.arm64.tbz2

There we see the old code:

opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/sipbuild/generator/outputs/code.py
8417:    if klass.docstring is None or klass.docstring.signature is not SocstringSignature.DISCARDED:

I don't understand how this old codes ends up in this file. I checked the distfile and that contains the correct code (without the typo *Soc*string).

Change History (5)

comment:1 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: reneeotten added
Description: modified (diff)
Owner: set to michaelld
Status: newassigned

I assume you mean 6.8.0 and 6.8.1 rather than 3.8.0 and 3.8.1.

The problem is that the revision was not increased when #68898 was resolved. macOS Ventura and later contain a new implementation of patch that behaves differently from that in older macOS versions. In older macOS versions an error was issued when asked to apply a patch that was already applied, which was what prompted #68898. But the patch program in Ventura and later silently applied the patch in reverse.

Last edited 5 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 in reply to:  1 ; Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ventura sonoma added

Replying to ryandesign:

But the patch program in Ventura and later silently applied the patch in reverse.

See https://build.macports.org/builders/ports-13_arm64-builder/builds/44681/steps/install-port/logs/stdio:

DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-sip/py311-sip/work/sip-6.8.1" && /usr/bin/patch -p0 < '/opt/bblocal/var/buildworker/ports/build/ports/python/py-sip/files/patch-typo.diff'
patching file 'sipbuild/generator/outputs/code.py'
Reversed (or previously applied) patch detected!  Assume -R? [y] 

comment:3 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 5099b695440844e74d561ac247386fe7e8a520ad/macports-ports (master):

py-sip: Rebuild following removal of patchfile

Closes: #68931

comment:4 Changed 5 months ago by SiggyF

thanks, indeed I meant 6.8.0 and 6.8.1

comment:5 in reply to:  2 Changed 5 months ago by SiggyF

Replying to ryandesign:

Replying to ryandesign:

But the patch program in Ventura and later silently applied the patch in reverse.

See https://build.macports.org/builders/ports-13_arm64-builder/builds/44681/steps/install-port/logs/stdio:

DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-sip/py311-sip/work/sip-6.8.1" && /usr/bin/patch -p0 < '/opt/bblocal/var/buildworker/ports/build/ports/python/py-sip/files/patch-typo.diff'
patching file 'sipbuild/generator/outputs/code.py'
Reversed (or previously applied) patch detected!  Assume -R? [y] 

Ah, that's tricky, well caught!

Note: See TracTickets for help on using tickets.