<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hey Mikko<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 01/12/2017 06:52 AM, Ylinen, Mikko
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAHZ0fbEWJcA_rhrgSiKOaU01cN6wVr=r5UsJq6oqpo6WARB_4A@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Wed, Jan 11, 2017 at 9:55 PM,
            Alejandro Hernandez <span dir="ltr">&lt;<a
                moz-do-not-send="true"
                href="mailto:alejandro.hernandez@linux.intel.com"
                target="_blank">alejandro.hernandez@linux.intel.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">From:
              Tom Zanussi &lt;<a moz-do-not-send="true"
                href="mailto:tom.zanussi@linux.intel.com">tom.zanussi@linux.intel.com</a>&gt;<br>
              <br>
              Rather than create an actual image, just put the image
              artifacts in an<br>
              'artifacts' directory that can then be picked up by wic.<br>
              <br>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    I thought about changing it to boot-artifacts-only, but once I did,
    since it is based on image-live the code looked more confusing in my
    opinion.<br>
    Also, we wanted what image-live does  in some parts, in this case
    do_bootimg, but we also avoid other things from image-live.<br>
    <blockquote
cite="mid:CAHZ0fbEWJcA_rhrgSiKOaU01cN6wVr=r5UsJq6oqpo6WARB_4A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div>This is a desired goal now that wic is more widely
              used. However, any particular</div>
            <div>reason why the implementation talks about "live" and
              copies what the live image</div>
            <div>do_bootimg gives? </div>
            <div> <br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              Signed-off-by: Alejandro Hernandez &lt;<a
                moz-do-not-send="true"
                href="mailto:alejandro.hernandez@linux.intel.com">alejandro.hernandez@linux.<wbr>intel.com</a>&gt;<br>
              Signed-off-by: Tom Zanussi &lt;<a moz-do-not-send="true"
                href="mailto:tom.zanussi@linux.intel.com">tom.zanussi@linux.intel.com</a>&gt;<br>
              ---<br>
               meta/classes/image-live-<wbr>artifacts.bbclass | 40
              ++++++++++++++++++++++++++++++<wbr>+<br>
               meta/classes/image.bbclass                |  3 +++<br>
               meta/classes/image_types.<wbr>bbclass          |  2 ++<br>
               3 files changed, 45 insertions(+)<br>
               create mode 100644 meta/classes/image-live-<wbr>artifacts.bbclass<br>
              <br>
              diff --git a/meta/classes/image-live-<wbr>artifacts.bbclass
              b/meta/classes/image-live-<wbr>artifacts.bbclass<br>
              new file mode 100644<br>
              index 0000000..1501a9b<br>
              --- /dev/null<br>
              +++ b/meta/classes/image-live-<wbr>artifacts.bbclass<br>
              @@ -0,0 +1,40 @@<br>
              +# Create the artifacts only on an ARTIFACTS_DIR,<br>
              +# which can be later picked up by wic<br>
              +<br>
              +inherit live-vm-common<br>
              +<br>
              +do_bootimg[depends] += "dosfstools-native:do_<wbr>populate_sysroot
              \<br>
            </blockquote>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Again, this was thought based on what image-live does, I'm not
    saying I disagree with you regarding handling the dependencies, but
    in this case you're saying you have the same issue with image-live?<br>
    <br>
    <blockquote
cite="mid:CAHZ0fbEWJcA_rhrgSiKOaU01cN6wVr=r5UsJq6oqpo6WARB_4A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div>perhaps have 'do_image_artifacts' and let users/other
              classes set additional dependencies.</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"> +     
                                mtools-native:do_populate_<wbr>sysroot \<br>
              +                        cdrtools-native:do_populate_<wbr>sysroot
              \<br>
              +                        virtual/kernel:do_deploy \<br>
              +                        ${MLPREFIX}syslinux:do_<wbr>populate_sysroot
              \<br>
              +                        syslinux-native:do_populate_<wbr>sysroot
              \<br>
            </blockquote>
            <div><br>
            </div>
            <div>For example, if I use systemd-boot I don't need
              syslinux built at all. The EFI_CLASS/PCBIOS_CLASS</div>
            <div>could define the additional depends here (like they are
              currently doing for bootimg/bootdirectdisk).</div>
            <div><br>
            </div>
            <div>The defaults should be just kernel and initrd(s) (if
              defined).</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"> +     
                                ${@oe.utils.ifelse(d.getVar('<wbr>COMPRESSISO',
              False),'zisofs-tools-native:<wbr>do_populate_sysroot','')}
              \<br>
              +                        "<br>
              +<br>
              +<br>
              +LABELS_LIVE ?= "boot install"<br>
              +<br>
              +ARTIFACTS_DIR = "${DEPLOY_DIR_IMAGE}/<wbr>artifacts"<br>
              +<br>
              +populate_bootloader() {<br>
              +       populate_kernel ${ARTIFACTS_DIR}<br>
              +<br>
              +       if [ "${PCBIOS}" = "1" ]; then<br>
              +               syslinux_hddimg_populate ${ARTIFACTS_DIR}<br>
              +       fi<br>
              +       if [ "${EFI}" = "1" ]; then<br>
              +               efi_hddimg_populate ${ARTIFACTS_DIR}<br>
              +       fi<br>
              +}<br>
              +<br>
              +python do_bootimg() {<br>
              +    set_live_vm_vars(d, 'LIVE')<br>
              +    if d.getVar("PCBIOS", True) == "1":<br>
              +        bb.build.exec_func('build_<wbr>syslinux_cfg', d)<br>
              +    if d.getVar("EFI", True) == "1":<br>
              +        bb.build.exec_func('build_efi_<wbr>cfg', d)<br>
              +    bb.build.exec_func('populate_<wbr>bootloader', d)<br>
              +}<br>
              +<br>
              +addtask bootimg before do_image_complete<br>
              diff --git a/meta/classes/image.bbclass
              b/meta/classes/image.bbclass<br>
              index 04fd5f9..fd249c8 100644<br>
              --- a/meta/classes/image.bbclass<br>
              +++ b/meta/classes/image.bbclass<br>
              @@ -130,6 +130,9 @@ do_rootfs[vardeps] +=
              "${@rootfs_variables(d)}"<br>
               do_build[depends] += "virtual/kernel:do_deploy"<br>
              <br>
               def build_live(d):<br>
              +    if bb.utils.contains("IMAGE_<wbr>FSTYPES",
              "live-artifacts-only", "live-artifacts-only", "0", d) ==
              "live-artifacts-only":<br>
              +         return "image-live-artifacts"<br>
            </blockquote>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Not as far as I know, but so that would work when building something
    AND the artifacts, but what if you want to build the artifacts
    only?, you would have to build everything else as well wouldn't you?<br>
    <br>
    I'm trying to think if this change is not more related to actually
    changing image-live, but I could be misunderstanding things<br>
    <blockquote
cite="mid:CAHZ0fbEWJcA_rhrgSiKOaU01cN6wVr=r5UsJq6oqpo6WARB_4A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div>Is there a need for the image artifacts for other than
              wic? It could be made so that if wic is in IMAGE_FSTYPES,</div>
            <div>image-artifacts are built by default. This means the
              logic of inheriting image-artifacts has a better place,
              e.g.,</div>
            <div>in it's own build_wic() check.</div>
            <div><br>
            </div>
            <div>-- Mikko</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>