<p dir="ltr">Surely it will support globbing a la /dev/ttyUSB* right?</p>
<div class="gmail_quote">On Jan 31, 2015 5:33 PM, "Gustavo Niemeyer" <<a href="mailto:gustavo.niemeyer@canonical.com">gustavo.niemeyer@canonical.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>What happens if the device moves? For example, a ttyUSB0 can become ttyUSB1 if one unplugs and plugs it back while the system was still working on the original device for whatever reason.</div><div><br></div><br><div class="gmail_quote">On Sat Jan 31 2015 at 11:52:20 AM Jamie Strandboge <<a href="mailto:jamie@canonical.com" target="_blank">jamie@canonical.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 01/30/2015 04:42 PM, Sergio Schvezov wrote:<br>
> On viernes 30 de enero de 2015 19h'31:44 ART, Jamie Strandboge wrote:<br>
>> On 01/30/2015 04:18 PM, Jamie Strandboge wrote:<br>
>><br>
>> ...<br>
>><br>
>>> = UX =<br>
>>> Relevant packaging yaml:<br>
>>> name: foo<br>
>>> version: 0.1<br>
>>> ...<br>
>>  ...<br>
>><br>
>> Hmm, one thing that occurred to me is that while we want to give the<br>
> device<br>
>> access to a particular service/cli binary, I don't think users have a way to see<br>
>> what services/cli binaries a snap provides, do they? In other words:<br>
>><br>
>> $ snappy install foo<br>
>> ...<br>
>> $ snappy add-hw foo.bar /dev/ttyS0<br>
>><br>
>><br>
>> How does the user know to specify 'foo.bar'? Does the new snappy cli UX cover<br>
>> this anywhere? If not, we'll can leave the original proposal, but prompt when<br>
>> the user specifies only the package name and when there is more than one<br>
>> service/cli binary to choose from (like in the above yaml example). Eg:<br>
>><br>
>> $ snappy install foo<br>
>> ...<br>
>><br>
>> $ snappy add-hw foo /dev/ttyS0             <=== only package name<br>
> specified<br>
>> Add access to '/dev/ttyS0' for which of the following:<br>
>> [1] foo.bar<br>
>> [2] foo.baz<br>
>> [3] all of the above<br>
>><br>
>>> 1<br>
>> 'foo.bar' is now allowed to access /dev/ttyS0<br>
><br>
> It should be foo_bar though, foo.bar would be akin to camlistore.sergiusens or<br>
> pastebinit.mvo (full package names).<br>
<br>
It's funny because I initially had '_' because it works better with the APP_ID<br>
concept and therefore the security policy. I picked '.' for consistency with the<br>
cli binaries, but forgot that those will use '/' in the future, so I think I<br>
picked the worst one.<br>
<br>
Choices:<br>
1. foo.bar<br>
$ snappy add-hw foo.bar /dev/ttyS0<br>
<br>
<br>
2. foo_bar<br>
$ snappy add-hw foo_bar /dev/ttyS0<br>
<br>
<br>
3. foo/bar<br>
$ snappy add-hw foo/bar /dev/ttyS0<br>
<br>
<br>
I think I slightly prefer '3' visually, but would be happy with '2' for the<br>
reasons stated above. I don't like '1' because it is inconsistent with the<br>
future experience and is the most confusing.<br>
<br>
<br>
--<br>
Jamie Strandboge                 <a href="http://www.ubuntu.com/" target="_blank">http://www.ubuntu.com/</a><br>
<br>
--<br>
snappy-devel mailing list<br>
<a href="mailto:snappy-devel@lists.ubuntu.com" target="_blank">snappy-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snappy-devel" target="_blank">https://lists.ubuntu.com/<u></u>mailman/listinfo/snappy-devel</a><br>
</blockquote></div>
<br>--<br>
snappy-devel mailing list<br>
<a href="mailto:snappy-devel@lists.ubuntu.com">snappy-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snappy-devel" target="_blank">https://lists.ubuntu.com/mailman/listinfo/snappy-devel</a><br>
<br></blockquote></div>