Bug 420775 - Bad error message when opening .epub files without .epub support
Summary: Bad error message when opening .epub files without .epub support
Status: RESOLVED DOWNSTREAM
Alias: None
Product: okular
Classification: Applications
Component: EPub backend (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-29 22:50 UTC by Volker Weißmann
Modified: 2020-05-01 17:51 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Weißmann 2020-04-29 22:50:58 UTC
The Archpackage of okular has ebook-tools as an optional dependency.
If you don't install ebook-tools and open a .epub file, okular displays "Could not open file:///path/to/file.epub" and the following message gets printed to stderrr.

org.kde.okular.core: Invalid plugin factory for "/usr/lib/qt/plugins/okular/generators/okularGenerator_epub.so":"Cannot load library /usr/lib/qt/plugins/okular/generators/okularGenerator_epub.so: (libepub.so.0: cannot open shared object file: No such file or directory)"

It would be way nicer, if okular would instead display e.g. "Could not open file:///path/to/file.epub, because the ebook-tools package is missing."
Comment 1 Albert Astals Cid 2020-04-30 22:25:06 UTC
That's a problem of your distribution.

They are shipping a plugin without it's dependencies, they shouldn't do that.

On a more abstract note, what you're asking is impossible, Okular doesn't know about it's plugins, there can be any number of plugins, shipped by third parties (calligra for exmaple does) so it can't telll you what you are missing to execute about a plugin it doesn't know about.
Comment 2 Volker Weißmann 2020-04-30 23:22:54 UTC
I opened a bug in the Arch Linux bug tracker:


https://bugs.archlinux.org/task/66485
Comment 3 Volker Weißmann 2020-05-01 11:30:43 UTC
(In reply to Albert Astals Cid from comment #1)
> That's a problem of your distribution.
> 
> They are shipping a plugin without it's dependencies, they shouldn't do that.


Are you sure? The Arch guys say that they are doing it right:
https://bugs.archlinux.org/task/66485

> On a more abstract note, what you're asking is impossible, Okular doesn't
> know about it's plugins, there can be any number of plugins, shipped by
> third parties (calligra for exmaple does) so it can't telll you what you are
> missing to execute about a plugin it doesn't know about.

Can you try to figure this out with the Arch guys?
Comment 4 Antonio Rojas 2020-05-01 11:37:57 UTC
(In reply to Volker Weißmann from comment #3)

> Are you sure? The Arch guys say that they are doing it right:
> https://bugs.archlinux.org/task/66485
> 
> > On a more abstract note, what you're asking is impossible, Okular doesn't
> > know about it's plugins, there can be any number of plugins, shipped by
> > third parties (calligra for exmaple does) so it can't telll you what you are
> > missing to execute about a plugin it doesn't know about.
> 
> Can you try to figure this out with the Arch guys?

Nobody said anything about "doing it right". There is no "right" here, just different opinions about how packaging should be done. Arch policy is not to split plugins out of packages, and if you ask me an average Arch user should be able to figure out this error message by themselves.
Comment 5 Volker Weißmann 2020-05-01 11:54:05 UTC
(In reply to Antonio Rojas from comment #4)
> (In reply to Volker Weißmann from comment #3)
> 
> > Are you sure? The Arch guys say that they are doing it right:
> > https://bugs.archlinux.org/task/66485
> > 
> > > On a more abstract note, what you're asking is impossible, Okular doesn't
> > > know about it's plugins, there can be any number of plugins, shipped by
> > > third parties (calligra for exmaple does) so it can't telll you what you are
> > > missing to execute about a plugin it doesn't know about.
> > 
> > Can you try to figure this out with the Arch guys?
> 
> Nobody said anything about "doing it right". There is no "right" here, just
> different opinions about how packaging should be done. Arch policy is not to
> split plugins out of packages, 

Can you give me a link the this Arch policy? I didn't find it here: https://wiki.archlinux.org/index.php/Arch_package_guidelines

> and if you ask me an average Arch user should
> be able to figure out this error message by themselves.

I also eventually found out that I need to install the ebook-tools package, but I'm not really happy with the way it is. It feels like a "this is why we can't have nice things" moment.
Comment 6 Antonio Rojas 2020-05-01 17:51:45 UTC
(In reply to Volker Weißmann from comment #5)

> Can you give me a link the this Arch policy? I didn't find it here:
> https://wiki.archlinux.org/index.php/Arch_package_guidelines

I don't think that's written down anywhere. But it's certainly the de facto policy.