Open barracuda156 opened 3 months ago
On Tuesday August 06 2024 05:30:42 Sergey Fedorov wrote:
Something does not apply cleanly from Linux patches:
I don't usually bother with making certain patches apply cleanly, but last I checked they all applied. I think.
I told you I was in the middle of updating "base" and then got side-tracked. I'll see if I can get back to it soon(ish).
No hurry here, I am just reporting what happened. Possibly the patch relies on some other being applied before it, which I did not apply. But I did not modify anything in the patches themselves and used the specified tag to check out. (Everything else of Linux patches applied fine.)
On Tuesday August 06 2024 11:06:00 Sergey Fedorov wrote:
Possibly the patch relies on some other being applied before it, which I did not apply.
All bets are off if you don't apply all the patches of course. Sadly that can't be avoided.
All bets are off if you don't apply all the patches of course. Sadly that can't be avoided.
I did apply all the patches which applied from -devel subport (skipping Darwin-specific ones), but I may not have kept the exact sequence. Will re-do that.
@RJVB No, it does not work. Both errors are there.
svacchanda@43-200 macports-base-10A190 % git apply /Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/patch-pextlib-curl_version_cmd.diff
/Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/patch-pextlib-curl_version_cmd.diff:61: trailing whitespace.
// but tedious because it would involve checking for the existence of many of the
warning: 1 line adds whitespace errors.
And this just fails to apply:
svacchanda@43-200 macports-base-10A190 % git apply /Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff
/Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:244: space before tab in indent.
# get deplist
/Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:245: space before tab in indent.
set deps [make_dependency_list [option subport]]
/Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:246: space before tab in indent.
set deps [lsort -unique $deps]
/Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:247: space before tab in indent.
foreach dep $deps {
/Volumes/Data/GIT_BARRACUDA/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:248: space before tab in indent.
set name [lindex [split $dep /] 0]
error: patch failed: src/port/port.tcl:4178
error: src/port/port.tcl: patch does not apply
EDIT: nah, the actual failure happens at src/port/port.tcl:4178
, rest are just warnings.
Ok, it is trivial: combining tabs with spaces is not allowed in indents.
I just checked and got no errors applying my patches. Which suggests that that condition above is something specific to your patch command. What's the output of your patch --version
?
I tried with GNU patch 2.7.1 and 2.7.6 .
I tried on 10.6 initially and second time on Sonoma. On the latter:
svacchanda@43-200 ~ % patch --version
patch 2.0-12u11-Apple
Notice, I did not apply patches via MacPorts, I did it manually via git apply
.
Something does not apply cleanly from Linux patches:
Also: