<?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>15571</bug_id>
          
          <creation_ts>2024-08-08 12:14:54 +0000</creation_ts>
          <short_desc>Unable to generate sparse image due to missing &quot;truncate&quot; tool</short_desc>
          <delta_ts>2024-09-03 10:48:13 +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>OE-Core</product>
          <component>oe-core other</component>
          <version>4.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>normal</bug_severity>
          <target_milestone>5.1 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcin Bajer">marcin.bajer</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>99515</commentid>
    <comment_count>0</comment_count>
    <who name="Marcin Bajer">marcin.bajer</who>
    <bug_when>2024-08-08 12:14:54 +0000</bug_when>
    <thetext>While trying to genete sparse build system reports missing &quot;truncate&quot; tool.

```
run.do_image_wic.279213: 165: truncate: not found
```

Seems the solution is to add coreutils-native as dependency

```
CONVERSION_DEPENDS_sparse = &quot;android-tools-native&quot; -&gt; CONVERSION_DEPENDS_sparse = &quot;android-tools-native coreutils-native&quot;
```

Tempolary solution for me without making a changes in OE core is to add:

```
do_image_wic[depends] += &quot;coreutils-native:do_populate_sysroot&quot;
```

in my image description recipe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99516</commentid>
    <comment_count>1</comment_count>
      <attachid>5066</attachid>
    <who name="Marcin Bajer">marcin.bajer</who>
    <bug_when>2024-08-08 12:44:19 +0000</bug_when>
    <thetext>Created attachment 5066
Proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99533</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-08-08 21:54:49 +0000</bug_when>
    <thetext>We may as well just add this to HOSTTOOLS since we already effectively depend upon coreutils. I&apos;ve sent a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99599</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-09-03 10:48:13 +0000</bug_when>
    <thetext>https://git.yoctoproject.org/poky/commit/?id=0f8d29b648579c9c63caf8c550df81657f43b6ea</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>5066</attachid>
            <date>2024-08-08 12:44:19 +0000</date>
            <delta_ts>2024-08-08 12:44:19 +0000</delta_ts>
            <desc>Proposed patch</desc>
            <filename>0001-image_types_sparse-fix-unable-to-generate-sparse-ima.patch</filename>
            <type>text/plain</type>
            <size>1072</size>
            <attacher name="Marcin Bajer">marcin.bajer</attacher>
            
              <data encoding="base64">RnJvbSBlMzk2Y2U1ZjcwYThmNTk5MWZkYjY2YTIxYjI3YTlhYjBmZjhiNTRjIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJjaW4gQmFqZXIgPG1hcmNpbi5iYWplckBwbC5hYmIuY29t
PgpEYXRlOiBUaHUsIDggQXVnIDIwMjQgMTQ6MzA6MDUgKzAyMDAKU3ViamVjd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