Bug 501549 - Kompare fails to open valid patch file
Summary: Kompare fails to open valid patch file
Status: CONFIRMED
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 4.2.24123
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-15 20:25 UTC by Jan Uhlir
Modified: 2025-03-16 16:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch file Kompare is not able to open (717 bytes, patch)
2025-03-15 20:25 UTC, Jan Uhlir
Details
screenshot of Kompare failinf to open patch file (110.96 KB, image/png)
2025-03-15 20:26 UTC, Jan Uhlir
Details

Note You need to log in before you can comment on or make changes to this bug.
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.