Check if the program that runs the contract is actually available on the system

Bug #912413 reported by Tom Beckmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Contractor
Triaged
Medium
Unassigned
0.2
Triaged
Undecided
Unassigned
0.3
Triaged
Medium
Unassigned

Bug Description

You should check if the program that is running the contract is available on the system or, which would probably be simpler add an entry to the .contract file listing dependencies. Or you could restrict the installation of the contracts only to the programs (at the moment, I think, for example postler.contract is installed with contractor), but this last solution would make it harder to create "third-party" contracts for programs like gimp.

Changed in contractor:
importance: Undecided → High
status: New → Confirmed
milestone: none → luna-beta1
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I suggest using TryExec= key, like in .desktop files

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Info on TryExec= can be found here: http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html

This is needed for e.g. Inkscape contracts which work via BASH wrappers; while they're shipped with those wrappers, it depends on Inkscape's presence if they will work or not.

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

For reference, Inkscape contracts can be found here: lp:~elementary-os/contractor/inkscape-contracts

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Ammonkey did commit a fix to Extended Actions, see http://bazaar.launchpad.net/~marlin-devs/extended-actions/trunk/revision/3 but his fix is not sufficient, won't work for Inkscape contracts for example.

Revision history for this message
Danielle Foré (danrabbit) wrote :

While a cool new feature, I don't think this is essential for Luna Beta. We shouldn't be shipping any contracts that don't have installed binaries.

Changed in contractor:
milestone: luna-beta1 → none
Jacob Bowyer (jkbbwr)
Changed in contractor:
assignee: nobody → Jacob Bowyer (jkbbwr)
Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Discussion from the Google Doc (http://goo.gl/A2lHJ):

Сергей Давыдов
5:55 AM Jul 18
This is required because of dpkg limitations - there's no concept of "linking" packages and patching every package just to include a contract is not viable, so we have to ship bunches of contracts and then show only those which are actually available on the system.

This is also needed for contracts employing wrapper scripts because executability of the contract depends on the presence of the base app, not the wrapper script.

Not taking all that into account, it's basic must-have robustness.

Fabian Thoma
4:25 PM Oct 26
Agreed, should be done, that's why it's a bug that's Confirmed

Changed in contractor:
milestone: none → luna-beta2
Changed in contractor:
milestone: luna-beta2 → luna-beta3
Cody Garver (codygarver)
Changed in contractor:
assignee: Jacob Bowyer (jkbbwr) → nobody
Revision history for this message
Victor Martinez (victored) wrote :

We can do this by using TryExec

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.