<?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>9189</bug_id>
          
          <creation_ts>2016-03-01 09:35:08 +0000</creation_ts>
          <short_desc>[meta-swupd] Creates a lot of duplicate files</short_desc>
          <delta_ts>2016-12-08 17:44:06 +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.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock">joshuagloe</reporter>
          <assigned_to name="Patrick Ohly">patrick.ohly</assigned_to>
          <cc>igor.stoppa</cc>
    
    <cc>patrick.ohly</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</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>59565</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-03-01 09:35:08 +0000</bug_when>
    <thetext>Due to the way swupd works by processing chroot-like bundle directories on each os release we potentially end up carrying a lot of duplicate files in DEPLOY_DIR_SWUPD. 

We should look at using the hardlink program (or possibly fdupes) to replace duplicate files in that directory with hard links in order to save disk space.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62094</commentid>
    <comment_count>1</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2016-05-11 11:14:28 +0000</bug_when>
    <thetext>Could this be a requirement for swupd?
Anyway it seems like an optional step.
If one makes lots of throwaway builds, it might be faster to jsut bear with the duplicated files.

I think it would be ok to have it enabled by default only if the overhead of identifying duplicates is minimum (could the hash from the manifests of previous releases help?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62114</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-05-11 18:46:49 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Could this be a requirement for swupd?

At least partially, yes. In fact swupd-server introduced a feature to use hardlinks when possible during swupd_make_pack

https://github.com/clearlinux/swupd-server/releases/tag/v3.1.2

I haven&apos;t had any chance to investigate it yet, nor try to determine whether it needs to be enabled or whether it requires extra utilities on the host (i.e. a hardlink-native).

&gt; Anyway it seems like an optional step.
&gt; If one makes lots of throwaway builds, it might be faster to jsut bear with
&gt; the duplicated files.
&gt; 
&gt; I think it would be ok to have it enabled by default only if the overhead of
&gt; identifying duplicates is minimum (could the hash from the manifests of
&gt; previous releases help?)

This is useful feedback, thanks. ISTR the request for hardlink support came from a colleague on the Ostro team? If the demand isn&apos;t still there I shall push this out to a later milestone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67863</commentid>
    <comment_count>3</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-11-02 14:45:21 +0000</bug_when>
    <thetext>The right approach for avoiding duplicate files in the www directory is to create updates from the last build: swupd_create_update then automatically reuses existing, unmodified files. As an added bonus, that also reduces time spent in swupd_make_fullfiles because only new or modified files need to be handled.

I&apos;m currently working on some code which does that. Note that this is different from computing deltas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67864</commentid>
    <comment_count>4</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-11-02 14:46:20 +0000</bug_when>
    <thetext>Let&apos;s pull this in. Concern about disk space in the update repo was also mentioned by other parties interested in using meta-swupd.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68958</commentid>
    <comment_count>5</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-12-08 17:44:06 +0000</bug_when>
    <thetext>Current meta-swupd master (today&apos;s commit 07ad71b78) supports incremental builds, so no files get duplicated anymore.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>