[MacPorts] #69649: Avoid using /usr/bin/patch
MacPorts
noreply at macports.org
Thu Apr 4 06:00:55 UTC 2024
#69649: Avoid using /usr/bin/patch
-------------------------+--------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.9.1
Resolution: | Keywords:
Port: |
-------------------------+--------------------
Comment (by ryandesign):
From the [https://build.macports.org/builders/ports-
13_x86_64-builder/builds/65312/steps/install-port/logs/stdio macOS 13
build log], here's where it automatically reversed a patch because the new
`patch` command defaults to "yes" when asking if we want to apply a
reversed patch:
{{{
---> Applying patches to borgbackup
---> Applying patch-allow-msgpack-1.0.8.diff
DEBUG: Environment:
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_borgbackup/borgbackup/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='13.0'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
Executing: cd
"/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_borgbackup/borgbackup/work/borgbackup-1.2.8"
&& /usr/bin/patch -p0 <
'/opt/bblocal/var/buildworker/ports/build/ports/sysutils/borgbackup/files
/patch-allow-msgpack-1.0.8.diff'
DEBUG: system: cd
"/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_borgbackup/borgbackup/work/borgbackup-1.2.8"
&& /usr/bin/patch -p0 <
'/opt/bblocal/var/buildworker/ports/build/ports/sysutils/borgbackup/files
/patch-allow-msgpack-1.0.8.diff'
patching file setup.py
Reversed (or previously applied) patch detected! Assume -R? [y]
patching file 'src/borg/helpers/msgpack.py'
Reversed (or previously applied) patch detected! Assume -R? [y]
}}}
In contrast, the [https://build.macports.org/builders/ports-
12_x86_64-builder/builds/101831/steps/install-port/logs/stdio macOS 12
build log] shows that its `patch` defaults to "no" for that question:
{{{
---> Applying patches to borgbackup
---> Applying patch-allow-msgpack-1.0.8.diff
DEBUG: Environment:
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_borgbackup/borgbackup/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='12.0'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'
Executing: cd
"/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_borgbackup/borgbackup/work/borgbackup-1.2.8"
&& /usr/bin/patch -p0 <
'/opt/bblocal/var/buildworker/ports/build/ports/sysutils/borgbackup/files
/patch-allow-msgpack-1.0.8.diff'
DEBUG: system: cd
"/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_borgbackup/borgbackup/work/borgbackup-1.2.8"
&& /usr/bin/patch -p0 <
'/opt/bblocal/var/buildworker/ports/build/ports/sysutils/borgbackup/files
/patch-allow-msgpack-1.0.8.diff'
patching file setup.py
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file setup.py.rej
patching file src/borg/helpers/msgpack.py
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file
src/borg/helpers/msgpack.py.rej
Command failed: cd
"/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_borgbackup/borgbackup/work/borgbackup-1.2.8"
&& /usr/bin/patch -p0 <
'/opt/bblocal/var/buildworker/ports/build/ports/sysutils/borgbackup/files
/patch-allow-msgpack-1.0.8.diff'
Exit code: 1
}}}
I still need to find an example of where the new patch command hangs to
understand the conditions in which that happens.
--
Ticket URL: <https://trac.macports.org/ticket/69649#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list