<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9599</bug_id>
          
          <creation_ts>2016-05-05 21:54:14 +0000</creation_ts>
          <short_desc>Reduce bundle overheads by not depending on os-core when generating bundle sysroots</short_desc>
          <delta_ts>2017-12-06 16:54:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Other YP Layers</product>
          <component>meta-swupd</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock">joshuagloe</reporter>
          <assigned_to name="Joshua Lock">joshuagloe</assigned_to>
          <cc>igor.stoppa</cc>
    
    <cc>jose.perez.carranza</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62004</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-05-05 21:54:14 +0000</bug_when>
    <thetext>We currently generate the bundle contents by performing a diff between an os-core image and an image that consists of os-core + the bundle contents.

This adds significant overhead when adding bundles, especially noticeable with small bundles (an extreme example being a bundle which only installs a data file).

It could be possible to improve performance significantly by only installing the contents of the bundle into the swupd image directory for processing by swupd.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62097</commentid>
    <comment_count>1</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2016-05-11 11:53:49 +0000</bug_when>
    <thetext>This would be probably the most important feature, to improve the overall developer&apos;s experience.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62119</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-05-11 18:53:33 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; This would be probably the most important feature, to improve the overall
&gt; developer&apos;s experience.

Thanks for the feedback, the Medium+ Importance indicates that this feature should land in 2.2 M1 (but won&apos;t &apos;block&apos; that milestone being completed) and therefore indicates it&apos;s a priority for the current development milestone.

I agree it will be a big improvement for developer workflow and will prioritise accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62295</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-05-18 15:34:21 +0000</bug_when>
    <thetext>I have a partial implementation for this, unfortunately verification fails as follows:

Verifying files
Hash mismatch for file: /bin
Hash mismatch for file: /etc
Hash mismatch for file: /lib
Hash mismatch for file: /lib/systemd
Hash mismatch for file: /lib/systemd/system
Hash mismatch for file: /lib/systemd/system/multi-user.target.wants
Hash mismatch for file: /lib/systemd/system/sockets.target.wants
Hash mismatch for file: /sbin
Hash mismatch for file: /usr
Hash mismatch for file: /usr/bin
Hash mismatch for file: /usr/sbin
Hash mismatch for file: /usr/share
Hash mismatch for file: /usr/share/dbus-1
Hash mismatch for file: /var
Inspected 2082 files
  14 files did not match

I&apos;ve pushed the current WIP patch to the joshuagl/wip-rm-bundle-images:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-swupd/commit/?h=joshuagl/wip-rm-bundle-images&amp;id=7e59fdb48dc28c3a8df17282f632a460a05725df</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62355</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-05-19 22:21:08 +0000</bug_when>
    <thetext>The proposed solution now produces images which succeed at verification on my relatively simple OS. I intend to do further testing of:
* swupdimage images (images consisting of os-core + N bundles)
* updates
* bundle addition
* bundle removal

I don&apos;t expect updates or bundle addition to be affected by the changes, but would like to have some certainty by testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62361</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-05-20 12:52:16 +0000</bug_when>
    <thetext>I realised there&apos;s an edge case we have to handle differently, when the bundle defines BUNDLE_FEATURES (which adds extra IMAGE_FEATURES for inclusion in that bundle) I think we must handle things the old way with a virtual image.

We presume that the user is aware that an IMAGE_FEATURE that doesn&apos;t map to a set of installed packages is not really supported (because a bundle&apos;s contents must only add files to the system, not change files in os-core, I realise now that I need to add this to docs/Guide.md) but we can&apos;t be sure that an IMAGE_FEATURE directly maps to an installable target (i.e. a packagegroup) — I believe that this is true for dbg, dev and ptest IMAGE_FEATURES, thus for bundles which utilise BUNDLE_FEATURES we must build a virtual image and copy out the files from the resulting image which aren&apos;t in os-core.

The good news here is that the copyxattrfiles() function we already added in this series makes copying files from a virtual image more efficient than before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62566</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-06-01 16:44:51 +0000</bug_when>
    <thetext>This is now implemented in meta-swupd master, the change spans multiple commits with the main ones being:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-swupd/commit/?id=714e77c917cd991e34fd8c7c53293cbf41e81563

and

http://git.yoctoproject.org/cgit/cgit.cgi/meta-swupd/commit/?id=57e636e999cd2598e907fe822a3cf548aac69555

to address the BUNDLE_FEATUREs case</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>