<div dir="auto">James Page's accounting makes it sound like we cannot use that feature without compromising the predefined system services.</div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 5, 2017 1:02 PM, "Didier Roche" <<a href="mailto:didrocks@ubuntu.com">didrocks@ubuntu.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 bgcolor="#FFFFFF" text="#000000">
<div class="m_-7218207987543550376moz-cite-prefix">Le 03/01/2017 à 13:18, James Page a
écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Tue, 3 Jan 2017 at 12:15 James Page <<a href="mailto:james.page@ubuntu.com" target="_blank"><a class="m_-7218207987543550376moz-txt-link-abbreviated" href="mailto:james.page@ubuntu.com" target="_blank">james.page@ubuntu.com</a></a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="m_-7218207987543550376gmail_msg">
<div class="gmail_quote m_-7218207987543550376gmail_msg">
<div dir="ltr" class="m_-7218207987543550376gmail_msg">On Tue, 3 Jan 2017 at
11:58 Gustavo Niemeyer <<a href="mailto:gustavo.niemeyer@canonical.com" class="m_-7218207987543550376gmail_msg" target="_blank">gustavo.niemeyer@canonical.<wbr>com</a>>
wrote:<br class="m_-7218207987543550376gmail_msg">
</div>
</div>
</div>
<div dir="ltr" class="m_-7218207987543550376gmail_msg">
<div class="gmail_quote m_-7218207987543550376gmail_msg">
<blockquote class="gmail_quote m_-7218207987543550376gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="m_-7218207987543550376gmail_msg">Will systemd handle
multiple services with the same name without
complaining? How would it disambiguate?
<div class="m_-7218207987543550376gmail_msg"><br class="m_-7218207987543550376gmail_msg">
</div>
<div class="m_-7218207987543550376gmail_msg">We can pull off snap aliases
because the binary paths are separate (not
/usr/bin), and thus won't actually conflict even
if system packages and snaps define the same name.</div>
</div>
</blockquote>
<div class="m_-7218207987543550376gmail_msg"><br class="m_-7218207987543550376gmail_msg">
</div>
</div>
</div>
<div dir="ltr" class="m_-7218207987543550376gmail_msg">
<div class="gmail_quote m_-7218207987543550376gmail_msg">
<div class="m_-7218207987543550376gmail_msg"><span style="color:rgb(33,33,33);font-size:13px" class="m_-7218207987543550376gmail_msg">I could see how this might be a
problem; an Alias can either be defined in the
systemd unit file (in which case systemd will create
an appropriate symlink), or by creating the symlink
from alias->actual in /etc/systemd/system - I'll
poke at things and see how that might break!</span></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>It would appear that any symlink created in
/etc/systemd/system masks anything provided by a deb package
in /lib/systemd/system - so the glance-api alias from a snap
would override the glance-api systemd unit file provided by
a deb package installed on the same system</div>
<div><br>
</div>
<div>I guess this also fits into the general question of how
to transition an existing system from deb->snap in a
elegant way as well :-) <br>
</div>
</div>
</div>
<br>
</blockquote>
<br>
Indeed, systemd has aliases for years, and we should use similarly
the Alias keyword in the unit file for those cases.<br>
This just create a symlink at the right place and ensure only one
unit with this symlink can be enabled at a time.<br>
<br>
This is how things like display manager, where some alternatives but
a fixed service name might be needed (for dependencies) are handled,
fyi.<br>
Cheers,<br>
Didier<br>
<p><br>
</p>
</div>
<br>--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
<br></blockquote></div></div>