[Libreoffice-bugs] [Bug 38812] PackageKit / Help integration

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Feb 22 02:52:05 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=38812

--- Comment #11 from John <jbt at gmx.us> ---
I was taking a look at this and made what looked like a maybe-correct change,
but I'm having trouble testing, so let me ask a strange question followed by
some observations that may explain...

Do we have a docker or a known current version of a distro I can build a VM
from where this would be expected to work? In particular one where the
Bibliography Database menu option can successfully install libreoffice-base and
also having libreoffice-help installed would allow me to see the help files
through the menu.

The two environments I tried to test in are 

1) My new laptop. It's so new I haven't bothered to distrohop or change much
yet. It's still on the manufacturer's default: PopOS 20.10. I did change the
default browser, which will come up.

2) The family desktop. It's on Ubuntu 20.04.2 LTS with pretty much stock
everything.

On the laptop the org.freedesktop.PackageKit.Modify2 interface is not
available. Modify is. PopOS apparently uses a lot of package manager manager
code from Enlightenment (rebranded, of course). So of course 

Also, installing libreoffice-help-en-us (that is my locale, BTW) causes it to
attempt open those HTML files in my default browser, which is
ungoogled-chromium from a flatpak that doesn't have permission to see those
files. I know I could fix that, but I have to imagine this could confuse
someone.

On the desktop (where both Modify and Modify2 exist) if I try the Bibliography
Database it asks me only asks me to restart LO (no prompting for authentication
or anything). Looking at dbus-monitor indicates to me it did make a DBus call,
but nothing ever was visible. journalctl shows me that Ubuntu Software wasn't
allowed to communicate with me?

apparmor="DENIED" operation="dbus_method_call"  bus="session"
path="/org/gtk/Notifications" interface="org.gtk.Notifications"
member="AddNotification" mask="send" name="org.gtk.Notifications" pid=3023
label="snap.snap-store.ubuntu-software" peer_pid=2653 peer_label="unconfined"

Note that pkcon works on both these machines, so the dbus approach should in
theory be doable. 

A couple limitations to this approach occurred to me, though. For one thing
installing software requires auth from a user who can do such things (i.e. a
sudoer). If I were to try to use LibreOffice at my current employer, for
example, I (and most employees) do not have such privileges on any machines.
This would just be rubbing it in 😉.

But also... at least with the minimalist change I was making, there's no
querying the package to see where it installed the help files - I was going to
just assume the approot would be the same. Which it should be if the same
person (or two reasonable people) made both packages. But what if LO isn't
running from a package. If I wanted to run LO at work I'd be either building
from source or downloading someone's archive file of some sort and running it
from some arbitrary user directory. My current build directory for LO certainly
can't find the files installed by libreoffice-help. 

Perhaps that latter point should be a part of the requirement for fixing this
ticket? That sfxhelp.cxx file does also contain logic of where to look for the
files. The PK APIs (both gobject and also dbus) certainly do contain calls to
check if the package is installed and to list the files installed by a given
package. You already have a a call for IsInstalled and GetFiles() is documented
here:
https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html


But maybe another approach could be better? I know y'all know LO much better
than I, and I don't know the reasoning for the status quo, so feel free to slap
this down. Maybe LO could have a built-in html viewer to avoid weird issues
that could come up with the default browser, and if it can't find the HTML
files yes start grabbing online help for the right version but your "Help
Browser" could have a button to "Download for Offline Viewing"?

But then that's not an easy hack anymore, but rather a significant
restructuring of how Help works. Just a thought.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210222/77e74fd8/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list