What would people think about doing this in #fedora.spec files?
# make the software center load faster desktop-file-edit %{buildroot}%{_datadir}/applications/*.desktop \ --set-key=X-AppInstall-Package --set-value=%{name}
It makes the software center load much faster as we don't have to lookup what package owns the desktop file[1] before we can show the UI. "X-AppInstall-Package" is an extension that Ubuntu has been using for nearly a decade.
I can shave over 250ms off the gnome-software cold-start time if most applications set "X-AppInstall-Package". I've investigated perhaps doing this automatically using a brp script in rpm, but this fails as it can't add a dep for desktop-file-utils (which most apps should already have as they should be validating the .desktop file) and that the .desktop file might not be in %{name} but some sub-package which we don't know as the brp is done globally on the buildroot.
Ideas, comments and feedback welcome. I'd be willing to edit the 50 or so desktop packages we have in the default install myself if we can't find an automatic way to do this. SUSE says they want to do the same as us if it helps.
Richard.
[1] so we can show if it's installed, available in the repos, or an update exists for it.
Richard Hughes (hughsient@gmail.com) said:
What would people think about doing this in #fedora.spec files?
# make the software center load faster desktop-file-edit %{buildroot}%{_datadir}/applications/*.desktop \ --set-key=X-AppInstall-Package --set-value=%{name}
It makes the software center load much faster as we don't have to lookup what package owns the desktop file[1] before we can show the UI. "X-AppInstall-Package" is an extension that Ubuntu has been using for nearly a decade.
It seems a reasonable enough optimization, although you'd obviously still need to the fallback to querying the database.
Bill
On 2 October 2013 15:46, Bill Nottingham notting@redhat.com wrote:
It seems a reasonable enough optimization, although you'd obviously still need to the fallback to querying the database.
Right; the amount of delay at startup is proportional to the number of requests we do. Do you think it's acceptable to add this snippet to ~50 desktop (mostly GNOME) packages without filing bug reports? I'm a provenpackager if that matters.
Richard.
On Wed, Oct 2, 2013 at 2:47 PM, Richard Hughes hughsient@gmail.com wrote:
What would people think about doing this in #fedora.spec files?
# make the software center load faster desktop-file-edit %{buildroot}%{_datadir}/applications/*.desktop \ --set-key=X-AppInstall-Package --set-value=%{name}
(No, this does not really answer your specific question.)
"That we need facilities in the packaging system to be able to make such a change in a single place, so that it would affect all packages."
I suppose the Flock ... discussions ... about using Conary to build RPMs have gone nowhere (I at least can't find a working canonical Conary download page or SCM, so that's that) - but we do need to improve the tooling, with or without having Conary to fall back on. Mirek
On Wed, Oct 02, 2013 at 01:47:57PM +0100, Richard Hughes wrote:
What would people think about doing this in #fedora.spec files?
# make the software center load faster desktop-file-edit %{buildroot}%{_datadir}/applications/*.desktop \ --set-key=X-AppInstall-Package --set-value=%{name}
This does not take subpackages into account. Not sure, how relevant it is for the 50 packages you plan to adjust, but it would be an issue for e.g. wireshark-gnome.
Nevertheless, if there is a way to do this properly automatically, I would welcome this.
Regards Till
On 2 October 2013 18:55, Till Maas opensource@till.name wrote:
This does not take subpackages into account. Not sure, how relevant it is for the 50 packages you plan to adjust, but it would be an issue for e.g. wireshark-gnome.
Sure, in this case I'd have to manually change %{name} to the subpackage name.
Nevertheless, if there is a way to do this properly automatically, I would welcome this.
You and me both! :) If you've got any ideas, I'm really all ears :)
Richard