<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 12/11/2016 à 17:45, Boris Rybalkin a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CADcVQYu=-vpf8DL1xsMJb7AJ1ZRcnfsU=AOy1Q1NeXim0m2BKg@mail.gmail.com"
      type="cite">
      <p dir="ltr">Still struggling with hooks, they are not executed on
        install.</p>
      <p dir="ltr">snap$ snap run --hook=configure syncloud-platform<br>
        cannot snap-exec: cannot find hook "configure" in
        "syncloud-platform"<br>
        and even 'snap run --hook=configure mysnap' silently returns.</p>
      <p dir="ltr">I am using:<br>
        Ubuntu 16.04<br>
        snapd 2.16ubuntu3</p>
      <p dir="ltr">Does it have hook support?</p>
    </blockquote>
    <br>
    It's supposed to have some, but IIRC, Kyle found some issues with
    it. Definitively, this version doesn't run the hook on install
    though.<br>
    <br>
    <blockquote
cite="mid:CADcVQYu=-vpf8DL1xsMJb7AJ1ZRcnfsU=AOy1Q1NeXim0m2BKg@mail.gmail.com"
      type="cite">
      <p dir="ltr">According to this test they should even fail install
        if broken: <br>
        <a moz-do-not-send="true"
href="https://github.com/snapcore/snapd/blob/203591b28670ef5c4106c8fc43051500bd6c3fda/tests/main/snap-set/task.yaml">https://github.com/snapcore/snapd/blob/203591b28670ef5c4106c8fc43051500bd6c3fda/tests/main/snap-set/task.yaml</a></p>
      <p dir="ltr">As suggested I am copying meta/hooks to prime dir
        after running snapcraft prime  and then running snapcraft snap.</p>
      <p dir="ltr">This bug says it is probably not yet available in
        edge, how do I switch channel?</p>
      <p dir="ltr"><a moz-do-not-send="true"
          href="https://bugs.launchpad.net/snappy/+bug/1636931">https://bugs.launchpad.net/snappy/+bug/1636931</a></p>
    </blockquote>
    <br>
    As I said in some email above, the easiest path to test it is to use
    an ubuntu core VM (until a new snapd release is out for Ubuntu 16.04
    desktop, CCing Michael to know when the next snapd hits stable + SRU
    published).<br>
    Cheers,<br>
    Didier<br>
    <br>
    <blockquote
cite="mid:CADcVQYu=-vpf8DL1xsMJb7AJ1ZRcnfsU=AOy1Q1NeXim0m2BKg@mail.gmail.com"
      type="cite">
      <p dir="ltr">Thank you.</p>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 9 Nov 2016 09:21, "Didier Roche"
          <<a moz-do-not-send="true"
            href="mailto:didrocks@ubuntu.com" target="_blank">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_8701655348413158309moz-cite-prefix">Le
                09/11/2016 à 10:15, Boris Rybalkin a écrit :<br>
              </div>
              <blockquote type="cite">
                <p dir="ltr">One more question, should I expect a hook
                  to run inside my snap package and use relative shebang
                  like this?</p>
              </blockquote>
              <blockquote type="cite">
                <p dir="ltr">#!python/bin/python</p>
                <p dir="ltr">Assuming I am packaging python with my
                  snap.</p>
              </blockquote>
              hooks are run using the same context than any "commands:"
              in your snap.<br>
              <br>
              As long as we don't have snapcraft support, I don't think
              you will have the override in PYTHONPATH, PYTHONHOME and
              such (and I don't know if that's planned), but I'll give
              it a try later this week or early new one to have great
              python hooks examples.<br>
              <br>
              If you beat me to it, do not hesitate to report your
              results here!<br>
              <br>
              <blockquote type="cite">
                <p dir="ltr">Thank you very much for your replies!</p>
              </blockquote>
              <br>
              My pleasure :)<br>
              <br>
              <br>
              <blockquote type="cite">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On 9 Nov 2016 08:58, "Didier
                    Roche" <<a moz-do-not-send="true"
                      href="mailto:didrocks@ubuntu.com" target="_blank">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_8701655348413158309m_8215880607017612253moz-cite-prefix">Le
                          09/11/2016 à 09:39, Boris Rybalkin a écrit :<br>
                        </div>
                        <blockquote type="cite">
                          <p dir="ltr">Sorry, I did not get that.</p>
                          <p dir="ltr">I am using snapcraft, are you
                            saying that just creating hooks/configure is
                            not enaugh?</p>
                        </blockquote>
                        It should be enough if you ensure it's in your
                        final snap in meta/hooks/configure. (Look at
                        your prime/ directory).<br>
                        Enwei was talking about more advanced snapcraft
                        integration, where you point to a file which is
                        then copied for you in meta/hooks.<br>
                        <br>
                        <blockquote type="cite">
                          <p dir="ltr">Looks like my hook is not
                            executed:<br>
                            <a moz-do-not-send="true"
                              href="https://github.com/syncloud/platform/tree/master/snap"
                              target="_blank">https://github.com/syncloud/pl<wbr>atform/tree/master/snap</a></p>
                          <p dir="ltr">Is it possible to debug the
                            execution of snap install?</p>
                          <p dir="ltr">I would like to see the state of
                            the snap after it failed to start daemons.
                            The only way to see the problem is to run
                            journalctl and guess by startup errors.</p>
                          <div class="gmail_extra"><br>
                          </div>
                        </blockquote>
                        Yeah, hooks are hard to debug, I filed <b
                          style="font-weight:normal"
id="m_8701655348413158309m_8215880607017612253docs-internal-guid-64dccfd7-484b-ceda-a91e-d2b3b4567373"><a
                            moz-do-not-send="true"
                            class="m_8701655348413158309m_8215880607017612253moz-txt-link-freetext"
href="https://bugs.launchpad.net/snappy/+bug/1640114" target="_blank">https://bugs.launchpad.net/sna<wbr>ppy/+bug/1640114</a>
                          yesterday about this.<br>
                          <br>
                          Didier<br>
                        </b><br>
                      </div>
                      <br>
                      --<br>
                      Snapcraft mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:Snapcraft@lists.snapcraft.io"
                        target="_blank">Snapcraft@lists.snapcraft.io</a><br>
                      Modify settings or unsubscribe at: <a
                        moz-do-not-send="true"
                        href="https://lists.ubuntu.com/mailman/listinfo/snapcraft"
                        rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
                      <br>
                    </blockquote>
                  </div>
                </div>
                <br>
                <fieldset
                  class="m_8701655348413158309mimeAttachmentHeader"></fieldset>
                <br>
              </blockquote>
              <p><br>
              </p>
            </div>
            <br>
            --<br>
            Snapcraft mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
            Modify settings or unsubscribe at: <a
              moz-do-not-send="true"
              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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>