<?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>11605</bug_id>
          
          <creation_ts>2017-06-02 08:28:14 +0000</creation_ts>
          <short_desc>bitbake documentation: &quot;file-checksums&quot; needs to be documented</short_desc>
          <delta_ts>2025-02-21 19:01:46 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</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>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Richard Elberger">rich</assigned_to>
          <cc>antonin.godard</cc>
    
    <cc>komal.pal2904</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>rich</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>73639</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-06-02 08:28:14 +0000</bug_when>
    <thetext>The &quot;file-checksums&quot; varflag and how to set it using bb.fetch.get_checksum_file_list should get documented. Together they solve the problem of &quot;a task depends on certain files (regardless whether they exist at the moment or not)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73641</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-06-02 09:28:46 +0000</bug_when>
    <thetext>bb.fetch.get_checksum_file_list() is specific to SRC_URI. It merely shows the expected content of file-checksums.

I found that I needed an utility method:

fakeroot do_ostree_prepare_rootfs () {
    ...
    ${FLATPAKBASE}/scripts/gpg-keygen.sh ...
    ...
    ${META_REFKIT_CORE_BASE}/scripts/mk-ostree.sh ...
}

def get_file_list(filenames):
    filelist = []
    for filename in filenames:
        filelist.append(filename + &quot;:&quot; + str(os.path.exists(filename)))
    return &apos; &apos;.join(filelist)

do_ostree_prepare_rootfs[file-checksums] += &quot;${@get_file_list(( \
   &apos;${META_REFKIT_CORE_BASE}/scripts/mk-ostree.sh&apos;, \
   &apos;${FLATPAKBASE}/scripts/gpg-keygen.sh&apos;, \
))}&quot;

Note that files moving around is covered by the vardep on FLATPAKBASE and META_REFKIT_CORE_BASE in do_ostree_prepare_rootfs.

I&apos;m not sure whether some example like this would be useful for the documentation, and whether get_file_list() should be in bitbake itself (where, under which name?). Suggestions welcome...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93118</commentid>
    <comment_count>2</comment_count>
    <who name="Komal Pal">komal.pal2904</who>
    <bug_when>2022-04-18 09:07:00 +0000</bug_when>
    <thetext>Could I get link to some other document according to which I need to document all the things which are mentioned in above example or is there some template for the same?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94983</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Elberger">rich</who>
    <bug_when>2023-02-22 18:16:34 +0000</bug_when>
    <thetext>Notes:
The varflag [file-checksums] should be documented in section 3.7 of the Bitbake documentation

As inferred by OP the list is derived from bitbake&apos;s bb.fetch.get_checksum_file_list which is an internal function. I think that given the current depth of explanations in section 3.7 make inline examples out of scope. However I see the value in it but it needs to be a reproducible example without extensive dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95017</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Elberger">rich</who>
    <bug_when>2023-02-26 16:06:10 +0000</bug_when>
    <thetext>Patch has been accepted to docs repository.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96829</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:26 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101186</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-20 16:24:13 +0000</bug_when>
    <thetext>Antonin to check if resolved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101204</commentid>
    <comment_count>7</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-02-21 19:01:46 +0000</bug_when>
    <thetext>Now documented by commit https://git.yoctoproject.org/poky/commit/?id=d86cbd3d3d9d2565cd29abd5698243781623185e

Moving to Resolved fixed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>