<?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>14799</bug_id>
          
          <creation_ts>2022-05-12 12:30:09 +0000</creation_ts>
          <short_desc>do_deploy task is not called after kirkstone migration</short_desc>
          <delta_ts>2022-05-13 07:02:58 +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>4.0.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.0.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kevin Raymond">kr</reporter>
          <assigned_to name="Kevin Raymond">kr</assigned_to>
          <cc>pavel</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>93251</commentid>
    <comment_count>0</comment_count>
      <attachid>4865</attachid>
    <who name="Kevin Raymond">kr</who>
    <bug_when>2022-05-12 12:30:09 +0000</bug_when>
    <thetext>Created attachment 4865
task deps under kirkstone

I am in the process to validate the hardknott -&gt; kirkstone upgrade,
however I am hitting an issue where the do_deploy() task is not run
for a specific recipe under kirkstone, where it is successfully run
under hardknott, using the deploy class.
My current branch is based on the commit &quot;4ec7cb8202 ruby: upgrade 3.1.1 -&gt; 3.1.2&quot;. I don’t find anything related to my issue in the recent changes (I plan to rebase the code next week).

Under hardknott, my recipe has the following code:

    inherit deploy
    
    do_deploy() {
        install -m 0644 ${D}/${MYPATH}/${MACHINE}-file.txt ${DEPLOYDIR}/
    }
    addtask deploy before do_build after do_install

My current issue is that do_deploy() is never called under the
kirkstone branch while building my DISTRO where it is called as
expected under hardknott.
running &quot;bitbake -c do_deploy &lt;recipe_name&gt;&quot; successfully deploy the file

diving in the tasks list, I found that:
- in both project branches, do_build is set as noexec. Removing this
flag does not &quot;fix&quot; the issue.
- reverting &quot;bitbake: build: Disable warning about dependent tasks for
now&quot; let me know that the tasks are defined
- do_deploy is not set as a parent task of do_build under kirkstone,
which is the case under hardknott. This is quite the only change I can
find.
- adding do_build[depends] += &quot;${PN}:do_deploy&quot; does not trigger the
do_deploy tasks (even when I remove the noexec flag to the do_build
task) but let me match the task list of the hardknott one

task_deps exported as attachment.


Expectation
-----------
do_deploy() is triggered under kirkstone as in hardknott

Actual Result
-------------
do_deploy() is never called when building my DISTRO unless I call specifically the do_deploy task.


Reproducibility
---------------
100%</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93252</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-05-12 14:38:51 +0000</bug_when>
    <thetext>Which bitbake target are you expecting to run this?

Presumably running:
$ bitbake recipename 
likely does run your task. Does it?

We suspect this is an error or misunderstanding of how bitbake should work and that since we clean-up unneeded build dependencies, you are only noticing this now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93259</commentid>
    <comment_count>2</comment_count>
    <who name="Kevin Raymond">kr</who>
    <bug_when>2022-05-12 15:21:07 +0000</bug_when>
    <thetext>hum, you’re right. 

   $ bitbake recipename
run the deploy task where 

   $ bitbake distroname
does not (unlike under hardknott)


Here is my configuration (recipename renamed to recipe1):
    DISTRO set VIRTUAL-RUNTIME_init_manager = recipe2
a runtime dependancy is set to recipe1 in recipe2
    RDEPENDS:recipe2 += &quot;recipe1&quot;
    
Building recipe1 or recipe2 effectively trigger the deploy task, where building the DISRTO does not.

However, when I mean &quot;building the distro&quot; it is in fact the &quot;virtual/kernel&quot; target (linux with initramfs). recipe1 is packaged and installed in the root filesystem, it’s just the deploy task which is not run.


I might do something out of the chart, can you point me to the commit where the unneeded dependencies are dropped?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93264</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-05-12 19:37:37 +0000</bug_when>
    <thetext>The change I was thinking of was:

https://git.yoctoproject.org/poky/commit/meta/classes?id=568f62214bca3ac6d35eef8d9f4562596fb4c9ab

partially reverted by:

https://git.yoctoproject.org/poky/commit/meta/classes?id=f22e1fbdf7bed111e080d176fe5a39c5139308ed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93265</commentid>
    <comment_count>4</comment_count>
    <who name="Kevin Raymond">kr</who>
    <bug_when>2022-05-13 07:02:58 +0000</bug_when>
    <thetext>Ok thank you very much, I missed this on the 3.4 migration guide.

To resolve my issue I’ll move to build the image instead of the virtual/kernel target and pull the task from there, as the do_deploy is needed only when building the image.

