Merge ~jocave/plainbox-provider-resource:executable-resource-real-path into plainbox-provider-resource:master

Proposed by Jonathan Cave
Status: Merged
Approved by: Sylvain Pineau
Approved revision: e2b977102c2ee8911ea3d3cf5f05f2bc028f62f8
Merged at revision: dc465da711a4832fd0cd004e4c26328a4ca3910d
Proposed branch: ~jocave/plainbox-provider-resource:executable-resource-real-path
Merge into: plainbox-provider-resource:master
Diff against target: 14 lines (+1/-2)
1 file modified
jobs/resource.pxu (+1/-2)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+326171@code.launchpad.net

Description of the change

This makes the executable resource useful by searching the PATH that is actually provided to checkbox.

Add location attribute which is useful for identifing where the executable is being supplied from (rootfs, the checkbox snap, something else).

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/resource.pxu b/jobs/resource.pxu
2index fb5d173..de05d51 100644
3--- a/jobs/resource.pxu
4+++ b/jobs/resource.pxu
5@@ -132,8 +132,7 @@ plugin: resource
6 _summary: Enumerate available system executables
7 _description: Generates a resource for all available executables
8 command:
9- export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
10- find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -type f -executable -printf "name: %f\n\n"
11+ find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -type f -executable -printf "name: %f\nlocation: %h\n\n"
12
13 id: device
14 estimated_duration: 0.48

Subscribers

People subscribed via source and target branches