Bug 501549

Summary: Kompare fails to open valid patch file
Product: [Applications] kompare Reporter: Jan Uhlir <espinosa_cz>
Component: generalAssignee: Kompare developers <kompare-devel>
Status: CONFIRMED ---    
Severity: normal CC: anhollander516
Priority: NOR    
Version First Reported In: 4.2.24123   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch file Kompare is not able to open
screenshot of Kompare failinf to open patch file

Description Jan Uhlir 2025-03-15 20:25:33 UTC
Created attachment 179436 [details]
Patch file Kompare is not able to open

Kompare could not open a patch file, instead display error "Could not parse diff output". Patch file attached. Other patch files work.
Kompare Version 4.2.24122

System: openSUSE Linux Slowroll.
Comment 1 Jan Uhlir 2025-03-15 20:26:29 UTC
Created attachment 179437 [details]
screenshot of Kompare failinf to open patch file
Comment 2 Jan Uhlir 2025-03-15 20:34:05 UTC
FYI: diffstat didn't reveal anything wrong with that file:
espinosa@espinosa-asus:~/rpmbuild/patch> diffstat patch3_Revert_drm_amd_display_Use_HW_lock_mgr_for_PSR1.patch 
 dmub_hw_lock_mgr.c |   11 +++++++++++
 1 file changed, 11 insertions(+)


Same for patch tool:
espinosa@espinosa-asus:~/rpmbuild/patch> patch --dry-run -p1 < patch3_Revert_drm_amd_display_Use_HW_lock_mgr_for_PSR1.patch 
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
|index bf636b28e3e1..6e2fce329d73 100644
|--- a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
|+++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
--------------------------
File to patch:
Comment 3 Avraham Hollander 2025-03-15 21:59:12 UTC
I can reproduce this on my Gentoo system as well with Kompare 4.2.24123.
Comment 4 Jan Uhlir 2025-03-16 16:02:13 UTC
It would be nice if Kompare put little bit more details why it "Could not parse diff output", including the particular line it disliked, in their error message.