Closing as NOTABUG</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4865</attachid>
            <date>2022-05-12 12:30:09 +0000</date>
            <delta_ts>2022-05-12 12:30:09 +0000</delta_ts>
            <desc>task deps under kirkstone</desc>
            <filename>task_deps_kirkstone.txt</filename>
            <type>text/plain</type>
            <size>4464</size>
            <attacher name="Kevin Raymond">kr</attacher>
            
              <data encoding="base64">ewogICAgInRhc2tzIjogWwogICAgICAgICJkb19wYXRjaCIsCiAgICAgICAgImRvX3BvcHVsYXRl
X3N5c3Jvb3QiLAogICAgICAgICJkb19wb3B1bGF0ZV9zeXNyb290X3NldHNjZW5lIiwKICAgICAg
ICAiZG9fcHJlcGFyZV9yZWNpcGVfc3lzcm9vdCIsCiAgICAgICAgImRvX2xpc3R0YXNrcyIsCiAg
ICAgICAgImRvX2NsZWFuIiwKICAgICAgICAiZG9fY2hlY2t1cmkiLAogICAgICAgICJkb19mZXRj
aCIsCiAgICAgICAgImRvX3VucGFjayIsCiAgICAgICAgImRvX2RlcGxveV9zb3VyY2VfZGF0ZV9l
cG9jaF9zZXRzY2VuZSIsCiAgICAgICAgImRvX2RlcGxveV9zb3VyY2VfZGF0ZV9lcG9jaCIsCiAg
ICAgICAgImRvX2NvbmZpZ3VyZSIsCiAgICAgICAgImRvX2NvbXBpbGUiLAogICAgICAgICJkb19p
bnN0YWxsIiwKICAgICAgICAiZG9fYnVpbGQiLAogICAgICAgICJkb19jbGVhbnNzdGF0ZSIsCiAg
ICAgICAgImRvX2NsZWFuYWxsIiwKICAgICAgICAiZG9fcGFja2FnZV9xYSIsCiAgICAgICAgImRv
X3BhY2thZ2VfcWFfc2V0c2NlbmUiLAogICAgICAgICJkb19wYWNrYWdlIiwKICAgICAgICAiZG9f
cGFja2FnZV9zZXRzY2VuZSIsCiAgICAgICAgImRvX3BhY2thZ2VkYXRhIiwKICAgICAgICAiZG9f
cGFja2FnZWRhdGFfc2V0c2NlbmUiLAogICAgICAgICJkb19wYWNrYWdlX3dyaXRlX2lwa19zZXRz
Y2VuZSIsCiAgICAgICAgImRvX3BhY2thZ2Vfd3JpdGVfaXBrIiwKICAgICAgICAiZG9fZGV2c2hl
bGwiLAogICAgICAgICJkb19weWRldnNoZWxsIiwKICAgICAgICAiZG9fcG9wdWxhdGVfbGljIiwK
ICAgICAgICAiZG9fcG9wdWxhdGVfbGljX3NldHNjZW5lIiwKICAgICAgICAiZG9fZGVwbG95X3Nl
dHNjZW5lIiwKICAgICAgICAiZG9fZGVwbG95IiwKICAgIF0sCiAgICAicGFyZW50cyI6IHsKICAg
ICAgICAiZG9fcGF0Y2giOiBbImRvX3VucGFjayJdLAogICAgICAgICJkb19wb3B1bGF0ZV9zeXNy
b290IjogWyJkb19pbnN0YWxsIl0sCiAgICAgICAgImRvX3BvcHVsYXRlX3N5c3Jvb3Rfc2V0c2Nl
bmUiOiBbXSwKICAgICAgICAiZG9fcHJlcGFyZV9yZWNpcGVfc3lzcm9vdCI6IFsiZG9fZmV0Y2gi
XSwKICAgICAgICAiZG9fbGlzdHRhc2tzIjogW10sCiAgICAgICAgImRvX2NsZWFuIjogW10sCiAg
ICAgICAgImRvX2NoZWNrdXJpIjogW10sCiAgICAgICAgImRvX2ZldGNoIjogW10sCiAgICAgICAg
ImRvX3VucGFjayI6IFsiZG9fZmV0Y2giXSwKICAgICAgICAiZG9fZGVwbG95X3NvdXJjZV9kYXRl
X2Vwb2NoX3NldHNjZW5lIjogW10sCiAgICAgICAgImRvX2RlcGxveV9zb3VyY2VfZGF0ZV9lcG9j
aCI6IFsiZG9fcGF0Y2giXSwKICAgICAgICAiZG9fY29uZmlndXJlIjogWwogICAgICAgICAgICAi
ZG9fZGVwbG95X3NvdXJjZV9kYXRlX2Vwb2NoIiwKICAgICAgICAgICAgImRvX3ByZXBhcmVfcmVj
aXBlX3N5c3Jvb3QiLAogICAgICAgICAgICAiZG9fcGF0Y2giLAogICAgICAgIF0sCiAgICAgICAg
ImRvX2NvbXBpbGUiOiBbImRvX2NvbmZpZ3VyZSJdLAogICAgICAgICJkb19pbnN0YWxsIjogWyJk
b19jb21waWxlIl0sCiAgICAgICAgImRvX2J1aWxkIjogWwogICAgICAgICAgICAiZG9fcG9wdWxh
dGVfbGljIiwKICAgICAgICAgICAgImRvX3BhY2thZ2Vfd3JpdGVfaXBrIiwKICAgICAgICAgICAg
ImRvX3BhY2thZ2VkYXRhIiwKICAgICAgICAgICAgImRvX3BhY2thZ2VfcWEiLAogICAgICAgICAg
ICAiZG9fcG9wdWxhdGVfc3lzcm9vdCIsCiAgICAgICAgXSwKICAgICAgICAiZG9fY2xlYW5zc3Rh
dGUiOiBbImRvX2NsZWFuIl0sCiAgICAgICAgImRvX2NsZWFuYWxsIjogWyJkb19jbGVhbnNzdGF0
ZSJdLAogICAgICAgICJkb19wYWNrYWdlX3FhIjogWyJkb19wYWNrYWdlZGF0YSIsICJkb19wYWNr
YWdlIl0sCiAgICAgICAgImRvX3BhY2thZ2VfcWFfc2V0c2NlbmUiOiBbXSwKICAgICAgICAiZG9f
cGFja2FnZSI6IFsiZG9faW5zdGFsbCJdLAogICAgICAgICJkb19wYWNrYWdlX3NldHNjZW5lIjog
W10sCiAgICAgICAgImRvX3BhY2thZ2VkYXRhIjogWyJkb19wYWNrYWdlIl0sCiAgICAgICAgImRv
X3BhY2thZ2VkYXRhX3NldHNjZW5lIjogW10sCiAgICAgICAgImRvX3BhY2thZ2Vfd3JpdGVfaXBr
X3NldHNjZW5lIjogW10sCiAgICAgICAgImRvX3BhY2thZ2Vfd3JpdGVfaXBrIjogWwogICAgICAg
ICAgICAiZG9fcGFja2FnZWRhdGEiLAogICAgICAgICAgICAiZG9fcGFja2FnZSIsCiAgICAgICAg
ICAgICJkb19kZXBsb3lfc291cmNlX2RhdGVfZXBvY2giLAogICAgICAgIF0sCiAgICAgICAgImRv
X2RldnNoZWxsIjogWyJkb19wYXRjaCIsICJkb19wcmVwYXJlX3JlY2lwZV9zeXNyb290Il0sCiAg
ICAgICAgImRvX3B5ZGV2c2hlbGwiOiBbImRvX3BhdGNoIl0sCiAgICAgICAgImRvX3BvcHVsYXRl
X2xpYyI6IFsiZG9fcGF0Y2giXSwKICAgICAgICAiZG9fcG9wdWxhdGVfbGljX3NldHNjZW5lIjog
W10sCiAgICAgICAgImRvX2RlcGxveV9zZXRzY2VuZSI6IFtdLAogICAgICAgICJkb19kZXBsb3ki
OiBbImRvX2luc3RhbGwiXSwKICAgIH0sCiAgICAibWNkZXBlbmRzIjoge30sCiAgICAiZGVwZW5k
cyI6IHsKICA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iOiAi
MSIsCiAgICAgICAgImRvX2RldnNoZWxsIjogIjEiLAogICAgICAgICJkb19weWRldnNoZWxsIjog
IjEiLAogICAgfSwKICAgICJmYWtlcm9vdCI6IHsKICAgICAgICAiZG9faW5zdGFsbCI6ICIxIiwK
ICAgICAgICAiZG9fcGFja2FnZV9xYSI6ICIxIiwKICAgICAgICAiZG9fcGFja2FnZSI6ICIxIiwK
ICAgICAgICAiZG9fcGFja2FnZV9zZXRzY2VuZSI6ICIxIiwKICAgICAgICAiZG9fcGFja2FnZV93
cml0ZV9pcGsiOiAiMSIsCiAgICB9LAogICAgIm5vZXhlYyI6IHsiZG9fYnVpbGQiOiAiMSJ9LAog
ICAgInVtYXNrIjoge30sCn0K
</data>

          </attachment>
      

    </bug>

</bugzilla>