-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 64-bit-mangled patches sometimes fail to apply #426
Comments
Using
... so the file to be patched does indeed not exist in what PM calls |
When trying to apply/activate form GUI, the journal logs this error:
... which is from here: /~https://github.com/sailfishos-patches/patchmanager/blob/master/src/bin/patchmanager-daemon/patchmanagerobject.cpp#L2540 Suspicion: something in doPrepareCache still reads the unmangled paths instead of the mangled ones, and fails to prepare the environment for the patching process/script. |
Debug log:
|
For sake of completeness, this is the relevant pm_apply output:
|
So it's obvious that doPrepareCache operates on unmangled file names. The list is iterated here:
and ( General observation: Looking at all of these I'm very confused by the usage of |
Full debug log: |
Added some debugging info in /~https://github.com/nephros/patchmanager/tree/fix-426. First examination points to "git-style" diffs. These get mangled correctly:
... these will not:
... that is to say, the script |
@b100dian if you have time, could you give the section /~https://github.com/sailfishos-patches/patchmanager/blob/master/src/bin/patchmanager-daemon/patchmanagerobject.cpp#L1651-L1682 a look over, and see how to properly fix this? And perhaps put some comments in there what/why things are happening. I'm not sure why the path walking at /~https://github.com/sailfishos-patches/patchmanager/blob/master/src/bin/patchmanager-daemon/patchmanagerobject.cpp#L1658-L1667 is there at all. Looking at my personal collection of installed patches, we have these styles of patch beginnings we should be able to deal with:
And special case variants of the above for new files:
|
As a side note, I have also noticed that conflict detection sometimes works, sometimes it doesn't and I'm quite sure it's for the same reason - and it appears to be fixed by the same fix. |
SailfishOS VERSION: 4.4.0.x and 4.5.0.x
HARDWARE: Sony Xperia 10 III
PATCHMANAGER VERSION: 3.2.8
BUG DESCRIPTION
Some patches, after having been 32-to-64-bit mangled, fail to apply/activate even though they appear to be correct.
So far this has been reproduced on 64-bit systems only.
STEPS TO REPRODUCE
Example patches which show this:
ADDITIONAL INFORMATION
See also discussion in this thread: https://forum.sailfishos.org/t/patches-by-ichthyosaurus/15387
The text was updated successfully, but these errors were encountered: