[Rpm-maint] Add appdata() and application() auto-provides

Panu Matilainen pmatilai at laiskiainen.org
Fri Oct 4 12:31:27 UTC 2013

On 10/04/2013 03:01 PM, Michael Schroeder wrote:
> On Wed, Oct 02, 2013 at 07:32:26PM -0400, Colin Walters wrote:
>> +               echo "application()"
>> +               echo "application(${instfile##*/applications/})"
>>                  if ! grep -q '^Type=Application$' "$instfile"; then continue; fi
>>                  if ! grep -q '^Exec=' "$instfile"; then continue; fi
>> Shouldn't these pairs of lines be swapped, so that we don't
>> emit provides for things that aren't actually Type=Application for
>> example?
> I also saw that "if" statement, but decided to put the echo statements
> before it. My reasoning is that the application() marker is for
> .desktop files in the "/usr/share/applications" directory, independent
> of the type. (I must admit that I have no clue about what other types
> are allowed in those desktop files.)

Looking at 
says the current three types are Application, Link and Directory, and 
that for future-proofing, unknown types should be ignored.

Based on that I think we'd be better off only creating the application() 
provides for explicit Type=Application entries, as types Link and 
Directory are decidedly not applications, and of possible new types we 
obviously have no idea.

Another possibility could be actually emitting a provide for all types, 
based on the value name, eg Link would get a link() provide etc. And 
thinking about that makes me think perhaps these provides should be 
namespaced somehow, eg desktop-application() or such.

	- Panu -

More information about the Rpm-maint mailing list