RJVB / macstrop

RJVB's repository of alternative macports, with ports missing from or overriding those in the standard collection, including a set of KF5 ports.
21 stars 9 forks source link

Some Linux patches from MacPorts-devel do not apply cleanly #108

Open barracuda156 opened 3 months ago

barracuda156 commented 3 months ago

Something does not apply cleanly from Linux patches:

36-25% git apply /Users/svacchanda/Github_barracuda156/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff 
/Users/svacchanda/Github_barracuda156/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:244: space before tab in indent.
            # get deplist
/Users/svacchanda/Github_barracuda156/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:245: space before tab in indent.
            set deps [make_dependency_list [option subport]]
/Users/svacchanda/Github_barracuda156/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:246: space before tab in indent.
            set deps [lsort -unique $deps]
/Users/svacchanda/Github_barracuda156/macstrop/sysutils/MacPorts/files/lamarck/patch-restore-dpkg+rpm.diff:247: space before tab in indent.
            foreach dep $deps {
/Users/svacchanda/Github_barracuda156/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

Also:

36-25% git apply /Users/svacchanda/Github_barracuda156/macstrop/sysutils/MacPorts/files/patch-pextlib-curl_version_cmd.diff 
/Users/svacchanda/Github_barracuda156/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.
RJVB commented 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).

barracuda156 commented 3 months ago

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.)

RJVB commented 3 months ago

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.

barracuda156 commented 3 months ago

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.

barracuda156 commented 3 months ago

@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
barracuda156 commented 3 months ago

EDIT: nah, the actual failure happens at src/port/port.tcl:4178, rest are just warnings.

RJVB commented 3 months ago

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 .

barracuda156 commented 3 months ago

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.