<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 14/11/2016 à 12:19, Stephen Stewart
      a écrit :<br>
    </div>
    <blockquote
cite="mid:CAFxJN99ydmTG6Y9iGXZWdF1t9rbJv1vgANUtsGV4qdMkqRfYOg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">On Mon, Nov 14, 2016 at 10:34 AM Didier Roche
            <<a moz-do-not-send="true"
              href="mailto:didrocks@ubuntu.com">didrocks@ubuntu.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Le
            14/11/2016 à 10:55, Stephen Stewart a écrit :<br
              class="gmail_msg">
            > Hi,<br class="gmail_msg">
            ><br class="gmail_msg">
            > While looking into a nodejs/yarn plugin I wondered if I
            could make a<br class="gmail_msg">
            > yarn snap (not plugin), and simply define nodejs and
            yarn as parts,<br class="gmail_msg">
            > use dump plugin and be done, no plugin required:<br
              class="gmail_msg">
            ><br class="gmail_msg">
            > "Parts 'yarn' and 'node' have the following file paths
            in common which<br class="gmail_msg">
            > have different contents:"<br class="gmail_msg">
            ><br class="gmail_msg">
            > <a moz-do-not-send="true"
              href="https://pastebin.canonical.com/170573/"
              rel="noreferrer" class="gmail_msg" target="_blank">https://pastebin.canonical.com/170573/</a><br
              class="gmail_msg">
            ><br class="gmail_msg">
            > So I am wondering why doesn't this just work?<br
              class="gmail_msg">
            <br class="gmail_msg">
            Hey Stephen,<br class="gmail_msg">
          </blockquote>
          <div><br>
          </div>
          <div>Hi Didier,</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <br class="gmail_msg">
            It doesn't work simply because snapcraft doesn't know which
            file from<br class="gmail_msg">
            which part to ship. You have common files between parts with
            different<br class="gmail_msg">
            contents (as the error message underline). Which one of
            yarn's or node's<br class="gmail_msg">
            README.md should be included for instance?<br
              class="gmail_msg">
          </blockquote>
          <div><br>
          </div>
          <div>Fair enough, but ...</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            ><br class="gmail_msg">
            > It seems like name collisions in parts might be a
            common enough thing,<br class="gmail_msg">
            > and I couldn't quite understand the help docs around
            filesets and<br class="gmail_msg">
            > organise to see a nice way to make this work for me
            across projects.<br class="gmail_msg">
            <br class="gmail_msg">
            I guess <a moz-do-not-send="true"
              href="http://snapcraft.io/docs/build-snaps/advanced-features"
              rel="noreferrer" class="gmail_msg" target="_blank">http://snapcraft.io/docs/build-snaps/advanced-features</a>
            will be a<br class="gmail_msg">
            better example.<br class="gmail_msg">
            Basically, you define in one parts a fileset with:<br
              class="gmail_msg">
            filesets:<br class="gmail_msg">
              exclude:<br class="gmail_msg">
                - -README.md<br class="gmail_msg">
                - - LICENSE<br class="gmail_msg">
                - -lib/constants.js<br class="gmail_msg">
            (note the - to say to exclude those 3 files).<br
              class="gmail_msg">
          </blockquote>
          <div><br>
          </div>
          <div>... sure, but both parts need `lib/constants.js`; I can't
            exclude lib/constants for one part and hope that my snap
            will work, can I?</div>
          <div><br>
          </div>
          <div>I feel like I'm missing something really obvious here :(</div>
        </div>
      </div>
    </blockquote>
    <br>
    Ah, in that case, it means that you need to install both nodejs and
    yarn (I don't know the latter) in different install path, and have
    wrappers so that they know how to find each other IMHO.<br>
    <br>
    You can use organize to rename a directory in the stage and prime
    directory, that would be a good way to install in different path
    with the dump plugin.<br>
    However, you will need to provide those wrappers scripts/glue code
    so that one can know about the other.<br>
    <br>
    Cheers,<br>
    Didier<br>
  </body>
</html>