On 06/01/2016 05:24 PM, Greg Hellings wrote:
I'm looking into a bug filed against one of my applications (BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1330096). The complaint is
that the gnome-software application picks up the xiphos-common package
when the user tries to install from there, rather than picking up the
actual GUI packages (which are available as xiphos-gtk2 and
xiphos-gtk3).
I need some advice on the proper way to handle this. First, a little
explanation of the three packages.
Upstream Xiphos includes some support for building against GTK3 but
has no intention of moving to that for its primary support on its
current roadmap. Thus, there are occasionally bugs against the GTK3
build that are left as low-priority tasks - sometimes these will
render the GTK3 build completely unusable. Thus, upstream recommends
building only against GTK2.
To satisfy both camps, and to allow ease of bug reporting (i.e.
identifying if the bug is a regression in GTK3 interfaces vs a bug in
Xiphos) and for various other reasons, both xiphos-gtk{2,3} were made
available. There are a small number of static or data files which can
be shared between the two builds - translations, etc. These are
packaged as xiphos-common, which is a dep of both the binary packages.
One of those files that is shared between the two is the
%{_datadir}/appdata/xiphos.appdata.xml, which appears to be what
triggers gnome-software to consider a particular package the GUI
app-containing package that ought to be installed.
Don't share that, it's meant to be unique per app, and you have two
separate apps here.
Instead, create two .appdata files, one for each .desktop file, and put
both the .desktop and .appdata files in the respective xiphos-gtk2 and
xiphos-gtk3 subpackages. Something like:
xiphos-gtk2.rpm:
/usr/bin/xiphos-gtk2
/usr/share/appdata/xiphos-gtk2.appdata.xml
/usr/share/applications/xiphos-gtk2.desktop
xiphos-gtk3.rpm:
/usr/bin/xiphos-gtk3
/usr/share/appdata/xiphos-gtk3.appdata.xml
/usr/share/applications/xiphos-gtk3.desktop
--
Hope this helps,
Kalev