I tried to open a .cbr file today. Okular could not display it, claiming that it can't find unrar. Since i had similar problems last year i checked the package installation history and, yes i got an unrar update from 1:5.1.7-1 to version 1:5.2.1-1 To be sure i checked the okular source code to see how the detection worked and tried that manually. Results of that further below. Reproducible: Always Steps to Reproduce: 1. Install unrar verstion 1:5.2.1-1 2. Open .cbr file 3.Error Actual Results: Empty file with error message displayed. Red error box in main okular window claims it couldn't find unrar. Expected Results: Display of the comic book contents. Since okular basically calls unrar --version to determine which unrar flavor is installed i tried $ unrar --version Which gave me this: ERROR: Unknown option: -version I noticed that it gave me only one - back so i tried: $ unrar -v Which gave me: UNRAR 5.20 beta 1 freeware Copyright (c) 1993-2014 Alexander Roshal Downgrading unrar to 1:5.1.7-1 i tried it again, just to confirm: $ unrar --version The Result was: UNRAR 5.11 beta 1 freeware Copyright (c) 1993-2014 Alexander Roshal So yeah, this unrar flavor only supports the short -v flag not the long --version flag in version 1:5.2.1-1.
Created attachment 89312 [details] Possible patch to fix the bug Can somebody test it (I have no cbr at hand)?
That patch compiles and works for me.
No, the patch breaks the detection of the unrar-free version, which only accepts --version (at least for 0.0.1+cvs20140707-1 which is in Debian.
Created attachment 89316 [details] Patch with a fallback to -v on --version error. This patch should be better then. It only falls back to -v if --version returns an the ERROR line. It could use some refactoring though.
Created attachment 89341 [details] My version of the patch Can you guys check if that works for you? I'd prefer it written like that if you can confirm it works
Compiles and works with unrar 1:5.2.1-1 and 1:5.1.7-1.
Git commit 717c4b0f6a3a1bc8a2ac02a4028be62c4b4996e3 by Albert Astals Cid. Committed on 27/10/2014 at 21:34. Pushed by aacid into branch 'KDE/4.14'. Fix unrar detection for versions that don't support --version Based on patches by Yuri Chornoivan and Jörg Schuck FIXED-IN: 4.14.3 M +6 -3 generators/comicbook/unrar.cpp http://commits.kde.org/okular/717c4b0f6a3a1bc8a2ac02a4028be62c4b4996e3
*** Bug 347634 has been marked as a duplicate of this bug. ***